Forest fire identification method based on deep learning
By introducing deep learning techniques and specific optimization methods into traditional forest fire recognition methods, the problem of traditional methods being sensitive and poorly adaptable to light changes is solved, and more efficient and accurate forest fire detection is achieved.
Patent Information
- Application Number
- CN202411773038.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-11
AI Technical Summary
Traditional forest fire recognition methods are sensitive to changes in target light distortion and are difficult to adapt to complex and changeable forest scenes, resulting in inaccurate detection, slow speed, and limited application range.
The forest fire recognition method based on deep learning is adopted, YOLOv5s is used as the main detection model, and the attention mechanism, depth separation convolution and receptive field module are introduced on it to optimize the feature extraction and classification process.
It improves the detection accuracy and efficiency of shallow features of small target flames and smoke in forest fires, reduces the behavior of missed detection and missed detection, and improves the real-time performance of the algorithm.
Smart Images

Figure CN119810637A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fire identification, and in particular to a forest fire identification method based on deep learning. Background Art
[0002] Forest fires are a serious natural disaster that not only lead to the loss of biodiversity and the decline of ecosystem service functions, but also release a large amount of greenhouse gases, exacerbating global climate change. In addition, fires also cause direct economic losses to human society, threaten the safety of life and property of residents, and affect the sustainable use of forest resources. Once a forest fire breaks out and the fire is out of control, the consequences will be catastrophic, and it is very likely to cause serious damage to the forest structure and environment, and then cause the imbalance of the forest ecosystem, which will have a profound impact on the human living environment. If the forest in a certain area loses its original vegetation due to the ravages of multiple fires, then the forest in that area will become grassland or barren land.
[0003] Traditional recognition algorithms usually follow three basic steps: region selection, feature extraction, and classifier classification. In traditional recognition algorithms, region selection is the first step, and its core task is to comprehensively select all locations that potentially contain the detection target through a traversal strategy to provide candidate regions for subsequent processing; feature extraction is the second step, and its main purpose is to extract useful feature information from the target; the last step is to use a classifier to classify the target.
[0004] Traditional forest fire identification methods rely on complex image engineering and processing functions as well as information extraction techniques. These processes are usually followed by the use of classification or regression models to identify the target. However, this approach requires manual design of feature extraction algorithms and classifiers, so its application scope is relatively limited. In addition, traditional detection algorithms are very sensitive to changes in target illumination distortion, which can lead to inaccurate detection, slow speed, and difficulty adapting to complex and changing forest scenes. Therefore, traditional forest fire target detection methods are not suitable for actual forest fire detection tasks. Summary of the invention
[0005] In view of the shortcomings of the existing technology, the present invention provides a forest fire recognition method based on deep learning. In a detection environment with sufficient GPU computing resources, a forest fire detection algorithm based on a deep learning model is proposed for the characteristics of small target flames and shallow smoke in the early stage of forest fires in order to improve the accuracy and efficiency of forest fire detection. This model can achieve faster detection performance while maintaining high accuracy to meet the actual needs of forest fire detection.
[0006] The technical solution adopted by the present invention to solve the above technical problems is: a forest fire identification method based on deep learning, the method comprising the following steps:
[0007] Step 1: Collect forest fire image data and use Label Img to annotate the collected data. The annotated data supports the comprehensive training of the model.
[0008] Step 2: Use YOLOv5s as the main detection model, change some convolutions of its backbone network to depth-wise separable convolutions, change the pooling pyramid SPPF to the receptive field module RFB, and add an attention mechanism module before the receptive field module;
[0009] Step 3: Feature extraction;
[0010] Step 4: Use the receptive field module RFB to fuse the features;
[0011] Step 5: Use depth-wise separable convolution to reduce network structure parameters;
[0012] Step 6: Send the labeled data to the improved model for training. The obtained weight file is tested through the test set to verify the generalization ability of the model. At the same time, the test data is sent to the model for detection to obtain the detection results, thereby realizing forest fire identification.
[0013] Preferably, in step 2, the model introduces a convolutional attention mechanism to perform dual attention on the spatial and channel characteristics of forest fire target features.
[0014] Preferably, the specific steps of step three are:
[0015] First, the input feature map is processed by global maximum pooling and global average pooling respectively to obtain two channel sub-modules;
[0016] Then, these two modules are fed into a two-layer neural network to learn the importance weight of each channel;
[0017] Finally, the learned weights are multiplied by the original feature map to obtain the weighted feature map.
[0018] Preferably, the specific steps of step three are:
[0019] The spatial attention is as follows: first, global maximum pooling and global average pooling operations are used to aggregate the spatial information of the feature map to obtain two different channel sub-modules;
[0020] Subsequently, the two channel submodules are concatenated along the channel dimension, and a convolutional layer is used to reduce the dimension of the concatenated module to obtain a spatial attention map.
[0021] Finally, the spatial attention map is multiplied element-by-element with the original feature map to obtain the final weighted feature map. The entire processing process is shown in the following formula:
[0022]
[0023] Preferably, the specific steps of step three are:
[0024] The depth-wise separable convolution is used to reduce the parameters of the network structure, which consists of two smaller operations: depth-wise convolution and point-wise convolution. Depth-wise convolution means that one convolution kernel is responsible for one channel, and one channel is convolved by only one convolution kernel.
[0025] Beneficial effects of the present invention:
[0026] 1. To address the problem of missed and false detection of small targets in early forest fires, the core optimizations of the YOLOv5 algorithm include introducing the attention mechanism, optimizing the activation function, improving the spatial pooling pyramid, and optimizing the convolution layer. This not only ensures the detection accuracy, but also improves the real-time performance of the algorithm, which can effectively improve the detection accuracy and speed, and also reduce missed and false detections. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0028] Figure 1 It is the overall structure flow chart of the present invention;
[0029] Figure 2 It is a model annotation schematic diagram of the present invention;
[0030] Figure 3 It is the improved YOLOv5s network structure diagram of the present invention;
[0031] Figure 4 is a structural diagram of the attention mechanism of the present invention;
[0032] Figure 5 It is a structural diagram of the receptive field module of the present invention;
[0033] Figure 6 It is a diagram of the depthwise separable convolution structure of the present invention. DETAILED DESCRIPTION
[0034] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.
[0035] See also Figure 1-Figure 6 , a forest fire identification method based on deep learning, the method comprises the following steps:
[0036] Step 1: Collect forest fire image data and use Label Img to annotate the collected data. The annotated data supports the comprehensive training of the model.
[0037] Step 2: Use YOLOv5s as the main detection model, change some convolutions of its backbone network to depth-wise separable convolutions, change the pooling pyramid SPPF to the receptive field module RFB, and add an attention mechanism module before the receptive field module;
[0038] Step 3: Feature extraction;
[0039] Step 4: Use the receptive field module RFB to fuse the features;
[0040] Step 5: Use depth-wise separable convolution to reduce network structure parameters;
[0041] Step 6: Send the labeled data to the improved model for training. The obtained weight file is tested through the test set to verify the generalization ability of the model. At the same time, the test data is sent to the model for detection to obtain the detection results, thereby realizing forest fire identification.
[0042] Preferably, in step 2, the model introduces a convolutional attention mechanism to perform dual attention on the spatial and channel characteristics of forest fire target features.
[0043] Preferably, the specific steps of step three are:
[0044] First, the input feature map is processed by global maximum pooling and global average pooling respectively to obtain two channel sub-modules;
[0045] Then, these two modules are fed into a two-layer neural network to learn the importance weight of each channel;
[0046] Finally, the learned weights are multiplied by the original feature map to obtain the weighted feature map.
[0047] Preferably, the specific steps of step three are:
[0048] The spatial attention is as follows: first, global maximum pooling and global average pooling operations are used to aggregate the spatial information of the feature map to obtain two different channel sub-modules;
[0049] Subsequently, the two channel submodules are concatenated along the channel dimension, and a convolutional layer is used to reduce the dimension of the concatenated module to obtain a spatial attention map.
[0050] Finally, the spatial attention map is multiplied element-by-element with the original feature map to obtain the final weighted feature map. The entire processing process is shown in the following formula:
[0051]
[0052] Preferably, the specific steps of step three are:
[0053] Step 2 uses depthwise separable convolution to reduce the parameters of the network structure. It consists of two smaller operations: depthwise convolution and pointwise convolution. Depthwise convolution means that one convolution kernel is responsible for one channel, and one channel is convolved by only one convolution kernel.
[0054] Better capture the key features of the feature map, improve the ability to detect small target flames, and thus improve the performance of the model. In order to enhance the network's extraction of shallow smoke features and small target flames, this paper proposes a solution to use a receptive field module to replace the pooling pyramid to capture target information at different scales. Finally, the depth-separable convolution is improved to reduce network parameters and improve the detection speed of the algorithm. The network structure diagram is shown in the figure below. Figure 3 shown.
[0055] Step 3: For feature extraction, we use CBAM, which stands for Convolutional Block Attention Module. It is an attention mechanism module that combines channel attention and spatial attention. Figure 2 It can be seen that CBAM contains two modules, namely the channel attention module and the spatial attention module. In terms of channel attention, CBAM adopts a squeeze-and-excitation strategy similar to that in SENet.
[0056] The specific steps of step 3 are as follows: first, the input feature map is processed by global maximum pooling and global average pooling respectively to obtain two channel submodules, and then the two modules are respectively sent to a two-layer neural network (MLP) to learn the importance weight of each channel. Finally, the learned weight is multiplied with the original feature map to obtain a weighted feature map.
[0057] In terms of spatial attention, CBAM further considers the spatial information of the feature map. It first uses global maximum pooling and global average pooling operations to aggregate the spatial information of the feature map to obtain two different channel sub-modules. Subsequently, the two channel sub-modules are spliced along the channel dimension, and a convolutional layer is used to reduce the dimension of the spliced modules to obtain a spatial attention map. Finally, the spatial attention map is multiplied element-by-element with the original feature map to obtain the final weighted feature map. The entire processing process is shown in formula (1):
[0058]
[0059] Its network structure diagram is as follows Figure 4 shown.
[0060] Step 4: Use the receptive field module RFB to fuse the features. RFB is a network structure used to enhance the receptive field and feature extraction capabilities of convolutional neural networks (CNNs). The RFB module achieves multi-scale feature fusion by combining convolution kernels of different sizes and atrous convolution (also called dilated convolution or expanded convolution). This design not only expands the receptive field of the model, but also enables the model to process input information of different scales simultaneously. In the RFB module, it usually contains multiple parallel branches, each branch using convolution kernels of different sizes and dilation rates. The output feature maps of these branches are then fused by concatenation or addition to form a feature representation with rich multi-scale information.
[0061] In order to improve the detection accuracy of small-sized defect targets, the RFB module significantly expands the receptive field by integrating the hole convolution and additive connection technology, thereby accurately capturing target information of different scales. At the same time, the module effectively reduces the loss of resolution while maintaining the integrity of the feature map detail information, ensuring the efficient transmission and utilization of information.
[0062] The RFB module structure diagram is as follows Figure 5 In order to reduce the number of parameters, the 3×3 convolution of the second branch is replaced by 1×3 convolution, the 3×3 convolution of the third branch is replaced by 3×1 convolution, and the 5×5 convolution of the fourth branch is replaced by 3×3 convolution.
[0063] Step 5. Use depthwise separable convolution to reduce the parameters of the network structure. It is a plug-and-play module widely used in the structure of convolutional neural network models. It can handle not only the spatial dimension but also the depth dimension (the number of channels). It mainly consists of two smaller operations: depthwise convolution and pointwise convolution. Depthwise convolution means that one convolution kernel is responsible for one channel, and one channel is convolved by only one convolution kernel, which is equivalent to collecting the spatial features of each channel. Its main purpose is to perform independent convolution calculations on each input channel. This means that each convolution kernel is associated with only one input channel and only performs convolution operations on that channel. This operation method helps the model better capture the spatial features within each channel. The core operation of pointwise convolution is to convolve the output of depthwise convolution with a 1×1 convolution kernel. This convolution method does not change the spatial size of the feature map, but can perform weighted combination in the channel dimension, thereby achieving dimensionality increase or dimensionality reduction operations on the feature map. Through pointwise convolution, the model can fuse information between different channels and further improve the expressiveness of features. Compared with the standard convolution operation, the number of parameters and computational complexity of point-by-point convolution are relatively small. The total computational cost is shown in formula (2):
[0064] C ds =D K ×D K ×M×D F ×D F +M×N×D F ×D F (2)
[0065] Its network structure diagram is as follows Figure 6 shown.
[0066] Step 6: Send the labeled data to the improved model for training. The obtained weight file is tested with the test set to verify the generalization ability of the model. At the same time, the test data is sent to the model for detection to obtain the test results.
[0067] In order to solve the problem of missed detection and false detection of small targets in early forest fires, the core optimization of the YOLOv5 algorithm includes introducing the attention mechanism, optimizing the activation function, improving the spatial pooling pyramid, and optimizing the convolution layer, so as to ensure the detection accuracy and improve the real-time performance of the algorithm. The algorithm first introduces the attention mechanism CBAM to improve the confidence of the model; secondly, the SPPF is changed to RFB, which can enhance the receptive field of the neck network, capture feature information at different scales, and reduce the resolution loss of the feature map while retaining the information details; to further improve the accuracy of smoke and fire detection, this paper also optimizes the activation function; at the same time, in order to reduce the number of neural network parameters and improve the detection speed, some convolution layers are replaced by depthwise separable convolution. This convolution structure consists of two parts: depthwise convolution and pointwise convolution. The depthwise convolution only operates on a single input channel, while the pointwise convolution linearly combines the results of the depthwise convolution, thereby significantly reducing the number of parameters.
[0068] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of the present invention is defined by the attached claims and their equivalents.
Claims
1. A forest fire identification method based on deep learning, characterized by: The method comprises the following steps: Step 1: Collect forest fire image data and use LabelImg to annotate the collected data. The annotated data supports comprehensive training of the model. Step 2: Use YOLOv5s as the main detection model, change some convolutions of its backbone network to depth-wise separable convolutions, change the pooling pyramid SPPF to the receptive field module RFB, and add an attention mechanism module before the receptive field module; Step 3: Feature extraction; Step 4: Use the receptive field module RFB to fuse the features; Step 5: Use depth-wise separable convolution to reduce network structure parameters; Step 6: Send the labeled data to the improved model for training. The obtained weight file is tested through the test set to verify the generalization ability of the model. At the same time, the test data is sent to the model for detection to obtain the detection results, thereby realizing forest fire identification.
2. A forest fire identification method based on deep learning according to claim 1, characterized in that: In the step 2, the model introduces a convolutional attention mechanism to pay dual attention to the spatial and channel characteristics of the forest fire target.
3. A forest fire identification method based on deep learning according to claim 2, characterized in that: The specific steps of step three are: First, the input feature map is processed by global maximum pooling and global average pooling respectively to obtain two channel sub-modules; Then, these two modules are fed into a two-layer neural network to learn the importance weight of each channel; Finally, the learned weights are multiplied by the original feature map to obtain the weighted feature map.
4. The forest fire identification method based on deep learning according to claim 2, characterized in that: The specific steps of step three are: The spatial attention is as follows: first, global maximum pooling and global average pooling operations are used to aggregate the spatial information of the feature map to obtain two different channel sub-modules; Subsequently, the two channel submodules are concatenated along the channel dimension, and a convolutional layer is used to reduce the dimension of the concatenated module to obtain a spatial attention map. Finally, the spatial attention map is multiplied element-by-element with the original feature map to obtain the final weighted feature map. The entire processing process is shown in the following formula: 。 5. A forest fire identification method based on deep learning according to claim 4, characterized in that: The specific steps of step three are: The depth-wise separable convolution is used to reduce the parameters of the network structure, which consists of two smaller operations: depth-wise convolution and point-wise convolution. Depth-wise convolution means that one convolution kernel is responsible for one channel, and one channel is convolved by only one convolution kernel.
Citation Information
Patent Citations
Method for patrol inspection of power transformation equipment by unmanned aerial vehicle in complex scene
CN117392568A
Power distribution network insulator high-precision detection method and system
CN117710297A
Forest fire detection method based on deep learning
CN118230202A
Overhead ground wire defect detection method based on improved YOLOv5 enhanced fuzzy features
CN118968210A