A forest fire recognition method based on image generation and stage-by-stage training

By constructing a comprehensive dataset and introducing the polarized attention module PSA, the YOLOv8n model is trained in stages, which solves the problem of insufficient identification capability for medium and large-scale fires in forest fire monitoring and achieves efficient and accurate fire identification and early warning.

CN121053609BActive Publication Date: 2026-01-27NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511595976.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-04
Publication Date
2026-01-27
Estimated Expiration
2045-11-04

AI Technical Summary

Technical Problem

Existing forest fire monitoring models are insufficient in identifying medium and large-scale fires, and the training data samples are unbalanced, resulting in a high rate of false negatives. Furthermore, traditional manual monitoring is inefficient and has unstable accuracy.

Method used

A comprehensive dataset containing large, medium and small-scale fires was constructed. High-quality images were generated using the CycleGAN-Turbo network, and a polarization attention module (PSA) was introduced into the YOLOv8n model. The model was trained in stages to improve the ability to extract flame features and the accuracy of recognition.

Benefits of technology

It significantly reduced the false alarm rate of forest fire monitoring, especially the false alarm rate of medium and large-scale fires, and improved the identification accuracy and robustness. The recall rate reached 76.40%, the average precision reached 80.9%, the false alarm rate was 4.6%, and the false alarm rate was 1.4%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121053609B_ABST
    Figure CN121053609B_ABST
Patent Text Reader

Abstract

The application discloses a forest fire identification method based on image generation and stage training and belongs to the field of remote sensing science and technology. The steps are as follows: S1, a forest fire image generation neural network is constructed, large-scale data and a higher identity loss weight are used for training in the first stage, and small data and a lower identity loss weight are used for training the network in the second stage. S2, a high-quality synthetic forest fire image comprehensive data set is constructed by using the model of step 1, S3, a polarization attention module is introduced into a forest fire identification model, and the improved identification model is trained in stages. S4, actual forest monitoring images are input into the forest fire identification model, whether there is fire or smoke is identified, and a fire risk score is output. The application can reduce the false negative rate of medium and large-scale forest fires, improve the identification accuracy and robustness while ensuring the detection speed, and meet the actual needs of forest fire monitoring and alarm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing science and technology, specifically relating to a forest fire identification method based on image generation and phased training. Background Technology

[0002] In recent years, global forest fires have shown an increasing frequency, intensified intensity, and surged carbon emissions, posing a major threat to forest resource security and ecological stability, characterized by rapid spread and wide-ranging damage. Traditional manual patrols are limited by manpower and geographical constraints, resulting in low monitoring efficiency, limited coverage, and often failing to detect early fires in a timely manner. While manual image interpretation has somewhat compensated for the shortcomings of patrol monitoring, this method relies on human experience, leading to strong subjectivity, unstable accuracy, and difficulty in guaranteeing efficiency in large-scale monitoring tasks. In recent years, with the development of deep learning and computer vision technologies, image recognition methods based on object detection networks have been increasingly applied to forest fire monitoring. Among them, the YOLO series models, due to their end-to-end architecture and high real-time performance, have become a common choice for wildfire image detection. YOLOv8n is a lightweight version of this series, with fast inference speed and ease of deployment and use; however, its feature extraction capabilities need further improvement. Because existing open-source forest fire datasets (such as D-Fire) primarily consist of small-scale, initial fires occurring at a distance, lacking a sufficient number of medium- and large-scale fire samples, models trained on these samples cannot adequately identify medium- and large-scale fires to meet application requirements. These factors affect the effectiveness of forest fire monitoring and early warning systems. Summary of the Invention

[0003] This invention addresses the shortcomings of existing models in wildfire feature extraction and imbalanced training data. It provides a forest fire identification method based on image generation and phased training. The method utilizes a CycleGAN-Turbo network to construct a comprehensive dataset containing large, medium, and small-scale fires, compensating for the lack of large-scale fire samples in real-world datasets. Simultaneously, a Polarized Attention (PSA) module is introduced into the basic identification model to enhance flame feature extraction capabilities. For the improved identification model, classification capabilities are first trained to improve fire identification, followed by fine-tuning of target detection capabilities to improve fire location. This effectively enhances the model's generalization ability in complex fire scenarios. The purpose of this invention is to reduce the false negative rate of forest wildfire identification, especially for medium and large-scale fires, while improving identification accuracy and robustness while maintaining detection speed, thus meeting the practical needs of forest fire monitoring and alarm systems.

