CN114724011B - Behavior determination method and device, storage medium and electronic device - Google Patents

Behavior determination method and device, storage medium and electronic device Download PDF

Info

Publication number
CN114724011B
CN114724011B CN202210572280.8A CN202210572280A CN114724011B CN 114724011 B CN114724011 B CN 114724011B CN 202210572280 A CN202210572280 A CN 202210572280A CN 114724011 B CN114724011 B CN 114724011B
Authority
CN
China
Prior art keywords
determining
loss value
training
target
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210572280.8A
Other languages
Chinese (zh)
Other versions
CN114724011A (en
Inventor
雷蕾
倪华健
林亦宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shanma Zhijian Technology Co ltd
Original Assignee
Beijing Shanma Zhijian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shanma Zhijian Technology Co ltd filed Critical Beijing Shanma Zhijian Technology Co ltd
Priority to CN202210572280.8A priority Critical patent/CN114724011B/en
Publication of CN114724011A publication Critical patent/CN114724011A/en
Application granted granted Critical
Publication of CN114724011B publication Critical patent/CN114724011B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a behavior determination method, a behavior determination device, a storage medium and an electronic device, wherein the method comprises the following steps: inputting the target data into a target network model to obtain behavior information output by a plurality of task networks in the target network model; the target network model is obtained by training the initial network model through a training data set, and the target loss value for updating the network parameters of the multiple task networks is determined in the following way: determining a first loss value of each task network in the first training, wherein the first training is previous training of the current training; determining a second loss value of each task network in the second training, wherein the second training is the previous training of the first training; a target loss value is determined based on each first loss value and each second loss value. By the method and the device, the problem of low efficiency of determining the behavior of the object is solved, and the effect of improving the efficiency of determining the behavior of the object is achieved.

Description

Behavior determination method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of computers, in particular to a behavior determination method and device, a storage medium and an electronic device.
Background
As vehicles are increasing, the number of gas stations is increasing day by day, and how to ensure the safety of the gas stations is a constant concern of the regulatory authorities. Existing gas station hazards include smoking, cell phone play, etc., and human resources are costly and time consuming if supervised manually.
Therefore, the related art has the problem that the behavior of the object is determined inefficiently.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a behavior determining method, a behavior determining device, a storage medium and an electronic device, which are used for at least solving the problem of low efficiency of determining the behavior of an object in the related art.
According to an embodiment of the present invention, there is provided a behavior determination method including: inputting target data into a target network model to obtain behavior information output by a plurality of task networks in the target network model, wherein the behavior information is used for indicating behaviors of target objects in the target data; the target network model is obtained by training an initial network model through a training data set, and the target loss value for updating the network parameters of the plurality of task networks is determined in the following way: determining a first loss value of each task network in a first training, wherein the first training is previous training of current training; determining a second loss value of each task network in the second training, wherein the second training is previous training of the first training; determining the target loss value based on each of the first loss values and each of the second loss values.
According to another embodiment of the present invention, there is provided a behavior determination apparatus including: the system comprises a determining module, a processing module and a processing module, wherein the determining module is used for inputting target data into a target network model to obtain behavior information of a plurality of task network outputs in the target network model, and the behavior information is used for indicating behaviors of target objects in the target data; the target network model is obtained by training an initial network model through a training data set, and the target loss value for updating the network parameters of the plurality of task networks is determined in the following way: determining a first loss value of each task network in a first training, wherein the first training is previous training of current training; determining a second loss value of each task network in the second training, wherein the second training is previous training of the first training; determining the target loss value based on each of the first loss values and each of the second loss values.
According to a further embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the target data is input into the target network model, and the behavior of the target object included in the target data output by the plurality of task networks included in the target network model is obtained. The target network model is obtained by training the initial network model through the training data set, the target loss value of the initial network model is determined through the first loss value of the previous training of the current training and the second loss value of the previous training of the current training, namely when the target loss value is determined, the loss values obtained by the previous two times of training of the current training of each task network are integrated, the training difference of the task networks is increased, and the identification accuracy of the target network model is improved.
Drawings
Fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a behavior determination method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of determining behavior according to an embodiment of the invention;
FIG. 3 is a flow diagram of a method for determining behavior in accordance with a specific embodiment of the present invention;
fig. 4 is a block diagram of the structure of a behavior determination apparatus according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In order to fully supervise, a plurality of behaviors need to be analyzed, a plurality of behavior classes need to be trained simultaneously, and the problem that how to synthesize a plurality of abnormal behaviors into a network and coordinate work is to be overcome is solved. Abnormal behaviors do not occur at any time, and the problem of data imbalance between the abnormal behaviors and the normal behaviors needs to be specially solved.
Some embodiments are proposed to solve the above-mentioned problems in the related art.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal according to a method for determining a behavior according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the behavior determination method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a method for determining a behavior is provided, and fig. 2 is a flowchart of the method for determining a behavior according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, target data is input into a target network model, behavior information of a plurality of task network outputs in the target network model is obtained, wherein the behavior information is used for indicating behaviors of a target object in the target data;
the target network model is obtained by training an initial network model through a training data set, and the target loss value for updating the network parameters of the plurality of task networks is determined in the following way: determining a first loss value of each task network in a first training, wherein the first training is previous training of current training; determining a second loss value of each task network in the second training, wherein the second training is previous training of the first training; determining the target loss value based on each of the first loss values and each of the second loss values.
In the above embodiments, the target data may be an image, a video, or the like. The target data may include a target object, which may be a person, a vehicle, or the like. The target network model may be a convolutional neural network model or other network model. The target data are input into the target network model, the backbone network of the target network model can extract the data characteristics of the target data and input the data characteristics into the task networks, and the task networks can identify the data characteristics and determine the behavior information of the object included in the target data. Where each task network may be used to perform one type of task. The specific task can be determined according to the application scenario of the target network model. When the target network model is applied at a gas station, the target object may be a person. The behavioral information may include whether to make or receive a call, whether to smoke, whether there is an open flame, etc. The behavior of the target object includes answering a call, not answering a call, smoking, not smoking, presence of open fire, absence of open fire, etc. When the target network model is applied in intelligent transportation, the target object may be a vehicle, and the behavior information may include whether to go backwards, whether to fasten a seat belt, and the like. Accordingly, the behavior of the target object may include retrograde motion, undirected motion, fastened belt, unfastened belt, and the like.
In the above embodiment, the target network model may be a model obtained by training the initial network model through a training data set. The structure of the initial network model is the same as the structure of the target network model. And training the initial network model through a training data set, and adjusting the network parameters of the initial network model according to the obtained target loss value. And after multiple times of training, when the obtained target loss value meets the condition of exiting training, determining the final initial network model as a target network model. The training exit condition may be that the number of times of training reaches a predetermined number of times or that the target loss value is smaller than a preset threshold value.
In the above embodiment, the training data set includes a plurality of types of training data, and the number of the types of training data is the same as the number of the task networks. Each type of training data is used to train a task network, and the type of training data for each task network is different.
In the above embodiment, when determining the target loss value, the target loss value may be determined by a loss value in two training sessions before the current training session. One training is one epoch. A first loss value for each task network in the first training and a second loss value for each task in the second training may be determined. The first training refers to the previous training of the current training, and the second training refers to the previous training of the first training. For example, if the current training is the t-th epoch, the first training is the t-1 st epoch, and the second training is the t-2 nd epoch. For each task network, a drop rate of the task network may be determined from the first loss value and the second loss value, and a target loss value may be determined from the drop rate. After the target loss value is determined, network parameters of the plurality of task networks may also be adjusted according to the target loss value. After the preset adjustment times, the initial network model with the adjusted network parameters can be verified by using the verification data set, and when the target loss value of the initial network model with the adjusted network parameters meets the quit training condition, the final initial network model is determined as the target network model. And when the target loss value of the initial network model with the adjusted network parameters does not meet the condition of exiting the training, training by using the training data set again. Until the exit training condition is satisfied. The predetermined number of adjustments may be decremented with the number of checks.
In the above embodiment, when the target data is an image and the target object is a person, when the training data is acquired, a picture containing the pedestrian may be acquired, and the position of the pedestrian in the picture may be labeled. And carrying out convolution operation on the picture by utilizing a convolution neural network to obtain a picture characteristic diagram. And scanning the feature map by using the RPN to generate an proposing frame, performing linear regression on the proposing frame such as frame translation and scaling to obtain the position information of the pedestrian, and using the model for pedestrian detection. And acquiring the pedestrian by using the pedestrian detection model, and labeling attribute information, namely behavior information of the pedestrian. A plurality of attributes of a plurality of tasks are input in a format (url 1, 0), url represents a storage path of an image, 0 represents that the behavior does not exist, and 1 represents that the behavior exists. After the training data set is obtained, feature extraction can be performed on input pedestrians by using a convolutional neural network, and the extracted features are judged by using a classification network to determine the behavior of the object.
Optionally, the main body of the above steps may be a background processor, or other devices with similar processing capabilities, and may also be a machine integrated with at least an image acquisition device and a data processing device, where the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a terminal such as a computer and a mobile phone, but is not limited thereto.
According to the invention, the target data is input into the target network model, and the behavior of the target object included in the target data output by the plurality of task networks included in the target network model is obtained. The target network model is obtained by training the initial network model through the training data set, the target loss value of the initial network model is determined through the first loss value of the previous training of the current training and the second loss value of the previous training of the current training, namely when the target loss value is determined, the loss values obtained by the previous two times of training of the current training of each task network are integrated, the training difference of the task networks is increased, and the identification accuracy of the target network model is improved.
In one exemplary embodiment, determining the target loss value based on the first loss value and the second loss value comprises: determining a loss value drop rate for each of the task networks based on each of the first loss values and each of the second loss values; determining a loss value weight for each of the task networks based on the loss value drop rate for each of the task networks; determining the target penalty value based on each of the penalty value weights and each of the second penalty values. In this embodiment, since the abnormal behavior does not occur at any time, there is a problem of data imbalance between the abnormal behavior and the normal behavior. The loss value calculation can be carried out on the output result and the label by using the focal _ loss, the loss value reduction rate of each task network is determined, the loss value weight of the task network which is easy to classify is reduced according to the loss value reduction rate, the loss weight of the class with less data is increased, and the problem of imbalance in the class is solved.
In one exemplary embodiment, determining a loss value drop rate for each of the task networks based on each of the first loss values and each of the second loss values comprises: determining a ratio of a first loss value to the second loss value for each of the task networks; determining the ratio as the loss value drop rate of the task network. In this embodiment, the loss (i.e., the first loss) of the t-1 th epoch output can be compared with the loss (i.e., the second loss) of the t-2 th epoch output to obtain the loss decreasing rate. And calculating according to the descending rate of each task network, and giving a small loss ratio to the loss with the faster descending speed so as to balance the descending speed of the loss of each task network. Wherein the loss value decrease rate can be expressed as
Figure DEST_PATH_IMAGE001
Figure 272335DEST_PATH_IMAGE002
Representing the loss value of the first training,
Figure DEST_PATH_IMAGE003
representing the loss value of the second training. i denotes the ith task network.
In one exemplary embodiment, determining a loss value weight for each of the task networks based on the loss value drop rate for each of the task networks comprises: determining a first ratio of the loss value drop rate to a first parameter for each of the task networks; respectively determining a first numerical value taking a natural constant as a base and each first ratio as an index; determining the loss value weight for each of the task networks based on a plurality of the first numerical values. In this embodiment, the calculation is performed according to the drop rate of each task network, and a loss ratio is given to the loss with the faster drop so as to balance the drop rate of the loss of each task network. That is, the loss value weight of each task network can be determined according to the loss value drop rate of each task network. Before determining the loss value weight of each task network, a first parameter may be set in advance, where the first parameter may be a constant, such as 2, 3, etc., and the present invention is not limited thereto.
In the above embodiments, the first numerical value may be expressed as
Figure 750328DEST_PATH_IMAGE004
. Where T represents a first parameter. After determining the first value, a loss value weight for each task network may be determined based on the plurality of first values.
In one exemplary embodiment, determining the loss value weight for each of the task networks based on a plurality of the first numerical values comprises: determining the sum of a plurality of the first numerical values to obtain a second numerical value; determining the product of each first numerical value and a second parameter to obtain a first product corresponding to each task network; determining a ratio of each of the first products to the second value as the penalty value weight for each of the task networks. In this embodiment, the weight of the loss value of each task network can be expressed as
Figure DEST_PATH_IMAGE005
. Wherein K represents a second parameter,
Figure 326803DEST_PATH_IMAGE006
in one exemplary embodiment, determining the target loss value based on each of the loss value weights and each of the second loss values comprises: determining a product of each second loss value and the loss value weight corresponding to the second loss value to obtain a plurality of second products; determining a sum of a plurality of the second products as the target loss value. In the present embodiment, the target loss value may be expressed as
Figure DEST_PATH_IMAGE007
In an exemplary embodiment, after inputting the target data into the target network model and obtaining the behavior information of the plurality of task network outputs included in the target network model, the method further includes: determining a behavior type of the behavior information; and executing an alarm operation under the condition that the behavior type meets a preset condition. In this embodiment, after the target data is input into the target network model and the behavior information is obtained, the behavior type of the behavior information may be determined, and the alarm operation is performed when the behavior type satisfies a predetermined condition. When the target network model is applied in a gas station scenario, the behavior types may include a smoking type, a non-smoking type, a phone type not dialed, a type with open fire, a type without open fire, and the like. The behavior types satisfying the predetermined condition include a smoking type, a calling type, and a type with open fire. When the target network model is applied in an intelligent traffic scenario, the behavior types may include a retrograde type, a non-retrograde type, a belted type, an unbelted type, and the like. The behavior types satisfying the predetermined condition include a retrograde type, an unbundled belt type. In the event that it is determined that the behavior type satisfies the predetermined condition, an alert operation may be performed. Wherein, the operation of reporting an emergency and asking for help or increased vigilance can include that the pronunciation is reported to the high in the clouds and is taken notes, reminds the staff to stop etc..
The following describes a method for determining behavior with reference to a specific embodiment:
fig. 3 is a flowchart of a behavior determination method according to an embodiment of the present invention, and as shown in fig. 3, the flow transmits a video acquired by a camera to a pedestrian detection model by frames, the detection model outputs a position of a pedestrian, data of the position is input to abnormal behavior analysis of the pedestrian, whether there is abnormal behavior is output, if there is abnormal behavior, a supervisor is notified, and the supervisor punishs or warns the pedestrian with abnormal behavior.
In the embodiment, advanced technologies such as computer vision image processing and the like are effectively utilized to realize analysis and identification of the site abnormal behaviors of the gas station. The pedestrian detection method based on the convolutional neural network has the advantages that the pedestrian at the gas station site is detected through the convolutional neural network, specific behavior analysis is carried out on the pedestrian after the pedestrian is detected, an alarm is sent out when the pedestrian with the illegal behavior appears, and warning processing is carried out. The unbalance problem in the classes is solved through focal _ loss, and the loss weight of each task is adjusted according to the loss descending speed in the training process so as to solve the unbalance problem among the classes.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a behavior determination apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram showing the structure of a behavior determination apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes:
a determining module 42, configured to input target data into a target network model to obtain behavior information of a plurality of task network outputs included in the target network model, where the behavior information is used to indicate a behavior of a target object included in the target data;
the target network model is obtained by training an initial network model through a training data set, and the target loss value for updating the network parameters of the plurality of task networks is determined in the following way: determining a first loss value of each task network in a first training, wherein the first training is previous training of current training; determining a second loss value of each task network in the second training, wherein the second training is previous training of the first training; determining the target loss value based on each of the first loss values and each of the second loss values.
In an exemplary embodiment, the determination module 42 may determine the target loss value based on the first loss value and the second loss value by: determining a loss value drop rate for each of the task networks based on each of the first loss values and each of the second loss values; determining a loss value weight for each of the task networks based on the loss value drop rate for each of the task networks; determining the target penalty value based on each of the penalty value weights and each of the second penalty values.
In an exemplary embodiment, the determination module 42 may determine the loss value drop rate for each of the task networks based on each of the first loss values and each of the second loss values by: determining a ratio of a first loss value to the second loss value for each of the task networks; determining the ratio as the loss value drop rate of the task network.
In an exemplary embodiment, the determination module 42 may determine the loss value weight for each of the task networks based on the loss value drop rate for each of the task networks by: determining a first ratio of the loss value drop rate to a first parameter for each of the task networks; respectively determining a first numerical value taking a natural constant as a base and each first ratio as an index; determining the loss value weight for each of the task networks based on a plurality of the first numerical values.
In an exemplary embodiment, determining module 42 may determine the loss value weight for each of the task networks based on a plurality of the first numerical values by: determining the sum of a plurality of the first numerical values to obtain a second numerical value; determining the product of each first numerical value and a second parameter to obtain a first product corresponding to each task network; determining a ratio of each of the first products to the second value as the penalty value weight for each of the task networks.
In an exemplary embodiment, determining module 42 may determine the target loss value based on each of the loss value weights and each of the second loss values by: determining a product of each second loss value and the loss value weight corresponding to the second loss value to obtain a plurality of second products; determining a sum of the plurality of second products as the target loss value.
In an exemplary embodiment, the apparatus may be further configured to, after inputting the target data into the target network model and obtaining behavior information of a plurality of task network outputs included in the target network model, include: determining a behavior type of the behavior information; and executing an alarm operation under the condition that the behavior type meets a preset condition.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and exemplary implementations, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A method for behavior determination, comprising:
inputting target data into a target network model to obtain behavior information output by a plurality of task networks in the target network model, wherein the behavior information is used for indicating behaviors of target objects in the target data;
the target network model is obtained by training an initial network model through a training data set, and the target loss value for updating the network parameters of the plurality of task networks is determined in the following way: determining a first loss value of each task network in a first training, wherein the first training is previous training of the current training; determining a second loss value of each task network in a second training, wherein the second training is a previous training of the first training; determining the target loss value based on each of the first loss values and each of the second loss values;
determining the target loss value based on the first loss value and the second loss value comprises: determining a loss value drop rate for each of the mission networks based on each of the first loss values and each of the second loss values; determining a loss value weight for each of the task networks based on the loss value drop rate for each of the task networks; determining the target loss value based on each of the loss value weights and each of the second loss values;
determining a loss value drop rate for each of the mission networks based on each of the first loss values and each of the second loss values comprises: determining a ratio of a first loss value to the second loss value for each of the task networks; determining the ratio as the loss value drop rate of the task network;
determining a loss value weight for each of the task networks based on the loss value drop rate for each of the task networks comprises: determining a first ratio of the loss value drop rate to a first parameter for each of the task networks; respectively determining a first numerical value taking a natural constant as a base and each first ratio as an index; determining the sum of a plurality of the first numerical values to obtain a second numerical value; determining the product of each first numerical value and a second parameter to obtain a first product corresponding to each task network; determining a ratio of each of said first products to said second value as said penalty value weight for each of said task networks;
the target data are images obtained by a camera, the behavior information comprises the existence of open fire and the absence of open fire, the training data set comprises various types of training data, and the training data comprise the images and the positions of objects in the images.
2. The method of claim 1, wherein determining the target loss value based on each of the loss value weights and each of the second loss values comprises:
determining a product of each second loss value and the loss value weight corresponding to the second loss value to obtain a plurality of second products;
determining a sum of a plurality of the second products as the target loss value.
3. The method of claim 1, wherein after inputting target data into a target network model, obtaining behavior information of a plurality of task network outputs included in the target network model, the method further comprises:
determining a behavior type of the behavior information;
and executing an alarm operation under the condition that the behavior type meets a preset condition.
4. An apparatus for determining behavior, comprising:
the system comprises a determining module, a processing module and a processing module, wherein the determining module is used for inputting target data into a target network model to obtain behavior information of a plurality of task network outputs in the target network model, and the behavior information is used for indicating behaviors of target objects in the target data;
the target network model is obtained by training an initial network model through a training data set, and the target loss value for updating the network parameters of the plurality of task networks is determined in the following way: determining a first loss value of each task network in a first training, wherein the first training is previous training of current training; determining a second loss value of each task network in a second training, wherein the second training is a previous training of the first training; determining the target loss value based on each of the first loss values and each of the second loss values;
the apparatus enables determining the target loss value based on the first loss value and the second loss value by: determining a loss value drop rate for each of the mission networks based on each of the first loss values and each of the second loss values; determining a loss value weight for each of the task networks based on the loss value drop rate for each of the task networks; determining the target loss value based on each of the loss value weights and each of the second loss values;
the apparatus effects determining a loss value drop rate for each of the task networks based on each of the first loss values and each of the second loss values by: determining a ratio of a first loss value to the second loss value for each of the task networks; determining the ratio as the loss value drop rate of the task network;
the apparatus enables determining a loss value weight for each of the task networks based on the loss value drop rate for each of the task networks by: determining a first ratio of the loss value drop rate to a first parameter for each of the task networks; respectively determining a first numerical value taking a natural constant as a base and each first ratio as an index; determining the sum of a plurality of the first numerical values to obtain a second numerical value; determining the product of each first numerical value and a second parameter to obtain a first product corresponding to each task network; determining a ratio of each of said first products to said second value as said penalty value weight for each of said task networks;
the target data is an image acquired by a camera, the behavior information comprises the existence of open fire and the absence of open fire, the training data set comprises multiple types of training data, and the training data comprises the image and the position of an object included in the image.
5. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 3 when executed.
6. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 3.
CN202210572280.8A 2022-05-25 2022-05-25 Behavior determination method and device, storage medium and electronic device Active CN114724011B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210572280.8A CN114724011B (en) 2022-05-25 2022-05-25 Behavior determination method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210572280.8A CN114724011B (en) 2022-05-25 2022-05-25 Behavior determination method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114724011A CN114724011A (en) 2022-07-08
CN114724011B true CN114724011B (en) 2023-01-20

Family

ID=82231214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210572280.8A Active CN114724011B (en) 2022-05-25 2022-05-25 Behavior determination method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114724011B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115527087B (en) * 2022-11-04 2023-07-14 北京闪马智建科技有限公司 Method and device for determining behavior information, storage medium and electronic device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI773962B (en) * 2020-01-17 2022-08-11 國立中央大學 Model training apparatus and method
CN112132847A (en) * 2020-09-27 2020-12-25 北京字跳网络技术有限公司 Model training method, image segmentation method, device, electronic device and medium
CN112308150B (en) * 2020-11-02 2022-04-15 平安科技(深圳)有限公司 Target detection model training method and device, computer equipment and storage medium
CN112541124B (en) * 2020-12-24 2024-01-12 北京百度网讯科技有限公司 Method, apparatus, device, medium and program product for generating a multitasking model
CN113128478B (en) * 2021-05-18 2023-07-14 电子科技大学中山学院 Model training method, pedestrian analysis method, device, equipment and storage medium
CN114511042A (en) * 2022-04-06 2022-05-17 杭州闪马智擎科技有限公司 Model training method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN114724011A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN110414313B (en) Abnormal behavior alarming method, device, server and storage medium
CN109902575B (en) Anti-walking method and device based on unmanned vehicle and related equipment
US11475770B2 (en) Electronic device, warning message providing method therefor, and non-transitory computer-readable recording medium
CN107862270B (en) Face classifier training method, face detection method and device and electronic equipment
CN109583278B (en) Face recognition alarm method, device and system and computer equipment
EP3719708A1 (en) Model test method and device
CN109523652B (en) Insurance processing method, device and equipment based on driving behaviors and storage medium
CN108423006A (en) A kind of auxiliary driving warning method and system
CN114611634B (en) Method and device for determining behavior type, storage medium and electronic device
CN111160175A (en) Intelligent pedestrian violation behavior management method and related product
CN114724011B (en) Behavior determination method and device, storage medium and electronic device
CN111191507A (en) Safety early warning analysis method and system for smart community
WO2019177734A1 (en) Systems and methods for inter-camera recognition of individuals and their properties
CN115168024A (en) Early warning method, device and equipment based on edge calculation
CN113705294A (en) Image identification method and device based on artificial intelligence
CN112633387A (en) Safety reminding method, device, equipment, system and storage medium
CN110728211A (en) Subway security check queuing guide method and device and storage medium
CN112597995B (en) License plate detection model training method, device, equipment and medium
CN112488806A (en) Method and device for predicting order willingness, computer equipment and computer-readable storage medium
CN113505759B (en) Multitasking method, multitasking device and storage medium
CN113593256B (en) Unmanned aerial vehicle intelligent driving-away control method and system based on city management and cloud platform
CN111651249B (en) Task allocation method and device, readable storage medium and electronic equipment
CN109035686A (en) A kind of pre- anti-lost alarm method and device
CN115019242A (en) Abnormal event detection method and device for traffic scene and processing equipment
CN114241401A (en) Abnormality determination method, apparatus, device, medium, and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant