| With the rapid development of economy,fire is often caused by intensive and improper use of electricity in daily life.In places where flammable materials are stored intensively,fire accidents often occur due to improper storage or operation by staff,resulting in serious losses.In recent years,many forest fires occurred due to high temperature weather,which caused serious damage to the ecological environment.Due to the rapid development of deep learning,many deep learning-based smoke detection methods have been proposed,but there are still problems such as insufficient accuracy of smoke detection and insufficient ability to adapt to real scenes.This paper proposes a smoke detection method based on deep learning,which mainly works in the following aspects:(1)In response to the issue of incomplete smoke datasets,in addition to publicly available smoke datasets,this article also supplements them through self shooting and online public videos.The dataset contains videos and images from multiple different scenes.After filtering,the relevant videos are frame sampled and expanded through flipping and other methods.(2)Aiming at the problem of low accuracy of smoke detection algorithm,this paper proposes a smoke detection algorithm based on improved YOLOv5.Firstly,Mosaic9 was used to increase the proportion of small target samples.Secondly,attention mechanism module is added to C3 module of Backbone to form C3AM,and partial convolution is replaced by RepVGG module,which ensures real-time performance and improves feature extraction ability of the algorithm.Then,the nearest neighbor interpolation upsampling method is replaced by CARAFE to reduce the loss of feature information.Finally,replacing CIOU with EIOU improves the regression accuracy of the prediction box and speeds up the convergence rate of the algorithm.Experiments show that the detection accuracy of the proposed algorithm is 90.7%,which is 6.1%,6.5%and 5.8%higher than that of YOLOv5,SSD and YOLOv7,respectively.In addition,aiming at the problem of poor smoke detection effect in bad weather,this paper uses CLAHE algorithm in image preprocessing stage,and combines the algorithm in this paper to carry out experiments in bad weather,and the detection accuracy can be improved to 88.1%.(3)In response to the insufficient functionality of the smoke detection system,this article implements the development of a deep learning based smoke detection system through PyQt5.The system includes four functional modules:user login and registration,smoke detection,smoke range visualization,and smoke movement direction visualization.Firstly,the smoke detection function is implemented using the algorithm proposed in this paper;Secondly,to distinguish between smoke and background,the Grad-CAM thermal map is used to visualize the smoke range;Finally,due to the variability of smoke movement direction,this paper realizes the visualization function of smoke movement direction through LK optical flow method,which can provide convenience for subsequent fire rescue.After testing,the system has good practicality and meets the needs of smoke detection. |