[0004] To address the above technical problems, this invention provides the following technical solution: a forest fire identification method based on image generation and phased training, comprising the following steps:

[0005] S1. Construct a large-scale basic dataset of forest wildfires, including low-resolution images of large, medium, and small forests with and without fires;

[0006] We constructed a carefully selected dataset of small-scale forest wildfires, including high-resolution images of large, medium, and small forests with and without fires.

[0007] A neural network for generating forest wildfire images was constructed, and the network was trained using a two-stage method and different identity loss weights. The first stage inputs low-resolution images of large, medium and small forests with and without fire, and outputs corresponding low-resolution images of large, medium and small forests with and without fire, thus obtaining a primary model.

[0008] In the second stage, high-resolution images of large, medium, and small forests with and without fires are input into the primary model, and corresponding high-resolution images of large, medium, and small forests with and without fires are output to obtain the forest wildfire image generation model.

[0009] S2. Using the trained forest wildfire image generation model, construct a high-quality synthetic forest fire image dataset, including: large-scale, high-definition, high-resolution images of large, medium, and small forests without fire and images with fire, as well as corresponding labels;

[0010] S3. Constructing a forest fire identification neural network: Improve the network architecture of the YOLOv8n model by introducing a polarized attention module (PSA) to enhance its ability to extract fire features. The PSA constructs global dependencies in the channel and spatial dimensions respectively and merges the results of the two to strengthen key areas and suppress irrelevant backgrounds, highlighting the features of flames and smoke, and reducing the impact of background trees, changes in lighting and smoke interference on the model's discrimination.

[0011] S4. The high-quality synthetic forest fire image dataset obtained in step S2 is used to train the forest fire recognition neural network in stages. During the training process, classification task training is performed first, followed by detection and localization training, and finally the forest fire recognition model is obtained.

[0012] S5. Input the actual forest monitoring images into the forest fire identification model to identify whether there is fire or smoke. Automatically outline the flames or smoke on the images and label the confidence level of the results, and output the fire risk score.

[0013] Furthermore, in the aforementioned step S1, the weights for the phased identity loss are as follows:

[0014] ,

[0015] Where t represents the number of training steps, Indicates the stage switching point. , These represent the identity loss weights for the first and second training phases, respectively.

[0016] Furthermore, in step S2 above, when constructing a high-quality synthetic forest fire image dataset, the fire-covered image samples and the fire-free image samples satisfy the following condition:

[0017] ,

[0018] in, This indicates the number of fire image samples. This represents the number of fireless image samples. To balance the tolerance of the data.

[0019] Furthermore, the aforementioned YOLOv8n model's network architecture includes a backbone network and a head network. The backbone network is used to extract features from the input image and generate feature maps at different scales. The head network's role is to upsample and fuse the feature maps output by the backbone network, and finally predict the target's category and location.

[0020] The backbone network consists of two consecutive convolutional layers Conv connected in sequence, a feature fusion layer C2f, a recurrent structure of three sets of convolutional layers Conv + feature fusion layer C2f, and a fast spatial pyramid pooling module SPPF. A polarization attention module PSA is inserted after each feature fusion layer C2f.

[0021] The head network consists of two sets of sequentially connected upsampling layers (Upsample + concat + feature fusion layer C2f structure), two sets of convolutional layers (Conv + concat + feature fusion layer C2f structure), and a polarization attention module (PSA) is inserted after each concat concatenation operation.

[0022] Furthermore, in step S3 above, the output feature of the polarization attention module PSA is:

[0023] ,

[0024] in, The output features after fusion Original features For input features Weighted by channel dimension; For input features Weighted by spatial location, For channel dimension weights, For spatial dimension weights.

[0025] Channel dimension weight Calculate as follows:

[0026] ,

[0027] in, This is global average pooling, used to compress the spatial information of each channel into a single number, resulting in a vector with a length equal to the number of channels. , These are the weights for the fully connected layer, used to learn the importance of different channels; It is a non-linear activation function; The sigmoid function maps the weights to [0, 1].

[0028] Furthermore, the aforementioned spatial dimension weights Calculate as follows:

[0029] ,

[0030] in, To perform average pooling on the input features along the channel dimension; To perform max pooling on the input features along the channel dimension; For the concatenation operation, the results of average pooling and max pooling are concatenated together to form a 2-channel feature map; It is a convolutional layer with a kernel size of 7×7, used to extract local spatial relationships; The sigmoid function maps the weights to [0, 1].

