| In fire prevention and control work,timely and accurate detection of flame targets can effectively reduce the difficulty of fire fighting and minimize the loss of life and property in disaster situations.Therefore,efficient and real-time flame detection methods throughout the day have great significance for fire prevention and control work.important practical significance.Aiming at the problems of low detection accuracy,false detection,missed detection and poor detection effect of small targets in existing flame detection methods based on image processing,this paper constructs a multi-scene data set for training flame detection models,using YOLOv5 s target Based on the detection algorithm,object extraction and data enhancement are carried out on the flame image data,and a lightweight flame detection model that combines flame feature weighted attention is proposed.The main research contents are summarized as follows:(1)The research status of the flame detection task at home and abroad is expounded,the difference between the traditional image processing method and the detection method based on deep learning is introduced,and the problems existing in the detection accuracy and model size of the existing detection method are analyzed.Compared with the single-stage target detection algorithm,the YOLO series algorithm is selected as the basic model of this paper.(2)Combine the color space-based flame extraction method with the YOLOv5 s algorithm,and improve the Mosaic data enhancement strategy to improve network performance.In the YCb Cr color space,the difference in brightness and chromaticity between the flame and other backgrounds is used to segment and extract the flame area,reducing the complexity of the flame image,so that the network can avoid redundant information that has nothing to do with the flame during model training,and shorten the network.Training is time-consuming and speeds up network convergence.Secondly,the Mosaic data enhancement is improved,so that the enhanced image can avoid the image beyond the border of the frame,and the problem of losing the flame target in the original data enhancement method is improved.Finally,the effectiveness of flame extraction and data enhancement improvement is verified through ablation experiments.(3)A flame detection model YOLOv5s-FCA that fuses flame feature weighted attention is proposed.Taking the image extracted by the flame as input,an attention mechanism weighted by the flame color feature is constructed to generate a feature map mask with a higher correlation with the flame,and then the feature mask is applied to the original feature map,so that During network training,more attention is paid to flame targets,and more flame feature information is learned.Secondly,in order to improve the model’s ability to detect small target flames,an additional small target detection layer is added,and feature fusion is performed on the multi-layer feature maps before the detection head,and the shallow detail information and deep semantics of feature maps of each scale are balanced through different weights information.The effectiveness and practicability of the improvements were verified through ablation experiments.Compared with the original model,the accuracy and average accuracy of the improved model have been improved.Things such as poor performance have improved,and classification confidence has also improved.(4)Lightweight the improved model,combined with the improved YOLOv5s-FCA lightweight model to create a flame detection interactive interface,and form a fire prevention and control detection system with the network camera,and use the network camera screen as the input to monitor the video stream data in real time.Flame detection enables fire prevention and control workers to make corresponding decisions based on detection results in real time,providing effective assistance for actual fire prevention and control tasks. |