CN-115937777-B - Smoking behavior detection method and system in industrial scene monitoring video
Abstract
The invention discloses a smoking behavior detection method and a smoking behavior detection system in an industrial scene monitoring video, which adopt a mode of combining measurement learning with temperature detection, adopt a mode of extracting features in measurement learning and calculating distance to obtain target classification, use TRANSREID neural network as a feature extraction network to extract features of combining smoking actions with cigarettes, use a self-attention mechanism, can better extract features, can accurately identify smoking behaviors, and overcome the defects of the traditional smoking detection method. By means of establishing a template library, the feature images of the image frames of the workers to be detected are subjected to template matching with the feature images in the template library, and accuracy of smoking action judgment can be improved.
Inventors
- YU JUNQING
- WANG SHUXIN
- XI WENZHI
Assignees
- 国能长源武汉青山热电有限公司
- 华中科技大学
Dates
- Publication Date
- 20260505
- Application Date
- 20221216
Claims (7)
- 1. The smoking behavior detection method in the industrial scene monitoring video is characterized by comprising the following steps of: S1, training a TRANSREID network by using a worker image data set, wherein the worker image data set comprises head, hand and whole body images of workers, which are obtained by performing target detection on each image frame in an industrial scene monitoring video; S2, carrying out target detection on the image frames of the workers to be detected to obtain head, hand and whole body images of the target workers, and inputting the head, hand and whole body images into a trained TRANSREID network to obtain head, hand and whole body feature images of the workers to be classified; s3, determining the probability of lighting cigarettes in the image frame area of the worker to be detected Wherein, the method comprises the steps of, The temperature value for the ith pixel point of the head, hand and whole body images of the target worker corresponds to the probability of lighting the cigarette temperature, = , The temperature measurement result for the lighting cigarette is Is a function of the probability of (1), In order for the probability of lighting a cigarette to occur, To the temperature at the time of temperature measurement Is a probability of occurrence of (1); Determining the first M head, hand and whole body feature images of the workers closest to the head, hand and whole body feature images of the workers to be classified from the feature library, dividing the number of the head, hand and whole body feature images with smoking marks by M to obtain the probability p2, p3 and p4 of smoking behaviors in the head, hand and whole body areas of the image frames of the workers to be detected; and S4, if a is greater than a threshold value, considering that the smoking behavior exists in the to-be-detected worker image frame, and if not, judging that the smoking behavior exists in the to-be-detected worker image frame, wherein a, b, c and d are weight coefficients.
- 2. The method of claim 1, wherein the temperature data of the lit cigarette is collected by a thermometry camera and is counted to obtain And (3) with And fitting the temperature data to obtain a temperature distribution function of the lighted cigarette.
- 3. The method of claim 2 wherein the temperature distribution function of the lit cigarette is a normal distribution function.
- 4. The method of claim 1, wherein the distance is a euclidean distance or a cosine distance.
- 5. The method of claim 1, wherein the target detection is based on a pre-trained YOLOv neural network, wherein the training samples are picture frames containing workers, and the labels are coordinates of the heads, hands and whole body of the corresponding workers in the picture frames.
- 6. The method of claim 1, further comprising correcting labels of the image frames of the detection errors, and adding head, hand and whole body feature maps of workers obtained by inputting the labels to the trained TRANSREID models after target detection to the feature library.
- 7. A smoking behavior detection system in industrial scene monitoring video is characterized by comprising a computer readable storage medium and a processor; the computer-readable storage medium is for storing executable instructions; The processor is configured to read executable instructions stored in the computer readable storage medium and perform the method of any one of claims 1-6.
Description
Smoking behavior detection method and system in industrial scene monitoring video Technical Field The invention belongs to the field of target detection, and particularly relates to a smoking behavior detection method and system in an industrial scene monitoring video. Background Smoking is harmful to health, pollutes air, causes other people to passively smoke, and in industrial scenes, smoking or randomly discarding cigarette ends can bring great potential safety hazard, and accidents such as fire are easy to cause. However, in the current production practice, manual inspection is mainly needed, smoking detection is performed, a large amount of manpower and material resources are consumed, the efficiency is low, and potential safety hazards cannot be found in time. With the rapid development of artificial intelligence, more and more deep learning algorithms are applied to smoking detection under solution, however, the current application is not wide enough due to low detection accuracy. Machine vision inspection technology is widely used in various fields as an important technology in the industry today. With the development of technology, there are existing smoking detection algorithms that detect smoking based on images, and various target detection algorithms, such as SSD algorithm, FASTER RCNN algorithm, YOLO algorithm, etc., are used to find that the lighted cigarette will give a smoking prompt alarm. However, the conventional detection scheme cannot meet the real-time performance, and the consumed resource cost is high. In a complex industrial scene, because the cigarettes in the monitoring video usually belong to small targets and the interference of the complex background, the traditional detection algorithm is easy to generate false detection or missing report of the cigarette targets. Disclosure of Invention Aiming at the defects or improvement demands of the prior art, the invention provides a smoking behavior detection method and a smoking behavior detection system in an industrial scene monitoring video, thereby solving the technical problem that the detection precision of the existing detection method is to be improved. To achieve the above object, according to a first aspect of the present invention, there is provided a smoking behavior detection method in an industrial scene monitoring video, including: S1, training a TRANSREID network by using a worker image data set, wherein the worker image data set comprises head, hand and whole body images of workers, which are obtained by performing target detection on each image frame in an industrial scene monitoring video; S2, carrying out target detection on the image frames of the workers to be detected to obtain head, hand and whole body images of the target workers, and inputting the head, hand and whole body images into a trained TRANSREID network to obtain head, hand and whole body feature images of the workers to be classified; s3, determining the probability of lighting cigarettes in the image frame area of the worker to be detected Wherein, the method comprises the steps of,Calculating the probability of the temperature value of the ith pixel point of the head, hand and whole body images of the target worker corresponding to the temperature of the lighted cigarette according to a Bayesian formula=,The temperature measurement result for the lighting cigarette isIs obtained from the temperature distribution function of the lit cigarettes,In order for the probability of lighting a cigarette to occur,To the temperature at the time of temperature measurementIs a probability of occurrence of (1); Determining the first M head, hand and whole body feature images of the workers closest to the head, hand and whole body feature images of the workers to be classified from the feature library, dividing the number of the head, hand and whole body feature images with smoking marks by M to obtain the probability p2, p3 and p4 of smoking behaviors in the head, hand and whole body areas of the image frames of the workers to be detected; and S4, if a is greater than a threshold value, considering that the smoking behavior exists in the to-be-detected worker image frame, and if not, judging that the smoking behavior exists in the to-be-detected worker image frame, wherein a, b, c and d are weight coefficients. According to a second aspect of the present invention there is provided a smoking behaviour detection system in an industrial scene surveillance video, comprising a computer readable storage medium and a processor; the computer-readable storage medium is for storing executable instructions; the processor is configured to read executable instructions stored in the computer readable storage medium and perform the method according to the first aspect. In general, the above technical solutions conceived by the present invention, compared with the prior art, enable the following beneficial effects to be obtained: 1. the method for detecting the smoking beha