[0031] Furthermore, in step S4 above, the phased training steps for constructing the forest fire identification neural network are as follows:

[0032] S4.1 Switch the model to classification task mode, load the weights pre-trained on the COCO dataset, and train it using the high-quality synthetic forest fire image dataset from step S2.

[0033] S4.2 Switch the model to object detection task mode, load the best training weights for the backbone network used for classification tasks, and randomly initialize the parameters of the head network used for detection.

[0034] S4.3 Freeze the entire backbone network and train only the head network; after the head network is trained, unfreeze the entire network and fine-tune the overall forest fire identification and detection.

[0035] Furthermore, in step S5 above, the fire risk score is calculated using the following formula:

[0036] ,

[0037] in, Score the fire risk. The confidence level of the model output. To detect the area of ​​the frame.

[0038] Another aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described in the present invention.

[0039] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described in the present invention.

[0040] Compared with the prior art, the beneficial technical effects of the present invention using the above technical solution are as follows:

[0041] This invention proposes a forest fire identification method based on image generation and phased training, which demonstrates significant advantages in forest fire detection performance. A comprehensive forest fire image dataset is constructed using the CycleGAN-Turbo network, and this dataset is used to train a recognition model incorporating a Polarized Attention (PSA) module. The training process is divided into two phases: classification training and detection training, improving the model's ability to identify various types of fires. Through target detection and smoke / fire scene alarm tests, the results show that in target detection tests, the method achieves a recall rate (the percentage of correctly bounded flame pixels) of 76.40% and an average precision (a comprehensive measure of accuracy and recall across categories; higher precision indicates a better balance between false negatives and false positives) of 80.9%. In smoke / fire scene alarm tests, the false negative rate is 4.6% and the false positive rate is 1.4%. The model can accurately and reliably identify forest wildfires, demonstrating broad application prospects and promotional value. Attached Figure Description

[0042] Figure 1 This is a flowchart of the method of the present invention.

[0043] Figure 2 This is a schematic diagram of the improved YOLOv8n model structure in an embodiment.

[0044] Figure 3 This is a comparison image of the real image in the embodiment and the image generated by the CycleGAN-Turbo network in this invention.

[0045] Figure 4 This is a comparison chart of the forest wildfire detection effects of the method of the present invention and the original YOLOv8n model in the embodiments. Detailed Implementation

[0046] To better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.

[0047] In this invention, various aspects of the invention are described with reference to the accompanying drawings, in which numerous illustrative embodiments are shown. Embodiments of the invention are not limited to those depicted in the drawings. It should be understood that the invention is implemented through any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail below, because the concepts and embodiments disclosed herein are not limited to any particular implementation. Furthermore, some aspects of the invention disclosed may be used alone or in any suitable combination with other aspects of the invention disclosed.

[0048] like Figure 1 As shown, this invention proposes a forest fire identification method based on image generation and phased training, which can effectively reduce the false negative rate of forest fire identification, especially the false negative rate of medium and large-scale fires, and achieve accurate and reliable identification of forest fires. To verify the effectiveness of this invention, the D-fire dataset is used as training data and the ForestFire Dataset dataset is used as test data to implement this method. The specific steps are as follows:

[0049] S1. Construct a large-scale basic dataset of forest wildfires, including low-resolution images of large, medium, and small forests with and without fires. This dataset is large in scale and rich in diversity, but its quality is not high.

[0050] We constructed a carefully selected dataset of small-scale forest wildfires, including high-resolution images of large, medium, and small forests with and without fires. This dataset contains images with high clarity and resolution, such as high-precision monitoring images.

[0051] A neural network for generating forest wildfire images was constructed based on the CycleGAN-Turbo network, and the neural network was trained using a two-stage method and different identity loss weights.

[0052] The first stage takes low-resolution images of large, medium, and small forests with and without fire as input, and outputs corresponding low-resolution images of large, medium, and small forests with and without fire as output, thus obtaining a preliminary model.

[0053] In the second stage, high-resolution images of large, medium, and small forests with and without fires are input into the primary model, and corresponding high-resolution images of large, medium, and small forests with and without fires are output to obtain the forest wildfire image generation model.

[0054] In the first training stage, the identity loss weights are set to relatively high values ​​to ensure that the CycleGAN-Turbo network retains the main structure and details of the input image in the output, thus obtaining a stable initial model. In the second training stage, the identity loss weights are appropriately reduced to enhance the CycleGAN-Turbo network's ability to learn fire features, including detailed features such as flame textures and smoke effects, thereby improving the realism and diversity of the output image. The identity loss weights are as follows:

