Forest fire detection method based on improved YOLO v11 algorithm
By improving the YOLO v11 algorithm and combining DGConv, MonaLayer, SEFN and attention mechanisms, the forest fire detection model was optimized, solving the problems of high computational cost and difficulty in feature extraction, and achieving efficient and accurate flame and smoke recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUILIN UNIV OF ELECTRONIC TECH
- Filing Date
- 2026-01-16
- Publication Date
- 2026-04-21
AI Technical Summary
Existing forest fire detection algorithms are computationally intensive, the models are not lightweight enough, making them difficult to deploy on edge devices. Flame feature extraction is also challenging. Furthermore, forest fire scenarios are complex and the quality of datasets varies, leading to misjudgments in the identification of small targets.
In the YOLO v11 model, the DGConv module is fused with the C3k2 module to form DG-C3k2, the MonaLayer module is added, and the SEFN module is introduced in the Neck part. Combined with pruning, distillation and attention mechanisms SimAM and ECA, the model structure is optimized, the computational cost is reduced and the feature extraction capability is enhanced.
A lightweight forest fire detection model has been implemented, which improves the target detection accuracy in complex environments, is compatible with edge devices, and enhances the accuracy and generalization ability of flame and smoke identification.
Smart Images

Figure CN121904701A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of forest fire target detection technology, specifically relating to a forest fire detection method based on an improved YOLO v11 algorithm. Background Technology
[0002] People are paying increasing attention to the ecological environment, especially the protection of forests. This necessitates the detection and prevention of early forest fires, continuing identification in the early stages when flames are small, and improving the accuracy of flame and smoke recognition and detection in images and videos. Traditional forest fire monitoring methods suffer from inefficiency, a shortage of forest rangers, high costs, and susceptibility to weather conditions, leading to missed detections and low accuracy in forest fire identification. With the rapid development of deep learning technology, researchers have continuously proposed various improved algorithm models and applied them to various detection fields to improve detection accuracy. To apply target detection technology to real-world scenarios, fire detection based on computer vision, combined with environmental protection and carbon emissions, has attracted much research. Among them, the YOLO series of algorithms has become the first choice for target detection due to its simplicity and high detection accuracy, demonstrating excellent performance in target detection, pose correction, and other fields. The YOLO series of algorithms has evolved from YOLOv1 to YOLOv8, with each version having its own advantages and disadvantages, while continuously improving detection accuracy, performing excellently in the field of forest fire detection. Currently, there are various challenges in the process of forest fire detection and identification, among which the main difficulties include:
[0003] (1) Forest fire detection algorithms have a large computational load, the models are not lightweight enough, and it is difficult to deploy them on edge devices;
[0004] (2) Flames have rich dynamic and static characteristics and their features vary greatly. In addition, forest scenes have problems such as variable lighting and background interference, making it difficult to fully extract the essential features of flames. Especially for small targets, the recognition process is prone to misjudgment.
[0005] (3) Forest fire scenarios are complex and diverse, while the quality of publicly available forest fire datasets varies and the number of samples is limited. In addition, there are very few images of small target flames in publicly available datasets, which leads to the YOLO network model's insufficient ability to extract features of small targets. Summary of the Invention
[0006] To address the aforementioned problems, this invention provides a forest fire detection method based on an improved YOLO v11 algorithm, the specific technical solution of which is as follows:
[0007] Step S1: Download the public dataset and collect images of forest fires and smoke through the network platform and perform preliminary processing, deleting some images with very poor resolution. Then, perform target annotation on the filtered data sample images and randomly divide the dataset images and corresponding annotation files into three parts: train, vali, and text according to the proportion to create the required dataset.
[0008] Step S2: Introduce the DGConv module into the Backbone backbone, then merge it with the C3k2 module to obtain the DG-C3k2 module. This will replace the C3k2 module in the original model backbone. Then, introduce the MonaLayer module to finally obtain the improved Backbone backbone, enhancing the model.
[0009] Type feature extraction capability.
[0010] Step S3: Based on the improved YOLO v11 model in Step 2, a spatial augmentation feedforward network SEFN is introduced into the Neck part to replace the Concat operation of YOLOv11. Then, through pruning and distillation, attention mechanisms SimAM and ECA are introduced to finally obtain the improved lightweight YOLO v11 model.
[0011] Step S4: Perform inference and training on the improved model. Based on the dataset obtained in Step S1, iteratively train the improved model using the training and validation sets for 100 training iterations, allowing the model to learn the features of flames and smoke. After iterative training, an optimal model will be obtained. Adjust the weight parameters and the number of iterations based on the experimental results. If the relevant model performance metrics are high, this optimal model will be used to validate the model's performance.
[0012] Step S5: After completing the self-made dataset and improving the YOLOv11 network model, select the optimal model obtained in Step S4 as the test model. Use the text dataset as input to perform fire and smoke recognition. Finally, based on the results, i.e., recall, accuracy, and MAP... 50 MAP 50-95 The detection effect and generalization ability of the model are evaluated using indicators such as these, and the performance of the model is judged.
[0013] Preferably, step S1 specifically includes the following steps:
[0014] Step S11: Process and filter the collected fire and smoke images, remove some blurry, duplicate frames and low-resolution images, and then use data augmentation methods to expand the sample size of the dataset and optimize the image quality of the dataset, which includes both fire and non-fire images. Save all images to the Images folder.
[0015] Step S12: After collecting the images, open the Labels tool using the Anaconda Prompt application and begin labeling the images in the Images folder sequentially. Before labeling, save the results in YOLO format so that the dataset's label format is compatible with the YOLO model. When labeling, try to completely enclose the target with a box. The label categories include Smoke and Fire. Do not perform any operations on images that do not contain fire-related information. The final labeling results are saved in the Labels folder. It is important to note that the labels must correspond to the categories.
[0016] Step S13: After labeling all the images, use Python code to randomly divide the labels in the Labels folder and the images in the Images folder into three parts: train, vali, and text, in a ratio of 8:1:1, to obtain a self-made forest fire dataset.
[0017] Preferably, step S2 specifically includes the following steps:
[0018] Step S21: First, improve the model's backbone: Based on the principles of DWConv convolution and GhostConv modules, combine the two to propose the DGConv module, retaining the advantages of both. Then, combine DGConv with the C3k2 module in the YOLOv11 backbone to form the DG-C3k2 module, replacing the original C3k2 module.
[0019] Step S22: Then make a second improvement to the model’s backbone: introduce the MonaLayer module to replace the original SPPF operation, that is, embed the module before the C2PSA module.
[0020] Preferably, step S3 specifically includes the following steps:
[0021] Step S31: After optimizing the YOLO v11 backbone, a Spatial Augmentation Feedforward Network (SEFN) module is introduced, which demonstrates good performance in enhancing spatial awareness. Based on the characteristics of the SEFN module, it is embedded in the model's neck, replacing the role of the Contact module. Through the preceding processing, the components of the YOLO v11 backbone and neck are improved, and the corresponding code in the model network is modified to complete the improvement of the YOLO v11 model—the improved algorithm.
[0022] Step S32: Then, model pruning and knowledge distillation are performed. First, model pruning is performed on the optimized YOLO v11 algorithm, removing channels and layers with small weights or redundancy, directly reducing the number of parameters with small weights. Then, the network architecture is designed using a teacher-student knowledge model approach. Accordingly, the lightweight "student model" is the pruned model described above, while the "teacher model" is the original model obtained in step S31. Specifically, the "teacher model" uses the Soft max method to generate soft labels rich in inter-class relationships as knowledge carriers to guide the student model's learning. On the other hand, the "student model" is also tested on the dataset. These two approaches are used to optimize the performance of the "student model" so that it is infinitely close to the superior performance of the "teacher model".
[0023] Step S33: Next, add attention mechanisms SimAM and ECA to the compressed model. The complementary nature of these two mechanisms enhances the model's accuracy in grasping key information. The attention mechanism ECA focuses on edge features. Specifically, the input features are processed through two fully connected layers and a 1D convolutional layer to obtain the information relationships between different channels. The 1D convolutional layer uses an adaptive convolutional kernel to capture the relationships between channels. The size of this kernel can be adjusted according to the number of channels c. The corresponding calculation formula is as follows:
[0024]
[0025] Where c is the number of channels. b are hyperparameters used to adjust the kernel size (scaling and offset).
[0026] Based on the previous steps, we obtain the improved YOLO v11 lightweight model, which is then used for subsequent training and performance testing, i.e., steps S4 and S5.
[0027] Preferably, step S4 includes the following specific steps:
[0028] Step S41: Iteratively train the improved model using the training set samples obtained in Step S1, and then perform validation and evaluation. Pre-set training parameters such as the number of training rounds and iterations, and train and infer the `train` and `vali` datasets. The experimental results directly show performance metrics such as recall, accuracy, and F1 score, allowing verification of whether the improved model's performance metrics have increased. Adjust the training weight parameters based on the actual results until the training samples produce a relatively accurate result in the model, obtaining the optimal model and training weight parameters. Finally, use the validation dataset (`vali`) as input to validate the model's performance metrics and obtain the optimal network model.
[0029] The beneficial effects of this invention: Compared with the prior art, this invention proposes a forest fire detection algorithm based on an improved YOLO v11:
[0030] 1. To address the high computational cost of fire detection algorithms, the MonaLayer module is introduced into the YOLO v11 model. This module can extract target feature information from different angles and effectively fuse features without increasing computational cost or parameters, thereby improving target detection accuracy in complex environments.
[0031] 2. To address the issue of multi-scale targets in the dataset, a Spatial Augmentation Feedforward Network (SENF) is introduced to acquire multi-scale feature information, achieve spatially adaptive feature enhancement, and improve spatial perception capabilities in image representation learning.
[0032] 3. To address the issues of complex models and high computational load, pruning and distillation operations are used to reduce model parameters and computational load, compress the model, effectively solve the hardware computing power limitations of traditional model deployment, and adapt it to edge devices such as drones.
[0033] 4. By combining downloaded public datasets and Baidu Images for filtering, the number of samples can be increased while the quality of the dataset can be improved, and the required dataset can be created. Attached Figure Description
[0034] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, a brief description of the specific embodiments or the prior art will be given below in conjunction with the relevant accompanying drawings.
[0035] Appendix Figure 1 Flowchart of Forest Fire Detection Based on Improved YOLO v11 Algorithm
[0036] Appendix Figure 2 : Structure diagram of the improved YOLO v11 algorithm model
[0037] Appendix Figure 3 :DWConv and GhostConv module combination structure diagram
[0038] Appendix Figure 4 MonaLayer module structure diagram
[0039] Appendix Figure 5 SimAM attention mechanism structure diagram Detailed Implementation
[0040] The technical solutions in the embodiments of the present invention will be clearly described below with reference to the accompanying drawings. The technical solutions of the present invention are highly flexible. The described embodiments are only some examples of the present invention and are merely illustrations. Others skilled in the art can flexibly adjust the implementation methods according to actual conditions and the technical solutions of the present invention.
[0041] In this example, combined with the appendix Figure 1 A forest fire detection method based on an improved YOLO v11 algorithm, the main steps of which are as follows:
[0042] Step S1: Download the public dataset and collect images of forest fires and smoke through the network platform and perform preliminary processing, deleting some images with very poor resolution. Then, perform target annotation on the filtered data sample images and randomly divide the dataset images and corresponding annotation files into three parts: train, vali, and text according to the proportion to create the required dataset.
[0043] Step S2: Introduce the DGConv module into the Backbone backbone, and then merge it with the C3k2 module to obtain the DG-C3k2 module. This will replace the C3k2 module in the original model backbone. Then, introduce the MonaLayer module to finally obtain the improved Backbone backbone, which enhances the model's feature extraction capability.
[0044] Step S3: Based on the improved YOLO v11 model in Step 2, a spatial augmentation feedforward network SEFN is introduced into the Neck part to replace the Concat operation of YOLOv11. Then, through pruning and distillation, attention mechanisms SimAM and ECA are introduced to finally obtain the improved lightweight YOLO v11 model.
[0045] Step S4: Perform inference and training on the improved model. Based on the dataset obtained in Step S1, iteratively train the improved model using the training and validation sets for 100 training iterations, allowing the model to learn the features of flames and smoke. After iterative training, an optimal model will be obtained. Adjust the weight parameters and the number of iterations based on the experimental results. If the relevant model performance metrics are high, this optimal model will be used to validate the model's performance.
[0046] Step S5: After completing the self-made dataset and improving the YOLOv11 network model, select the optimal model obtained in Step S4 as the test model. Use the text dataset as input to perform fire and smoke recognition. Finally, based on the results, i.e., recall, accuracy, and MAP... 50 MAP 50-95 The detection effect and generalization ability of the model are evaluated using indicators such as these, and the performance of the model is judged.
[0047] Preferably, in step S1 of this example, publicly available datasets and relevant forest fire images from the internet are downloaded from the Kaggle and Baidu PaddlePaddle AI platforms and merged to form a new dataset. Since some images in the publicly available dataset are consecutive frames with little difference, this can easily lead to excessive repetition and redundancy. Therefore, a simple preliminary screening and processing is performed on the dataset images to remove duplicate photos, select images that meet the requirements as dataset samples, and then use Python code or drawing software to standardize the image format, changing the image extension to .jpg and renaming them according to their sequence number.
[0048] Then, Anaconda Prompt was opened to use the Labels annotation tool to perform target classification annotations on the dataset images, including Smoke and Fire categories. Specifically, the images were saved in YOLO format before annotation, eliminating the need to convert XML files to TXT files and directly conforming to the YOLO model standard. Then, the annotations and collected images were divided into three parts—train, vari, and text—in an 8:1:1 ratio using Python code, resulting in a self-made forest fire dataset. This invention collected a total of 9600 valid images (including images without fires), which were randomly divided in an 8:1:1 ratio: 7680 images for training, 960 images for vari, and 960 images for test.
[0049] Preferably, in steps S2 and S3 of this example, in conjunction with the appendix Figure 2The improved YOLO v11 algorithm mainly consists of three parts: Backbone, Neck, and Head. The left side is the Backbone, which consists of 11 modules. The input image first undergoes continuous convolution operations to extract basic features, and then after three rounds of DG-C3k2 and Conv continuous operations, the feature details are gradually extracted and enhanced. The MonaLayer module is used to extract feature information from multiple angles, strengthening the extraction of target detail information and focusing on small target features. The Backbone can enhance the feature extraction capability of the YOLO v11 algorithm through improvement. The corresponding improvements are: (1) Introducing the DWConv and GhostConv modules to replace the ordinary convolution conv in the original C3k2 module, and proposing the DG-C3k2 module to enhance multi-scale information extraction; (2) Introducing the MonaLayer module to replace the original SPPF operation, which enhances feature extraction from multiple angles. The Neck part mainly consists of upsampling, upsampling, and stitching. It gradually transmits feature information through two paths: top-down and bottom-up, and performs deep and shallow feature fusion processing to retain key information. The corresponding improvement involves introducing a spatial feedforward network (SEFN) to replace the original concat operation. Compared to simple concat, SEFN can enhance feature representation, perform deeper feature concatenation and fusion, improve the model's utilization of spatial context, and enhance model performance.
[0050] Preferably, in step S21 of this example, in conjunction with the appendix Figure 3 The DGConv module is designed and proposed based on the DWConv and GhostConv modules, with the aim of enhancing feature extraction for small targets. Specifically: for a given input feature F∈R C*H*W It first undergoes feature extraction via DWConv to obtain more feature information, denoted as feature F. 1 The LearningDeformation module preprocesses F 1 Features are dynamically adjusted in terms of geometry through spatial deformation; adaptive focus is placed on important regions. Next, the GhostConv operation is performed. The GhostConv module mainly consists of regular convolutions and inexpensive depthwise convolutions. Regular convolutions generate some feature maps, while inexpensive depthwise convolutions generate "phantom" features. The two feature sets are then fused to obtain diverse features F. 2 Finally, the feature F is concatenated. 1 and F 2 Obtain enhanced features F containing more information and greater diversity. 3, This process, through channel shuffling, can enhance information flow and achieve multi-level feature fusion.
[0051] Preferably, in step S22 of this example, in conjunction with the appendix Figure 4 The specific steps of the MonaLayer module are as follows: For the input feature map, the top of the module has a normalization layer and two learning weights, which will adjust the passed-in feature distribution for optimization. Then, after the downprojection operation, three depthwise separable convolutions with different kernel sizes will process its upstream features from different scales, and the corresponding average results are calculated. Then, the features are aggregated through 1x1 convolutions to enhance the model's adaptability, and after GeLU nonlinearization, the original feature size is finally restored by upprojection.
[0052] Preferably, in step S31 of this example, the specific steps of the SEFN module are as follows: The features before the SEM block are processed twice consecutively by 3x3 convolution, normalization, and activation function to obtain spatial attention weights y. Then, this attention map y is processed by 1x1 convolution, 3x3 depthwise convolution, and activation function to obtain a gate signal "gate". Then, this signal "gate" is multiplied point-by-point with the features after the SEM block, so that the features can be modulated according to the spatial attention weights.
[0053] Preferably, in conjunction with the appendix Figure 5 In step S41 of this example, a simple, parameter-free attention mechanism, SimAM, is introduced. This module converts features into three-dimensional weights, which are then multiplied by the weights of the target neuron and the features of the feature map to generate the final output feature map. After processing by SimAM, the original input feature map is multiplied by the attention weights channel by channel to obtain relatively complete three-dimensional image weights. In each three-dimensional weight sub-map, a consistent color indicates that each channel is assigned a scalar value related to these elements, thus obtaining different weight outputs for each channel. After these three-dimensional weights are processed by the Sigmoid function, the Sigmoid maps the input to the 0~1 interval to represent the weights of different channels. The weights of different channels are then multiplied by the input features to obtain the final output feature map. The corresponding calculation formula is as follows:
[0054]
[0055] Wherein, the linear change with respect to t is: and These two parts, where t represents the target neuron within a single channel of the input features, and x i M represents the number of neurons within a single channel, excluding the target neuron t. Furthermore, linear operations also require the introduction of w. t and b t The two weight vectors are calculated using the following formulas:
[0056]
[0057]
[0058]
[0059]
[0060] in, This represents the average number of neurons within the channel. 2 The variance is represented by , and both distributions follow a normal distribution.
Claims
1. A forest fire detection method based on an improved YOLO v11 algorithm, characterized in that, Includes the following steps: Step S1: Download the public dataset and collect images of forest fires and smoke through the network platform and perform preliminary processing, deleting some images with very poor resolution. Then, perform target annotation on the filtered data sample images and randomly divide the dataset images and corresponding annotation files into three parts: train, vali, and text according to the proportion to create the required dataset. Step S2: Introduce the DGConv module into the Backbone backbone, and then merge it with the C3k2 module to obtain the DG-C3k2 module. This will replace the C3k2 module in the original model backbone. Then, introduce the MonaLayer module to finally obtain the improved Backbone backbone, which enhances the model's feature extraction capability. Step S3: Based on the improved YOLO v11 model in Step 2, a spatial augmentation feedforward network SEFN is introduced into the Neck part to replace the Concat operation of YOLOv11. Then, through pruning and distillation, attention mechanisms SimAM and ECA are introduced to finally obtain the improved lightweight YOLO v11 model. Step S4: Perform inference and training on the improved model. Based on the dataset obtained in Step S1, iteratively train the improved model using the training and validation sets for 100 training iterations, allowing the model to learn the features of flames and smoke. After iterative training, an optimal model will be obtained. Adjust the weight parameters and the number of iterations based on the experimental results. If the relevant model performance metrics are high, this optimal model will be used to validate the model's performance. Step S5: After completing the self-made dataset and improving the YOLOv11 network model, select the optimal model obtained in Step S4 as the test model. Use the text dataset as input to perform fire and smoke recognition. Finally, based on the results, i.e., recall, accuracy, and MAP... 50 MAP 50-95 The detection effect and generalization ability of the model are evaluated using indicators such as these, and the performance of the model is judged.
2. The forest fire detection method based on the improved YOLO 11 algorithm according to claim 1, characterized in that, Step S1 specifically includes the following steps: Step S11: Process and filter the collected fire and smoke images, remove some blurry, duplicate frames and low-resolution images, and then use data augmentation methods to expand the sample size of the dataset and optimize the image quality of the dataset, which includes both fire and non-fire images. Save all images to the Images folder. Step S12: After collecting the images, open the Labels tool using the Anaconda Prompt application and begin labeling the images in the Images folder sequentially. Before labeling, save the results in YOLO format so that the dataset's label format is compatible with the YOLO model. When labeling, try to completely enclose the target with a box. The label categories include Smoke and Fire. Do not perform any operations on images that do not contain fire-related information. The final labeling results are all saved in [file name - likely a file name]. It is important to note that the labels must correspond to the categories. Step S13: After labeling all the images, use Python code to randomly divide the labels in the Labels folder and the images in the Images folder into three parts: train, vali, and text, in a ratio of 8:1:1, to obtain a self-made forest fire dataset.
3. The forest fire detection method based on the improved YOLO 11 algorithm according to claim 1, characterized in that, Step S2 specifically includes the following steps: Step S21: First, improve the model's backbone: Based on the principles of DWConv convolution and GhostConv modules, combine the two to propose the DGConv module, retaining the advantages of both. Then, combine DGConv with the C3k2 module in the YOLOv11 backbone to form the DG-C3k2 module, replacing the original C3k2 module. Step S22: Then make a second improvement to the model’s backbone: introduce the MonaLayer module to replace the original SPPF operation, that is, embed the module before the C2PSA module.
4. A forest fire detection method based on an improved YOLO 11 algorithm according to claim 3, characterized in that, In step S22, the MonaLayer module, for the input feature map, has a normalization layer and two learned weights at the top. These two parts adjust the distribution of the passed-in features, optimizing the distribution of the input features. Then, after the downprojection operation, three depthwise separable convolutions with different kernel sizes process the upstream features at different scales. The corresponding average result is calculated. Then, the feature is aggregated through 1x1 convolution to enhance the model's adaptability. After GeLU nonlinearization, the original feature size is finally restored by top projection.
5. A forest fire detection method based on an improved YOLO 11 algorithm according to claim 1, characterized in that, Step S3 specifically includes the following steps: Step S31: After optimizing the YOLO v11 backbone, the Spatial Augmentation Feed Network (SEFN) module is introduced. This module shows good performance in enhancing spatial awareness. Based on the characteristics of the SEFN module, it is embedded in the model's neck, replacing the role of the Contact module. Through the preceding processing, the components of the YOLO v11 backbone and neck are improved, and the corresponding code in the model network is modified to complete the improvement of the YOLO v11 model—the improved algorithm. Step S32: Then, model pruning and knowledge distillation are performed. First, model pruning is performed on the optimized YOLOv11 algorithm using structured pruning, removing channels and layers with small weights or redundancy from the model network, directly reducing the number of parameters with small weights. Then, the network architecture is designed using a teacher-student knowledge model approach. Accordingly, the lightweight "student model" is the pruned model described above, while the "teacher model" is the original model obtained in step S31. Specifically, the "teacher model" uses the Soft max method to generate soft labels rich in inter-class relationships as knowledge carriers to guide the student model's learning. On the other hand, the "student model" is also tested on the dataset. These two approaches are used to optimize the performance of the "student model" so that it is infinitely close to the superior performance of the "teacher model". Step S33: Next, add attention mechanisms SimAM and ECA to the compressed model. The complementary nature of these two mechanisms enhances the model's accuracy in grasping key information. The attention mechanism ECA focuses on edge features. Specifically, the input features are processed through two fully connected layers and a 1D convolutional layer to obtain the information relationships between different channels. The 1D convolutional layer uses an adaptive convolutional kernel to capture the relationships between channels. The size of this kernel can be adjusted according to the number of channels c. The corresponding calculation formula is as follows: Where c is the number of channels. b are hyperparameters used to adjust the kernel size (scaling and offset). Based on the previous steps, we obtain the improved YOLO v11 lightweight model, which is then used for subsequent training and performance testing, i.e., steps S4 and S5.
6. A forest fire detection method based on an improved YOLO 11 algorithm according to claim 5, characterized in that, In step S31, the SEFN module specifically performs the following steps: SEFN first obtains the feature maps of the Mamba module's entry and exit points as inputs. For the purpose of explaining the subsequent working principle, these are denoted as h, ... before and h after For input feature h before, Local features are obtained through average pooling. Then, a module consisting of convolution, layer normalization, and activation functions captures the spatial information within these local features. Finally, upsampling is performed to generate spatial awareness metrics. This awareness step captures the spatial information inherent in the relationship between fire and smoke features, enabling the model to understand and become familiar with the positional relationship between flames and smoke in subsequent processes. For feature h... after, It is divided into two parts, namely feature h after ’ and h after ’’ . Among them, feature h after ’ The gating signal is then concatenated with the previously obtained indices to generate a gating signal, which is then used to modulate the feature h. after ’’ Such gating modulation allows the model to recalibrate the spatial relationships in image features, thereby improving the accuracy of identifying flame and smoke features based on their positions. By introducing the SEFN module, the YOLO model not only accurately fuses the spatial relationships and semantic information of flames and smoke, but also more accurately grasps the spatial characteristics of flames and smoke. Furthermore, in complex forest environments with tree cover, it effectively determines and identifies fires based on the spatial relationships between flames and smoke.
7. A forest fire detection method based on an improved YOLO 11 algorithm according to claim 5, characterized in that, The SimAM module described in step S32 converts features into three-dimensional weights. These weights are multiplied by the weights of the target neuron and the features of the feature map to generate the final output feature map. After SimAM processing, the original input feature map is multiplied channel-by-channel with attention weights to obtain relatively complete three-dimensional image weights. In each three-dimensional weight sub-map, a consistent color indicates that each channel is assigned a scalar value related to these elements, thus obtaining different weight outputs for each channel. These three-dimensional weights are then processed by the Sigmoid function. The Sigmoid function maps the input to the 0-1 interval to represent the weights of different channels. The weights of different channels are then multiplied by the input features to obtain the final output feature map. The corresponding calculation formula is as follows: Wherein, the linear change with respect to t is: and These two parts, where t represents the target neuron within a single channel of the input features, and x i M represents the number of neurons within a single channel, excluding the target neuron t. Furthermore, linear operations also require the introduction of w. t and b t The two weight vectors are calculated using the following formulas: in, This represents the average number of neurons within the channel. 2 The variance is represented by , and both distributions follow a normal distribution.
8. A forest fire detection method based on an improved YOLO 11 algorithm according to claim 1, characterized in that, In step S4, the improved model is iteratively trained using the training set samples obtained in step S1, and then validated and evaluated. Training parameters such as the number of training rounds and iterations are pre-set, and the `train` and `vali` parts are trained and inferred. The experimental results provide a direct view of performance metrics such as recall, accuracy, and F1 score, allowing verification of whether the improved model's performance metrics have been enhanced. Adjust the training weight parameters based on the actual results until the training samples produce a relatively accurate result in the model, thus obtaining the optimal model and training weight parameters. Finally, use the validation dataset (vali) as input to the model to verify its performance metrics and obtain the optimal network model.