Font Size: a A A

The Recognition Of Smoking Behavior Based On Deep Learning

Posted on:2022-01-29Degree:MasterType:Thesis
Country:ChinaCandidate:Z Z LiFull Text:PDF
GTID:2518306347481904Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
Smoking behavior recognition is an effective way to detect smoking.For the workshop where fireworks are banned,smoking not only affects the environment of the workshop,but also has a significant potential safety hazard as a fire.If it is not handled properly,it is easy to cause fire and other safety accidents.There are abundant monitoring resources in the factory,so it is of great practical significance to carry out intelligent detection and early warning of smoking line through the monitoring of the factory.With the development of computer vision,many methods of object detection and behavior recognition have emerged,which makes it possible to recognize smoking behavior based on video stream.This article first studies the current target detection and behavior recognition algorithms,and makes a comparative analysis of them.Traditional smoking detection methods based on image segmentation and key point detection have disadvantages such as low adaptability and low recognition rate.In the current deep learning methods,the method based on object detection can realize the detection of cigarette targets,this article experimented with cigarette target detection based on YOLOV5,but there are some problems,such as occlusion and stick like object false detection;the behavior recognition methods also have difficulties in creating video data sets,complex network structures,large computing resources and so on.To solve the above problems,this paper proposes a method of smoking behavior recognition based on face pre-positioning.The main tasks completed are as follows:First,in order to find the location of the smoking area in the image,a method based on face prepositioning is proposed.Firstly,the face coordinates are obtained by face detection,and then they are expanded and adjusted to include the image information of cigarette target,gesture and face area.Finally,the image of the desired target area is obtained by adjusting the coordinates.After obtaining the target area image,a pre-trained model is needed to judge the target area image.Therefore,the paper first built a smoking dataset,which consists of 1500 smoking pictures and 1500 nonsmoking pictures,and conducted batch processing with OpenCV to make it contain the image information related to smoking behavior as much as possible,so that the correct features can be extracted in the process of model training.Due to the small amount of data and limited computing resources,the method of transfer learning was adopted in the process of model training.Under the framework of Tensorflow deep learning,this article designs and optimizes the network structure of the model pre-trained on the ImageNet data set,and then trains on the self-built data set.The final experiment shows that the test accuracy could reach more than 98%.In order to intuitively judge whether the model has extracted the right features,this paper visualizes the convolutional neural network.Through the class activation heat map,it can be intuitively seen that the model has correctly extracted the features of the smoking areaAfter acquiring the target area and training the image recognition model,the model is deployed to the video stream for real-time detection.When the smoking behavior is detected,it will be judged and prompted.Through system timing,it is concluded that the time required to complete the detection of one frame of image under the experimental hardware conditions of this article is 0.128s,which can meet the requirements of real-time detection of video stream.In order to judge the identity of smokers,face recognition is carried out on the acquired face area.This method can effectively recognize smoking behavior in video stream,and can provide useful ideas and reference for other smoking behavior detection tasks based on image recognition.
Keywords/Search Tags:Video surveillance, Smoking detection, Face recognition, Image recognition, Transfer learning
PDF Full Text Request
Related items