[0055] ,

[0056] Where t represents the number of training steps, Indicates the stage switching point (e.g., 5000 steps). , These represent the identity loss weights for the first and second training phases, respectively. After training in these two phases, the CycleGAN-Turbo network can take into account both the main structure and detailed features.

[0057] S2. Using the trained forest wildfire image generation model, construct a large-scale, high-quality synthetic forest fire image dataset, including: high-resolution, high-fidelity images of large, medium, and small forests without fire and images with fire, as well as corresponding labels.

[0058] First, an image dataset containing both on-and-off forest fire scenes is collected and processed to a uniform size and resolution. Next, the off-fire images are input into a forest fire image generation model to obtain corresponding on-fire images. Then, the on-fire images are input into the same model to obtain corresponding off-fire images. Finally, the generated images are labeled and mixed with existing selected forest fire image data to construct a high-quality comprehensive dataset containing large, medium, and small-scale forest fires for training the forest fire recognition model. To ensure the balance of sample categories in the dataset, the number of on-fire and off-fire samples must meet the following conditions:

[0059] ,

[0060] This represents the number of image samples containing fire. This represents the number of fireless image samples. To balance the data tolerance, a smaller value is generally chosen. The smaller the value, the closer the sample sizes should be.

[0061] S3. Constructing a Forest Fire Recognition Neural Network: The network architecture of the YOLOv8n model is improved by introducing a Polarized Attention (PSA) module to enhance its ability to extract fire features. The PSA module constructs global dependencies in both the channel and spatial dimensions and fuses the results, thereby strengthening key areas and suppressing irrelevant backgrounds, highlighting the characteristics of flames and smoke, and reducing the impact of background trees, lighting changes, and smoke interference on the model's judgment. Figure 2 As shown, the network architecture of the YOLOv8n model consists of a backbone network and a head network:

[0062] (1) The backbone network's role is to extract features from the input image and generate feature maps at different scales. It is a component involved in the classification task. Its connectivity and module functions are as follows:

[0063] First, there are two consecutive Conv layers: The function of the Conv layer (convolutional layer) is to extract the basic features of the image through convolution operations, while compressing the number of channels and reducing the size of the feature map, in preparation for subsequent feature extraction.

[0064] Then connect to the C2f layer: The C2f layer is a module for feature fusion, which enhances feature representation capabilities while maintaining computational efficiency.

[0065] Then there are multiple loop structures of "Conv layer + C2f layer" (3 groups in total): each group first goes through a Conv layer to adjust the channels and size of the feature map, and then connects to a C2f layer to further fuse the features.

[0066] Finally, the SPPF layer is connected: The SPPF layer enhances the globality of features and improves adaptability to targets of different scales without losing spatial information through multiple layers of max pooling operations.

[0067] The example inserts PSA after each C2f layer in the backbone network to enhance the feature extraction capability and the effect of feature fusion.

[0068] (2) The head network's role is to upsample and fuse the feature maps output by the backbone network, and ultimately predict the target's category and location. Its connectivity and module functions are as follows:

[0069] First, there are two sets of "Upsample + Concat + C2f layer" structures:

[0070] Upsampling: Upsamples a low-resolution feature map to match the size of a high-resolution feature map, preparing it for feature fusion.

[0071] Concat (splicing): Feature maps are concatenated along the channel dimension.

[0072] C2f layer: Further integrates the spliced ​​features to enhance their expressive power.

[0073] Next, connect the two sets of "Conv + Concat + C2f layers" structure:

[0074] Inserting a PSA module after each Concat operation: This also strengthens key features through an attention mechanism, thereby improving prediction accuracy.

[0075] In this embodiment, the final feature output of the polarization attention module (PSA) is:

[0076] ,

[0077] in, The output features after fusion Original features For input features Weighted by channel dimension; For input features Weighted by spatial location.

[0078] Channel dimension weight Calculate using the following formula:

[0079] .

[0080] in, For global average pooling, the spatial information of each channel is compressed into a number, resulting in a vector with a length equal to the number of channels; , These are the weights for the fully connected layer, used to learn the importance of different channels; It is a non-linear activation function; The sigmoid function maps the weights to [0, 1].

[0081] Spatial Dimension Weight Calculate using the following formula:

[0082] ,

[0083] in, To perform average pooling on the input features along the channel dimension; To perform max pooling on the input features along the channel dimension; For the concatenation operation, the results of average pooling and max pooling are concatenated together to form a 2-channel feature map; It is a convolutional layer with a kernel size of 7×7, used to extract local spatial relationships; Also using the Sigmoid function, the weights are mapped to [0, 1].

[0084] S4. Using the high-quality synthetic forest fire image dataset from step S2, train the forest fire recognition neural network in stages, first training for classification tasks and then training for detection and localization, to finally obtain the forest fire recognition model.

[0085] The first stage of classification training involves switching to classification task mode, loading weights pre-trained on the COCO dataset, and then training the classification task using a high-quality synthetic forest fire image dataset.

[0086] The second stage of the detection and training phase involves: first, loading the optimal training weights (the optimal model weights obtained from the previous stage of training) for the backbone network (the part of the model used for classification), and randomly initializing the parameters of the head network (the part of the model used for detection and localization). Then, during the training phase, the entire backbone network is frozen, and only the head network is trained. After the head network has learned sufficiently, the entire network is unfrozen, and fine-tuning of the overall forest fire identification and detection is performed.

[0087] Finally, the actual forest monitoring images are input into the model to identify whether there is fire or smoke. The model automatically outlines the flames or smoke on the images and labels the confidence level of the results, outputting a fire risk score. The fire risk score is calculated using the following formula:

[0088] ,

[0089] in, Score the fire risk. The confidence level of the model output. To detect the area of ​​the frame.

[0090] S5. Input the actual forest monitoring images into the forest fire identification model to identify whether there is fire or smoke. Automatically outline the flames or smoke on the images and label the confidence level of the results, and output the fire risk score.

[0091] Another aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described in the embodiments of the present invention.

[0092] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described in the embodiments of the present invention.

[0093] In this embodiment, the identity loss weight values ​​in the first and second training phases , The values ​​are set to 0.1 and 0.05 respectively; stage switching point. Set to 5000; Data balance tolerance The value is set to 5%; the Polarization Attention (PSA) module is inserted after the main feature layers (layers 3, 4, 5, and 6) of the backbone network and after each multi-scale feature fusion layer of the head network, as follows: Figure 2 As shown, the red rounded rectangle represents the Polarization Attention Module (PSA), and the arrow indicates the location where the PSA is added in this embodiment. The CycleGAN-Turbo network is trained using a selected portion of the D-fire forest fire image dataset. A comparison of the original image and the image generated by the CycleGAN-Turbo network is shown below. Figure 3 As shown, the left image in each group is the real image, and the right image is the generated image. The upper group generates images with fire from images without fire, and the lower group generates images without fire from images with fire. It can be seen that the generated image structure is well preserved, and the addition and removal of flames and smoke are natural and realistic. This proves that the comprehensive forest fire image dataset generated by the CycleGAN-Turbo network in this invention is effective, making the training data sample composition richer and the number of categories more balanced. To prove the effectiveness of this invention, the ForestFire Dataset dataset was used to test the original YOLOv8n model trained by the classic method and the method of this invention, respectively. Figure 4 In the figures, the left image of each group shows the wildfire detection results of the original model, and the right image shows the detection results of the method of this invention. Figure 4 In the left image of the upper group, the original model failed to identify large flames, while in the right image, the method of the present invention accurately identified the range of the flames. Figure 4 In the lower left image, the original model could not identify all the small, scattered fires, and its identification of large areas of smoke was not accurate enough. In the right image, the method of the present invention identified all the small, scattered fires, and the identification of the smoke range was more accurate, which fully demonstrates the effectiveness of the method of the present invention.

[0094] While the present invention has been described above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the claims.

Claims

1. A forest fire identification method based on image generation and phased training, characterized in that, Includes the following steps: S1. Construct a large-scale basic dataset of forest wildfires, including low-resolution images of large, medium, and small forests with and without fires; We constructed a carefully selected dataset of small-scale forest wildfires, including high-resolution images of large, medium, and small forests with and without fires. A neural network for generating forest wildfire images was constructed, and the network was trained using a two-stage method and a phased identity loss weight. The first stage inputs low-resolution images of large, medium, and small forests with and without fire, and outputs corresponding low-resolution images of large, medium, and small forests with and without fire, thus obtaining a primary model. In the second stage, high-resolution images of large, medium, and small forests with and without fires are input into the primary model, and corresponding high-resolution images of large, medium, and small forests with and without fires are output to obtain the forest wildfire image generation model. The phased identity loss weights are as follows: , Where t represents the number of training steps, Indicates the stage switching point. , These represent the identity loss weights for the first and second training phases, respectively. S2. Using the trained forest wildfire image generation model, construct a high-quality synthetic forest fire image dataset, including: large-scale, high-definition, high-resolution images of large, medium, and small forests without fire and images with fire, as well as corresponding labels; S3. Constructing a forest fire identification neural network: Improve the network architecture of the YOLOv8n model by introducing a polarized attention module (PSA) to enhance its ability to extract fire features. The PSA constructs global dependencies in the channel and spatial dimensions respectively and merges the results of the two to strengthen key areas and suppress irrelevant backgrounds, highlighting the features of flames and smoke, and reducing the impact of background trees, changes in lighting and smoke interference on the model's discrimination. S4. Use the high-quality synthetic forest fire image dataset from step S2 to train the forest fire recognition neural network in stages. During the training process, classification task training is performed first, followed by detection and localization training, and finally the forest fire recognition model is obtained. S5. Input the actual forest monitoring images into the forest fire identification model to identify whether there is fire or smoke. Automatically outline the flames or smoke on the images and label the confidence level of the results, and output the fire risk score.

2. The forest fire identification method based on image generation and phased training according to claim 1, characterized in that, In step S2, when constructing a high-quality synthetic forest fire image dataset, the fire-covered image samples and the fire-free image samples must satisfy the following condition: , in, This indicates the number of fire image samples. This represents the number of fireless image samples. To balance the tolerance of the data.

3. The forest fire identification method based on image generation and phased training according to claim 1, characterized in that, The YOLOv8n model's network architecture includes a backbone network and a head network. The backbone network is used to extract features from the input image and generate feature maps at different scales. The head network is used to upsample and fuse the feature maps output by the backbone network and finally predict the category and location of the target. The backbone network consists of two consecutive convolutional layers Conv connected in sequence, a feature fusion layer C2f, a recurrent structure of three sets of convolutional layers Conv + feature fusion layer C2f, and a fast spatial pyramid pooling module SPPF. A polarization attention module PSA is inserted after each feature fusion layer C2f. The head network consists of two sets of sequentially connected upsampling layers (Upsample + concat + feature fusion layer C2f structure) and two sets of convolutional layers (Conv + concat + feature fusion layer C2f structure), with a polarization attention module (PSA) inserted after each concat concatenation operation.

4. The forest fire identification method based on image generation and phased training according to claim 1, characterized in that, In step S3, the output features of the polarization attention module PSA are: , in, The output features after fusion Original features For input features Weighted by channel dimension; For input features Weighted by spatial location, For channel dimension weights, Spatial dimension weights; Channel dimension weight Calculate as follows: , in, This is global average pooling, used to compress the spatial information of each channel into a single number, resulting in a vector with a length equal to the number of channels. , These are the weights for the fully connected layer, used to learn the importance of different channels; It is a non-linear activation function; The sigmoid function maps the weights to [0, 1].

5. The forest fire identification method based on image generation and phased training according to claim 4, characterized in that, Spatial Dimension Weight Calculate as follows: , in, To perform average pooling on the input features along the channel dimension; To perform max pooling on the input features along the channel dimension; For the concatenation operation, the results of average pooling and max pooling are concatenated together to form a 2-channel feature map; It is a convolutional layer with a kernel size of 7×7, used to extract local spatial relationships; The sigmoid function maps the weights to [0, 1].

6. The forest fire identification method based on image generation and phased training according to claim 1, characterized in that, In step S4, the phased training steps for the forest fire identification neural network are as follows: S4.1 Switch the model to classification task mode, load the weights pre-trained on the COCO dataset, and train it using the high-quality synthetic forest fire image dataset from step S2. S4.2 Switch the model to object detection task mode, load the best training weights for the backbone network used for classification tasks, and randomly initialize the parameters of the head network used for detection. S4.3 Freeze the entire backbone network and train only the head network; After the head network is trained, the entire network is unfrozen to fine-tune the overall forest fire identification and detection.

7. The forest fire identification method based on image generation and phased training according to claim 1, characterized in that, In step S5, the fire risk score is calculated using the following formula: , in, Score the fire risk. The confidence level of the model output. To detect the area of ​​the frame.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Forest fire smoke image recognition method based on deep convolution confrontation domain alignment

    CN117095297A

  • Forest fire identification method based on improved YOLOv11

    CN119723402A