A forest fire detection method based on unmanned aerial vehicle dual-mode image fusion

By improving the combination of generative adversarial networks and YOLOv8 models, the problems of insufficient datasets and low detection accuracy in forest fire detection are solved, achieving high-precision and efficient forest fire detection, especially the identification of small target flames in complex environments.

CN118379650BActive Publication Date: 2026-11-20INNER MONGOLIA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410448968.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-15
Publication Date
2026-11-20
Estimated Expiration
2044-04-15

AI Technical Summary

Technical Problem

Existing forest fire detection methods suffer from problems such as a lack of datasets, low detection accuracy, and excessive computational load. Furthermore, the complex and variable forest environment leads to low detection efficiency and a high risk of missed or false detections.

Method used

A forest fire detection method based on UAV dual-mode image fusion is adopted. By improving the generative adversarial network (GAN) and YOLOv8 model, and combining multi-scale dense connection network, global attention mechanism and dual discriminator, a high-quality fused image dataset is generated. The forest fire detection model is optimized to improve detection accuracy and real-time performance.

Benefits of technology

It achieves high-precision identification of small target flames in complex environments, reduces the probability of missed detection and false detection, and improves the real-time performance and detection efficiency of forest fire detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379650B_ABST
    Figure CN118379650B_ABST
Patent Text Reader

Abstract

The application discloses a forest fire detection method based on a dual-mode image fusion of a unmanned aerial vehicle, and comprises the following steps: acquiring a visible light and infrared forest fire image pair under the same scene by using the unmanned aerial vehicle, and preprocessing the forest fire image pair; fusing the preprocessed forest fire image pair through a dual-mode image fusion network to generate a visible light and infrared fusion image, wherein the dual-mode image fusion network is an improved generative adversarial network (GAN); training a target detection network through the visible light and infrared fusion image, and identifying the fusion forest fire image by using the trained target detection network, wherein the target detection network is an improved YOLOv8 model; and the application can solve the problems of low recognition accuracy of existing target detection algorithms on forest fire images and high missing detection rate caused by complex backgrounds of forest fire images, and improve the forest fire detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of target detection and dual-modal image processing, and in particular to a forest fire detection method based on dual-modal image fusion from unmanned aerial vehicles. Background Technology

[0002] Early forest fire detection relied primarily on methods such as manual ground patrols, fixed tower observations, satellite observation, aircraft inspections, and the deployment of detectors in forest areas. Ground patrols mainly relied on professional forest rangers, which were inefficient and time-consuming. Fixed tower observations relied on monitoring equipment and rangers for long-term continuous observation, but had blind spots, limited observation range, and high tower equipment maintenance costs. Satellite observation analyzed remote sensing images taken by satellites, but limitations in temporal and spatial resolution could lead to missed detections in the early stages of a fire. Aircraft inspections typically used aircraft for aerial patrols, with personnel conducting aerial observations of the forest area, which was costly and inefficient. Detectors deployed in forest areas included thermal detectors, light detectors, and smoke detectors. These fire detection devices were susceptible to interference from complex environments and were not suitable for use in open and complex forest environments. All of these forest fire detection methods had some drawbacks that prevented widespread application, leading to unpredictable situations in real-world forest fire detection.

[0003] With the development of target detection technology and dual-modal image processing technology, forest fire detection technology based on UAV dual-modal image fusion has become a current research hotspot. However, the detection of forest fires using image technology mainly faces the following difficulties: (1) There is a lack of forest fire samples. Currently, there is no publicly available and authoritative forest fire dataset. The forest environment varies greatly, and the collected forest fire data is difficult to be unaffected by the background environment. (2) Most current forest fire detection models are trained using a single modal dataset, either a single visible light dataset or a single infrared dataset. Alternatively, a forest fire detection model may be trained using two single datasets, visible light and infrared, and then the training results of the two models are combined to determine whether a forest fire has occurred. These training methods have not fully utilized the key features of visible light and infrared dual-modal data, resulting in low detection efficiency. (3) The forest environment is complex and changeable, and there are often unknown interference factors. Their appearance is very similar to that of forest fires, which causes great trouble for forest fire detection. Summary of the Invention

[0004] In order to overcome the shortcomings of the prior art, the present invention aims to provide a forest fire detection method based on dual-mode image fusion of UAVs, so as to solve one or more of the problems of scarce datasets for forest fire detection, low accuracy of forest fire detection, and excessive computational load for forest fire detection.

[0005] This invention designs an intelligent method for detecting forest fires. First, visible light and infrared forest fire images of the same scene acquired by a drone are preprocessed. Then, based on the Generative Adversarial Network (GAN) framework, an improved fusion model is developed. A multi-scale densely connected network structure and a global attention mechanism network structure are added to the generator (G), forming an improved generator consisting of a feature extraction layer, a feature fusion layer, and a feature reconstruction layer composed of four convolutional layers. The improved discriminator (D) is a dual discriminator composed of a visible light discriminator network (VIS-D) and an infrared discriminator network (IR-D). The dual-mode fused forest fire image is obtained through the improved fusion model. Furthermore, based on YOLOv8, a global attention mechanism, a small target detection head, and GhostConv are introduced to improve the forest fire detection model, enhancing the accuracy of identifying small target flames in complex environments. Finally, the forest fire detection model was trained and optimized using a dual-mode fusion forest fire dataset to achieve high-precision forest fire detection, reduce the probability of missed detection and false detection caused by low quality drone aerial images and complex backgrounds in forest fire images, and ensure the real-time performance of forest fire detection.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A forest fire detection method based on dual-mode image fusion from unmanned aerial vehicles (UAVs) includes the following steps:

[0008] Step 1: Preprocess the visible light and infrared forest fire images of the same scene acquired by the UAV.

[0009] Step 2: Construct a visible light and infrared image fusion model based on a Generative Adversarial Network (GAN). The GAN network mainly consists of a generator G and a discriminator D. More specifically, the fusion model of this invention consists of an improved generator network G and a dual discriminator network. The improved generator network G includes a feature extraction layer with added multi-scale densely connected convolutional networks (Ms-DenseNet), a feature fusion layer with added global attention mechanism (GAM), and a feature reconstruction layer composed of four convolutional layers. The dual discriminator network mainly includes a visible light discriminator network VIS-D and an infrared discriminator network IR-D.

[0010] Step 3: Construct a forest fire detection model based on YOLOv8. The forest fire detection model described in this invention is based on the lightweight target detection network YOLOv8n and mainly consists of three parts: a backbone feature extraction network, a feature fusion network, and a detection head.

[0011] Step 4: Train the forest fire detection model using the dual-mode fusion forest fire dataset, and use the trained model to detect and identify forest fires.

[0012] According to one aspect of the present invention, the preprocessing of the visible light and infrared forest fire image pairs acquired by the UAV in the same scene includes:

[0013] First, multiple pairs of high-quality visible light forest fire images and infrared forest fire images of the same scene captured by drones are selected. For example, this invention specifically selected 160 pairs.

[0014] Secondly, adaptive enhancement preprocessing is performed on the infrared forest fire image to highlight the thermal radiation target information, and bilinear interpolation downsampling preprocessing is performed on the visible light forest fire image to match its size with the infrared forest fire image. For example, in this invention, a visible light forest fire image with a resolution of 1280×1024 is downsampled to match the size of an infrared forest fire image with a resolution of 640×480, thus forming a size-matched image pair.

[0015] Then, using visible light forest fire images as reference images and infrared forest fire images as images to be registered, the image pairs are preprocessed for registration using the affine transformation method in linear transformation.

[0016] Finally, a portion of the image pairs are preprocessed using a step-size cropping method to serve as the training set for the fusion model, while the remaining image pairs are used as the test set. For example, in this invention, 130 image pairs are preprocessed with a step size of 32, resulting in image patch resolutions of 224×224. This yields 11,800 visible light and infrared image pairs, which serve as the training set for the fusion model, while the remaining 30 visible light and infrared image pairs serve as the test set.

[0017] According to one aspect of the present invention, the feature extraction layer of the improved generator network G includes several feature extraction branches. Each feature extraction branch includes a convolutional layer and a densely connected convolutional network (DenseNet) connected to the convolutional layer. These densely connected networks constitute the multi-scale densely connected network, which consists of convolutional layers, batch normalization layers, and activation functions. In each feature extraction branch, its convolutional layer first performs multi-scale feature extraction on the input visible light forest fire image and the source infrared forest fire image to obtain several feature maps. Each feature map is then passed through a corresponding densely connected network to obtain corresponding deep features.

[0018] According to one aspect of the invention, each convolutional layer is followed by multiple densely connected networks. The input of each densely connected network is the output of the convolutional layer in its feature extraction branch and the outputs of each of its upstream densely connected networks. The output of each feature extraction branch is the output of its convolutional layer and the outputs of each of its densely connected networks. The deep features output by the multi-scale densely connected networks are represented as follows: Where * denotes the convolution operation. And φ1~φn all represent adaptive weight coefficients, where n is the number of feature extraction branches, and £ T1 ~£ Tn The deep features of the visible light forest fire image obtained from the 1st to nth feature extraction branches are £ t1 ~£ tn The deep features of the infrared forest fire image are obtained from the first to the nth feature extraction branches.

[0019] For example, in this invention, three feature extraction branches are used, employing convolutional layers with kernel sizes of 3×3, 5×5, and 7×7 to perform multi-scale feature extraction on the input source visible light forest fire image and source infrared forest fire image, respectively, to obtain feature maps F. T1 F T2 F T3 This solves the problem of incomplete feature extraction from single-size convolutional kernels. Then, F... T1 F T2 F T3 Deep features can be obtained using the DenseNet network. T1 £ T2 £ T3The DenseNet network employs a 3-layer Conv3×3 convolutional structure with ReLU activation, and six dense connections within these 3 layers. Finally, the Ms-DenseNet network is used to extract deeper features from the source visible light and infrared forest fire images, enhancing the reuse of features across different dimensions. This allows the generator to maximize the use of feature information from both source visible light and infrared forest fire images, while effectively addressing the vanishing gradient problem.

[0020] According to one aspect of the invention, the feature fusion layer of the improved generator network G utilizes a global attention mechanism (GAM) network to process deep features output by a multi-scale densely connected network. Convolutional operations are performed; specifically, the Global Attention Mechanism (GAM) network utilizes the Channel Attention Submodule (CAS) and the Spatial Attention Submodule (SAS) to... Perform convolution operations. Specifically: first, pass the channel attention mechanism module to... Correction is performed to obtain an intermediate state. M C Representative channel diagram, Representing element-based multiplication, the channel attention mechanism module utilizes a 3D arrangement to preserve 3D information. Then, a two-layer multilayer perceptron (MLP) amplifies cross-dimensional channel spatial dependencies, which are further corrected by the spatial attention mechanism module to obtain the final globally fused features. M S Representing the spatial attention map, the spatial attention mechanism module uses two convolutions to establish non-linear relationships between pixels within a 7×7 square, thus capturing more of the spatial relationships between pixels. Specifically, these two convolutions are 7×7 in size, establishing non-linear relationships between pixels within a 7×7 square. The feature fusion layer comprehensively considers information from different channels, better capturing global contextual information, improving feature representation capabilities, reducing the risk of overfitting, and enhancing the model's generalization ability.

[0021] According to one aspect of the present invention, in the improved generator network G feature reconstruction layer, the four-layer convolutional network consists of layers 1 to 3, each composed of a convolutional layer, a batch normalization layer, and a Leaky ReLU activation function; and layer 4 consists of a convolutional layer and a tanh activation function. The four-layer convolutional decoding network is used to process the globally fused features obtained from the feature fusion layer. Feature reconstruction is performed to obtain a fused visible light and infrared forest fire image. Specifically, the first to third convolutional layers are Conv3×3, and the fourth convolutional layer is Conv1×1.

[0022] According to one aspect of the present invention, the improved generator network G, the visible light discriminator network VIS-D, comprises four convolutional layers and one fully connected layer. The first convolutional layer consists of a convolutional layer and a Leaky ReLU activation function. The second to fourth layers each consist of a convolutional layer, a batch normalization layer, and a Leaky ReLU activation function. The four convolutional layers judge whether the fused image output by the improved generator network G conforms to the true sample distribution of the source visible light forest fire image. The fully connected layer then integrates and classifies the judgment results, outputting a binary classification result to determine whether the input image is a real visible light forest fire image or a generated visible light infrared fused forest fire image. This guides the training of the improved generator network G, enabling it to generate fused images that contain richer detail and texture information from the source visible light forest fire image. Specifically, the convolutional layers of the first to fourth convolutional layers are all Conv3×3.

[0023] According to one aspect of the present invention, the improved generator network G's infrared discriminator network IR-D comprises four convolutional layers and one fully connected layer. The first convolutional layer consists of a convolutional layer and a Leaky ReLU activation function. The second to fourth layers each consist of a convolutional layer, a batch normalization layer, and a Leaky ReLU activation function. The four convolutional layers judge whether the fused image output by the improved generator network G conforms to the true sample distribution of the source infrared forest fire image. The fully connected layer then integrates and classifies the judgment results, outputting a binary classification result to determine whether the input image is a real infrared forest fire image or a generated visible-infrared fused forest fire image. This guides the training of the improved generator network G, enabling it to generate fused images that contain richer thermal radiation target information from the source infrared forest fire image. Specifically, the convolutional layers of the first to fourth convolutional layers are all Conv3×3.

[0024] According to one aspect of the present invention, constructing a YOLOv8-based forest fire detection model includes: based on the lightweight target detection network YOLOv8n, mainly improving the feature fusion network, adding a small target detection head, and referencing the GhostConv lightweight model body. Wherein:

[0025] The improved feature fusion network mainly involves embedding a global attention mechanism (GAM) module into the original feature fusion network module. This enhances the semantic and location information in the flame features of visible light and infrared fused forest fire images, improves the model's feature fusion capability, highlights important features, and suppresses unimportant features.

[0026] The addition of a small target detection head mainly involves adding a 160×160-scale small target detection layer to the original detection head module. This includes supplementary fusion feature layers and additional detection heads, thereby enhancing the detection capability of small target flame semantic information and feature representation in the early stages of forest fires.

[0027] The forest fire detection model of this invention uses the GhostConv lightweight model as its core. That is, GhostConv is introduced into the feature fusion network module to replace ordinary convolution. While maintaining the size and channel size of the original convolution output feature map, the computational load and parameter load of the network are reduced. A small number of ordinary convolution kernels are used to extract feature information from the input feature map, and then the feature map is subjected to linear transformation operations that are cheaper than ordinary convolution. Finally, the final feature map is generated by Concat.

[0028] According to one aspect of the present invention, embedding a global attention mechanism module in the original feature fusion network module includes:

[0029] A global attention mechanism module is embedded before the input of the upsampled feature map in layer 1 of the original feature fusion network module. After embedding, the upsampled feature map in layer 1 of the original feature fusion network module becomes layer 2, and layer 1 becomes the global attention mechanism module. Similarly, a global attention mechanism module is embedded before the input of the upsampled feature map in layer 4 of the original feature fusion network module. After embedding, the upsampled feature map in layer 4 of the original feature fusion network module becomes layer 6, and layer 5 becomes the global attention mechanism module. The channel connections from layers 5 and 7 of the backbone feature extraction network module to the output feature map of the feature fusion network module are concatted into layers 3 and 7. The embedded global attention mechanism module performs global fusion of the features output from the backbone feature extraction network module and the features processed by other convolutional modules. The input features are corrected by the channel attention mechanism module to obtain an intermediate state, and then corrected again by the spatial attention mechanism module to obtain the globally fused features. After global fusion of the feature maps by the global attention mechanism module, convolution is used for further feature fusion. The improved feature fusion network combines the ideas of Path Aggregation Networks (PAN) and Feature Pyramid Networks (FPN) with an attention mechanism to achieve bidirectional channel spatial fusion from top to bottom and bottom to top, thereby improving the fusion capability of the feature fusion network.

[0030] According to one aspect of the present invention, adding a small target detection layer with a scale of 160×160 to the original detection head module includes:

[0031] First, the 80×80 scale feature layer of layer 5 in the backbone feature extraction network module and the upsampled feature layer in the feature fusion network module are stacked upwards. After C2f (CSPLayer_2Conv) and Upsample processing, a deep semantic feature layer containing small target flame feature information is obtained. This layer is then stacked with the shallow position feature layer of layer 3 in the backbone feature extraction network module. After C2f, it is sent to the global attention mechanism module, which can amplify the interaction of global dimension features while reducing diffuse information. This improves the ability of the 160x160 scale fusion feature layer to express the semantic features of small target flames and the global information of the channel space. Finally, it is sent to the decoupled head (DH) added to the detection head module, thereby improving the detection accuracy of small target flame features.

[0032] According to one aspect of the present invention, the reference Ghost convolutional lightweight model body includes:

[0033] The 7th and 10th layers of the original feature fusion network module are replaced with GhostConv. The basic operations in GhostConv are custom kernel operations. First, the original convolutions are used to generate a small number of feature maps, and then simple and efficient linear operations are used to expand the feature information, increasing the number of channels and thus obtaining more feature information. The GhostConv operation can be represented as: i∈[1,m],j∈[1,s], where It refers to Y ι The i-th original feature map, Φ i,j For the j-th mapping feature map Y ij The j-th linear operation, Y ι There can be one or more mapping feature maps, Φ i,s This means that the original feature map is preserved through identity mapping. After the above operations, the GhostConv convolution operation is implemented, which reduces the computational cost and number of parameters of the network while maintaining the size and channel size of the original convolution output feature map.

[0034] According to one aspect of the present invention, the forest fire detection model is trained using a dual-mode fusion forest fire dataset, and the trained model is used for forest fire detection and identification, comprising:

[0035] The training was performed using a dual-mode fused forest fire dataset generated by a modified GAN visible and infrared image fusion model. The training was iterated for 300 epochs with a batch size of 640×640, a batch size of 128, and an initial learning rate (lr) of 0.001. The default optimizer SGD was used during training, with weight_decay set to 0.0005 and close_mosaic set to the default value of 10. Mosaic online data augmentation was used by default during training, cropping and stitching together four different images.

[0036] The innovation of this invention compared with the prior art lies in:

[0037] (1) Currently, most forest fire detection models are trained using a single visible light dataset, a few use a single infrared dataset, or a single forest fire detection model is trained using both visible light and infrared datasets, and finally the training results of the two models are combined to determine whether a fire has occurred. This invention first uses an improved GAN network to generate a fusion dataset containing richer detailed texture information and thermal radiation target information, and then trains a forest fire detection model based on YOLOv8. Compared with the above training methods, it makes fuller use of the dual-modal flame image features, and the trained forest fire detection model has higher accuracy and a lower probability of missed detections and false detections.

[0038] (2) At present, there is a lack of datasets available for forest fire detection, and even fewer dual-modal forest fire image datasets in the same scene. This invention uses an improved GAN network to generate diverse dual-modal fusion forest fire images, and then uses data augmentation methods to expand the images to obtain dual-modal fusion forest fire datasets, so that the forest fire detection model can be trained more fully.

[0039] (3) The proposed visible light and infrared image fusion model based on GAN network improves the feature extraction layer of the generator network structure G to perform multi-scale feature extraction on the input source visible light forest fire images and source infrared forest fire images. It also utilizes a densely connected network to obtain deep features, enhancing the reuse of features from different dimensions. This allows the generator to maximize the use of feature information from the source visible light and source infrared forest fire images, effectively addressing the gradient vanishing problem. The feature fusion layer comprehensively considers information from different channels, better capturing global context information, improving feature expression capabilities, reducing overfitting risk, and enhancing the model's generalization ability. Furthermore, the dual discriminator network structures VIS-D and IR-D determine whether the input image conforms to the true sample distribution of the source visible light and source infrared forest fire images, resulting in a fused image containing richer feature information from both modalities. The improved generator and dual discriminators engage in a game theory-based interaction, ultimately making the fused image generated by the generator more consistent with the true sample distribution than the fused image generated by the original GAN ​​network.

[0040] (4) The proposed YOLOv8-based forest fire detection model enhances the semantic and positional information of flame features in visible-infrared fused forest fire images by improving the feature fusion network, thereby increasing the model's feature fusion capability, highlighting important features while suppressing unimportant ones. The addition of a small target detection head enhances the detection capability for the semantic information and feature representation of small target flames in the early stages of forest fires. The use of the GhostConv lightweight model body reduces the computational load and parameter count of the network. Attached Figure Description

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

[0042] Figure 2 This is an aerial photograph taken by a drone.

[0043] Figure 3 Visible and infrared images of forest fires obtained by drones.

[0044] Figure 4 Sample image of the fusion dataset generated to improve the image fusion model.

[0045] Figure 5 The diagram shows the overall structure of the image fusion model improved based on GAN network, where (a) represents the training process and (b) represents the testing process.

[0046] Figure 6 To improve the generator network structure.

[0047] Figure 7 This is a diagram of the overall structure of the GAM network.

[0048] Figure 8 This is a structural diagram of the GAM channel attention submodule.

[0049] Figure 9 This is a structural diagram of the GAM spatial attention submodule.

[0050] Figure 10 To improve the single-path structure of the dual discriminator.

[0051] Figure 11 This is a structural diagram of a forest fire detection model based on the improved YOLOv8.

[0052] Figure 12 The comparison chart shows the evaluation indicators for improving the forest fire detection model. (a) compares precision, (b) compares recall, and (c) compares mAP_0.5.

[0053] Figure 13 To improve the detection sample map of the forest fire detection model, (a) is manually annotated and (b) is the detection result of the improved model. Detailed Implementation

[0054] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0055] This invention primarily presents a forest fire detection method based on dual-mode image fusion from unmanned aerial vehicles (UAVs). The invention consists of three parts. The first part involves preprocessing the visible light and infrared sample sets. This part first adaptively enhances the infrared forest fire images and then performs bilinear interpolation downsampling on the visible light images. Using the visible light forest fire images as reference images and the infrared forest fire images as images to be registered, the images are registered using an affine transformation method. The second part involves obtaining a fused image through an improved GAN network. The improved GAN network is trained using the registered images from the first part to generate the fused image. The third part involves constructing a forest fire detection model to identify forest fires. An improved YOLOv8 model is trained using the fused forest fire dataset generated by the improved image fusion model from the second part to identify forest fires. Figure 1 This is a flowchart of the present invention, and the specific implementation steps of this embodiment are as follows.

[0056] Step 1: Preprocess the visible light and infrared forest fire images of the same scene acquired by the UAV.

[0057] Currently, there is a lack of publicly available and authoritative visible-infrared dual-modal forest fire datasets. Visible-infrared fusion datasets suitable for forest fire detection research are almost nonexistent or not publicly available. Therefore, this embodiment uses a drone equipped with a dual-modal camera to capture images at a specific experimental site. The aerial photography scene using the drone is shown in the image below. Figure 2 Aerial images of forest fires in visible light and infrared light, such as... Figure 3Shooting from a drone's perspective suffers from image shakiness, blurriness, and low clarity. This embodiment first visually selects 160 pairs of high-quality visible light and infrared forest fire images of the same scene, then preprocesses the images, and finally uses a step-by-step cropping method to crop the images to a resolution of 224×224. The preprocessing of visible light and infrared forest fire images described in this invention specifically includes:

[0058] Step 1.1 Adaptive Enhancement Preprocessing of Infrared Images

[0059] Infrared images are single-channel grayscale images. Furthermore, interference from the external environment and Mie scattering in the atmosphere reduces light transparency and visibility. Typically, the resolution, information representation, and environmental adaptability of infrared images differ from visible light images. Therefore, an adaptive enhancement method is needed to highlight target information in the infrared image before fusion. First, the first and second integral images of the source infrared forest fire image (IR) are calculated, as shown in the following equations:

[0060]

[0061]

[0062] In the formula, IR(i,j) is the pixel grayscale value at (i,j) in the source infrared forest fire image IR. Then, using the calculated integral image, with the current pixel as the center, the mean and variance of pixels within the neighborhood window are calculated according to the following formula:

[0063]

[0064]

[0065] in

[0066]

[0067]

[0068]

[0069] For each pixel in the source infrared image, the grayscale value is adjusted according to a linear transformation formula, thereby achieving adaptive contrast adjustment:

[0070] P new =K×(P old -P min ) / (P max -P min )

[0071] in

[0072] P min =μx -r1×σ x

[0073] P max =μ x +r2×σ x

[0074] P old P represents the original grayscale value. new This represents the adjusted grayscale value. r1 and r2 are custom settings, and in the experiment, they are both set to 1. K takes the default value of 255. The integral function is called in OpenCV to calculate the integral, and the rect function is used to obtain the specified area. The infrared forest fire image is adaptively enhanced according to the formula.

[0075] Step 1.2 Preprocessing of Visible Light Forest Fire Images by Bilinear Interpolation Downsampling

[0076] Since the resolution of visible light forest fire images acquired by drone aerial photography is 1280×1024, while the resolution of infrared forest fire images is 640×480, bilinear interpolation is used to downsample the visible light forest fire images. The value of the new pixel is obtained by calculating the weighted average of the four nearest neighbor pixels. The position (x, y) of each pixel in the target image is then determined. ’ ,y ’ Based on the downsampling ratio, calculate its floating-point coordinates (x, y) in the original image, and determine the pixel points at the four integer coordinate positions surrounding (x, y), which are P. 11 (X1,Y1),P 12 (X1,Y2),P 21 (X2,Y1),P 22 For two horizontally adjacent pixels (X2, Y2), linear interpolation is used to calculate the interpolation result in the horizontal direction. Then, linear interpolation is performed on R1 and R2 in the vertical direction to obtain the final interpolation result. The visible light forest fire image is matched to the size of the infrared forest fire image to prepare for subsequent registration and fusion.

[0077] Step 1.3 Preprocessing of visible light and infrared forest fire images by registration using affine transformation.

[0078] After matching the resolutions of the visible light forest fire image and the infrared forest fire image, to avoid the generation of ghost images and artifacts that affect the quality of the fused image, the image pair is registered using the affine transformation method in linear transformation. The affine transformation in linear transformation preserves linearity and parallelism, which is more suitable for the transformation between infrared and visible light images. Using the visible light forest fire image as the reference image and the infrared forest fire image as the image to be registered, points are manually selected to calculate the affine transformation matrix, which is then used as the initial transformation parameters. The infrared image is then affinely transformed using these initial parameters. The mutual information of the transformed image is calculated, and the registration parameters that maximize the mutual information are selected to transform the infrared image to complete the registration. The transformation formula from (x1, y1) in the infrared forest fire image to (x2, y2) after affine transformation is as follows:

[0079]

[0080] Wherein, m3 and m6 describe the deviation of the two images in the x and y directions, respectively, and the other four parameters m1, m2, m4, and m5 describe the rotation and scaling of the two images in spatial coordinates. In the experiment, there are six unknowns in the affine transformation. During the image registration process, three or more sets of non-collinear and typical pairs of corresponding points are randomly selected to solve for the transformation parameters and complete the registration.

[0081] Visible light and infrared forest fire images were preprocessed using adaptive enhancement and bilinear interpolation downsampling, respectively. Then, affine transformation was used to perform registration preprocessing on these images, resulting in spatially aligned image pairs with consistent image information and reduced image artifacts. These image pairs are more conducive to subsequent image fusion. Furthermore, a step-size cropping method was used to preprocess the 130 image pairs preprocessed using the above methods, with a step size of 32. The cropped image patch resolution was 224×224, resulting in 11,800 visible light and infrared image pairs as the training set for the fusion model, and the remaining 30 pairs as the test set.

[0082] Step 2: Construct a visible light and infrared image fusion model based on GAN network, which mainly consists of generator G and discriminator D.

[0083] This step uses the preprocessed infrared and visible light forest fire image pairs from step 1 as a basis to train an improved image fusion model based on a Generative Adversarial Network (GAN) framework, thereby obtaining a dual-mode fused forest fire image, as shown below. Figure 4 This will be used for subsequent training of the forest fire detection model.

[0084] The overall structure of the visible light and infrared image fusion model based on generative adversarial networks constructed in this invention is as follows: Figure 5As shown in (a) and (b), the visible light and infrared image fusion model mainly consists of an improved generator network G and a dual discriminator network DD. The structure of the improved generator network is as follows: Figure 6 The image fusion model, primarily composed of a feature extraction layer with an added multi-scale densely connected network structure (Ms-DenseNet), a feature fusion layer with an added global attention mechanism (GAM), and a feature reconstruction layer consisting of four convolutional layers, is described in this invention. The dual discriminator network (DD) mainly consists of a visible light discriminator network (VIS-D) and an infrared discriminator network (IR-D). Specifically, the image fusion model improved based on the Generative Adversarial Network (GAN) framework described in this invention includes:

[0085] Step 2.1 Introduce the Ms-DenseNet network

[0086] The preprocessed infrared and visible light forest fire image pairs from step 1 are selected and input into the improved generator G. Multi-scale feature extraction is performed on the input source visible light and source infrared forest fire images using convolutional layers with kernel sizes of 3×3, 5×5, and 7×7, respectively, yielding feature maps F. T1 F T2 F T3 To address the issue of incomplete feature extraction from single-size convolutional kernels, a densely connected network (DenseNet) is connected after each convolutional layer to form Ms-DenseNet, which is then processed by F... T1 F T2 F T3 Deep features are obtained through the DenseNet network. T1 £ T2 £ T3 The DenseNet network consists of three layers of convolutional layers with Conv3×3+BatchNorm+ReLU activation functions, connected by six dense connections. By using the Ms-DenseNet network to extract deeper features from source visible light and infrared forest fire images, the reuse of features across different dimensions is enhanced, allowing the generator to maximize the use of feature information from both images while effectively addressing the vanishing gradient problem. When using the Ms-DenseNet network for feature extraction in the improved generator's feature extraction layer, it can be represented as:

[0087] F T1 =F in *f 3×3

[0088] F T2 =F in *f 5×5

[0089] FT3 =F in *f 7×7

[0090] In the formula, F in The input image is represented by *, which indicates a convolution operation, f 3×3 f 5×5 f 7×7 These represent three convolution kernels of different sizes, F. T1 F T2 F T3 These represent feature maps at different scales. a1, a2, and a3 are the inputs to the three convolutional layers, and a4 is the single-branch output of the Ms-DenseNet network. The branch formula of the 3×3 Ms-DenseNet network is expressed as follows:

[0091] a1=F T1

[0092] a2=a1*f 3×3

[0093]

[0094]

[0095]

[0096] In the formula, Indicates channel connection, This represents the deep features of visible light forest fire images obtained through the 3×3 convolutional branch of the Ms-DenseNet network, as well as the deep features obtained through the 5×5 and 7×7 convolutional branches of the Ms-DenseNet network. With F T3 The deep features of infrared forest fire images can all be calculated using the above formula. The same logic applies to the calculation process described above.

[0097] Step 2.2 Introducing the GAM attention mechanism

[0098] The deep features extracted by the feature extraction layer in step 2.1 and We will continue to use the Global Attention Mechanism (GAM) network for feature fusion. The overall structure of GAM is as follows: Figure 7 ,get in * indicates a convolution operation. φ1, φ2, and φ3 all represent adaptive weight coefficients. The Global Attention Mechanism (GAM) network utilizes the channel attention mechanism module CAS and the spatial attention mechanism module SAS to... To perform a convolution operation, the original feature map is first corrected using CAS (Compare-and-Swap) to obtain an intermediate state. M C Representative channel note diagram, Representing element-based multiplication, CAS utilizes a three-dimensional permutation to preserve three-dimensional information, then employs a two-layer multilayer perceptron (MLP) to amplify cross-dimensional channel spatial dependencies, followed by SAS for further correction to obtain the final globally fused features. M S Representing the spatial attention map, SAS uses two 7×7 convolutions to establish non-linear relationships between pixels in a 7×7 square, thus allowing the parameters to capture more of the relationships between pixels in the pixel space. The feature fusion layer comprehensively considers information from different channels, better capturing global contextual information, improving feature representation capabilities, reducing the risk of overfitting, and enhancing the model's generalization ability.

[0099] like Figure 8 The GAM attention mechanism amplifies global dimensional interactive features while reducing information diffusion. The channel attention submodule CAS retains information in three dimensions by using a three-dimensional arrangement. Then, it uses a two-layer multilayer perceptron (MLP) to amplify cross-dimensional channels. (MLP is an encoder-decoder structure, the same as BAM, with a compression ratio of r).

[0100] like Figure 9 In the Spatial Attention (SAS) submodule, two convolutional layers are used to fuse spatial information to achieve spatial attention. The same reduction ratio *r* as in BAM is used in the Channel Attention (SAS) submodule, primarily for distributing attention across the input data in the spatial dimension, establishing associations and interactions between features at different locations. Spatial attention modules can sometimes significantly increase the number of parameters. To prevent this significant increase, Group convolutions with Channel Shuffle can be used.

[0101] The feature reconstruction layer in this invention comprises a four-layer convolutional network. In this network, the first layer uses a Conv3×3+BatchNorm+Leaky ReLU activation function structure, the second layer uses a Conv3×3+BatchNorm+Leaky ReLU activation function structure, the third layer uses a Conv3×3+BatchNorm+Leaky ReLU activation function structure, and the fourth layer uses a Conv1×1+tanh activation function structure. This four-layer convolutional decoding network is used to globally fuse features. Feature reconstruction was performed to obtain a fused image of visible light and infrared forest fires.

[0102] Step 2.3 Improved Dual Discriminator Network (DD)

[0103] The improved dual discriminator network structures in this invention are all identical, with independent parameters. The specific network structure for a single path is as follows: Figure 10 The improved visible light discriminator network, VIS-D, consists of four convolutional layers and one fully connected layer. The first convolutional layer uses a Conv3×3+Leaky ReLU activation function structure, while the second, third, and fourth convolutional layers all use a Conv3×3+BatchNorm+Leaky ReLU activation function structure. The four convolutional layers judge whether the fused image output by the improved generator network G conforms to the true sample distribution of the source visible light forest fire image. The fully connected layer then integrates and classifies the judgment results, outputting a binary classification result to determine whether the input image is a real visible light forest fire image or a generated visible light infrared fused forest fire image. This guides the training of the generator, ensuring that the generated fused image contains richer details and texture information from the source visible light forest fire image.

[0104] The infrared discriminator network IR-D in this invention specifically comprises four convolutional layers and one fully connected layer. In the convolutional network, the first convolutional layer uses a Conv3×3+Leaky ReLU activation function structure, while the second, third, and fourth convolutional layers all use a Conv3×3+BatchNorm+Leaky ReLU activation function structure. The four convolutional layers judge whether the fused image output by the improved generator network G conforms to the true sample distribution of the source infrared forest fire image. The fully connected layer then integrates and classifies the judgment results, outputting a binary classification result to determine whether the input image is a real infrared forest fire image or a generated visible-infrared fused forest fire image. This guides the training of the generator, ensuring that the generated fused image contains richer thermal radiation target information from the source infrared forest fire image.

[0105] Step 3: Construct a forest fire detection model based on YOLOv8, which mainly consists of three parts: a backbone feature extraction network, a feature fusion network, and a detection head.

[0106] This step uses the dual-mode fused forest fire image dataset generated in step 2 based on the GAN-based improved visible light and infrared image fusion model to train a forest fire detection model built on YOLOv8. The overall structure of the YOLOv8-based forest fire detection model constructed in this invention is as follows: Figure 11Based on the lightweight object detection network YOLOv8n, this paper mainly improves the feature fusion network, adds a small object detection head, and incorporates the GhostConv lightweight model. The improved feature fusion network primarily embeds a Global Attention (GAM) mechanism module in the Neck module to enhance the semantic and positional information of flame features in visible light and infrared fused forest fire images, improving the model's feature fusion capability, highlighting important features, and suppressing unimportant features. The addition of the small object detection head mainly involves adding a 160×160-scale small object detection layer to the original Head module, including supplementary fusion feature layers and an additional detection head, thereby enhancing the detection capability of small flame semantic information and feature representation in the early stages of forest fires. The GhostConv lightweight model is incorporated, replacing ordinary convolutions in the Neck module. While maintaining the original size and channel size of the convolutional output feature map, GhostConv reduces the computational cost and parameter count of the network. It uses a small number of ordinary convolutional kernels to extract feature information from the input feature map, then performs a cheaper linear transformation operation on the feature map compared to ordinary convolution, and finally generates the final feature map through concatenation.

[0107] Step 3.1 Improve the feature fusion network

[0108] The improved feature fusion network in this invention specifically includes embedding a GAM attention module before the input of the upsampled feature map of the first layer of the original Neck module. After embedding, the upsampled feature map of the first layer of the Neck module becomes the second layer, and the first layer becomes the GAM attention module. Similarly, a GAM attention module is embedded before the input of the upsampled feature map of the fourth layer of the original Neck module. After embedding, the upsampled feature map of the fourth layer of the Neck module becomes the sixth layer, and the fifth layer becomes the GAM attention module. The channel connections from the fifth and seventh layers of the Backbone to the Neck output feature map are concatted to become the third and seventh layers. The embedded GAM attention module performs global fusion of the features output from the Backbone and the features processed by other convolutional modules. The input features are corrected using a CAS module to obtain an intermediate state, and then corrected again using SAS to obtain the globally fused features. The feature map, after global fusion by the GAM attention module, is output to other convolutional modules for further feature fusion. The improved Neck module combines the ideas of Path Aggregation Networks (PAN) and Feature Pyramid Networks (FPN) with an attention mechanism to achieve bidirectional channel space fusion from top to bottom and bottom to top, thereby improving the fusion capability of the Neck.

[0109] Step 3.2 Add a small target detection head

[0110] The small target detection head network added in this invention specifically includes adding a 160×160 scale small target detection layer to the original Head module, including a supplementary fusion feature layer and an additional detection head. First, the 80×80 scale feature layer of the fifth layer in the Backbone and the upsampled feature layer in the Neck are stacked upwards. After C2f (CSPLayer_2Conv) and Upsample processing, a deep semantic feature layer containing small target flame feature information is obtained. This layer is then stacked with the shallow position feature layer of the third layer in the Backbone, and then sent to the GAM attention module via C2f. This reduces diffuse information while amplifying global dimensional feature interactions, supplementing and improving the 160x160 scale fusion feature layer's ability to express the semantic features of small target flames and global information in the channel space. Finally, it is sent to the decoupled head (DH) added to the Head, thereby improving the detection accuracy of small target flame features.

[0111] Step 3.3: Use the Ghost convolutional lightweight model

[0112] The main body of the Ghost convolutional lightweight model used in this invention specifically includes replacing the 7th and 10th ordinary convolutional layers of the original Neck module with GhostConv. The basic operations in GhostConv are custom kernel operations. First, the original convolution is used to generate a small number of feature maps, and then simple and efficient linear operations are used to expand the feature information and increase the number of channels.

[0113] By measuring the amount of data, more feature information can be obtained. The GhostConv operation can be represented as: Y = X * ω;Y ij =Φ i,j (Y i ι ), i∈[1,m],j∈[1,s], where Y i ι It refers to Y ι The i-th original feature map, Φ i,j For the j-th mapping feature map Y ij The j-th linear operation, Y ι There can be one or more mapping feature maps, Φ i,s This means that the original feature map is preserved through identity mapping. After the above operations, the GhostConv convolution operation is implemented, which reduces the computational cost and number of parameters of the network while maintaining the size and channel size of the original convolution output feature map.

[0114] Step 4: Train the forest fire detection model using the dual-mode fusion forest fire dataset, and use the trained model to detect and identify forest fires.

[0115] This step uses a dual-mode fused forest fire dataset generated by an improved GAN visible light and infrared image fusion model for training. The training is iterated for 300 rounds, with a batch size of 640×640, a batch size of 128, and an initial learning rate (lr) of 0.001. During training, the default optimizer SGD is used, with weight_decay set to 0.0005 and close_mosaic set to the default value of 10. Mosaic online data augmentation is used by default during training, cropping and stitching together four different images.

[0116] To verify the detection efficiency of the proposed forest fire detection model based on UAV dual-mode image fusion, the model was trained and validated on the source visible light forest fire detection dataset VIS-FIRE, the source infrared forest fire detection dataset IR-FIRE, and the dual-mode fused forest fire dataset VIS-IR-FIRE, according to the training steps described above. The experimental results are shown in Table 1. The improved forest fire detection model is compared with existing mainstream target detection algorithms in Tables 2, 3, and 4.

[0117] Table 1 Comparison of data from different datasets for the forest fire detection model proposed in this invention.

[0118]

[0119] Table 2 compares the algorithm with existing algorithms on the VIS-FIRE dataset.

[0120]

[0121] Table 3 compares the algorithm with existing algorithms on the IR-FIRE dataset.

[0122]

[0123] Table 4 compares the algorithm with existing algorithms on the VIS-IR-FIRE dataset.

[0124]

[0125] Table 1 shows the experimental results. Under the improved detection model of this invention, the VIS-IR-FIRE bimodal fusion dataset outperforms the single-modal datasets VIS-FIRE and IR-FIRE in training performance. Accuracy is improved by 8.9% and 12.8% respectively, recall by 17.1% and 15.7% respectively, and mAP@0.5 / % by 7.4% and 8.7% respectively. This demonstrates that the bimodal fusion dataset generated by the improved image fusion network contains more balanced and sufficient visible light detail texture information and infrared thermal radiation target information. The experimental results of different target detection models on the VIS-IR-FIRE bimodal fusion dataset are compared below. Figure 12 As shown in (a), (b), and (c) in Tables 2, 3, and 4, the experimental results in Tables 2, 3, and 4 demonstrate that the forest fire detection model proposed in this invention achieves better overall performance in terms of detection accuracy, recall, and mAP@0.5 / % on different datasets compared to other mainstream target detection models. Table 4 shows the experimental results. The proposed forest fire detection model based on UAV dual-mode image fusion, after training on the VIS-IR-FIRE dataset generated by the visible light and infrared image fusion model, achieves significantly higher accuracy (8.9%, 6.0%, 10.9%, 14.3%) and recall (11.8%, 7.6%, 10.5%, 20.2%) compared to YOLOv8n, YOLOv5s, YOLOv7-tiny, and YOLOX-s, respectively. The improved model also shows improvements in mAP@0.5 / %, with increases of 5.1%, 4.7%, 5.8%, and 13.6%. Furthermore, the improved model has better parameter count and size than other target detection models. The experimental results demonstrate that the improved YOLOv8 forest fire detection model improves both accuracy and recall compared to the original YOLOv8 and other models. The improved model effectively increases detection accuracy and reduces the false negative rate, enabling accurate detection of forest fires under normal conditions. Sample images of the improved forest fire detection model are shown below. Figure 13 As shown in (a) and (b).

Claims

1. A forest fire detection method based on UAV dual-mode image fusion, characterized in that, Includes the following steps: Step 1: Preprocess the visible light and infrared forest fire images of the same scene acquired by the UAV; Step 2: Construct a visible light and infrared image fusion model based on a GAN network. The fusion model consists of an improved generator network G and a dual discriminator network. The improved generator network G includes a feature extraction layer with added multi-scale dense connection network, a feature fusion layer with added global attention mechanism network, and a feature reconstruction layer composed of four convolutional network layers. The dual discriminator network includes a visible light discriminator network VIS-D and an infrared discriminator network IR-D. Step 3: Construct a forest fire detection model. The forest fire detection model is based on the lightweight target detection network YOLOv8n and includes a backbone feature extraction network, a feature fusion network, and a detection head. Step 4: Train the forest fire detection model using the dual-mode fusion forest fire dataset, and use the trained model to detect and identify forest fires. The visible light discriminator network VIS-D comprises four convolutional layers and one fully connected layer. The first convolutional layer consists of a convolutional layer and a Leaky ReLU activation function. The second to fourth layers each consist of a convolutional layer, a batch normalization layer, and a Leaky ReLU activation function. The four convolutional layers judge whether the fused image output by the improved generator network G conforms to the true sample distribution of the source visible light forest fire image. The fully connected layer then integrates and classifies the judgment results to output a binary classification result, thereby determining whether the input image is a real visible light forest fire image or a generated visible light infrared fused forest fire image, thus guiding the training of the improved generator network G. The infrared discriminator network IR-D consists of four convolutional layers and one fully connected layer. The first convolutional layer is composed of a convolutional layer and a Leaky ReLU activation function. The second to fourth layers are all composed of convolutional layers, batch normalization layers, and Leaky ReLU activation functions. The four convolutional layers judge whether the fused image output by the improved generator network G conforms to the real sample distribution of the source infrared forest fire image. Then, the fully connected layer integrates and classifies the judgment results to output a binary classification result to determine whether the input image is a real infrared forest fire image or a generated visible light infrared fused forest fire image, thereby guiding the training of the improved generator network G. The feature fusion network embeds a global attention mechanism module within the feature fusion network module; the detection head adds a 160×160-scale small target detection layer to the original detection head module, including a supplementary fusion feature layer and an additional detection head. The forest fire detection model uses the GhostConv lightweight model as its core. Specifically, GhostConv is introduced into the feature fusion network module to replace ordinary convolution. Ordinary convolution kernels are used to extract feature information from the input feature map, and then linear transformation operations are performed on the feature map. Finally, the final feature map is generated through Concat.

2. The forest fire detection method based on UAV dual-mode image fusion according to claim 1, characterized in that, The preprocessing of visible light and infrared forest fire images of the same scene acquired by the UAV includes: First, multiple pairs of visible light forest fire images and infrared forest fire images of the same scene captured by drones were selected. Secondly, adaptive enhancement preprocessing is performed on infrared forest fire images to highlight thermal radiation target information, and bilinear interpolation downsampling preprocessing is performed on visible light forest fire images to match the size of infrared forest fire images. Then, using the visible light forest fire image as the reference image and the infrared forest fire image as the image to be registered, the image pair is preprocessed for registration using the affine transformation method in linear transformation. Finally, a portion of the image pairs were preprocessed using a step-wise cropping method and used as the training set for the fusion model, while the remaining image pairs were used as the test set.

3. The forest fire detection method based on UAV dual-mode image fusion according to claim 1, characterized in that, The feature extraction layer includes several feature extraction branches. Each feature extraction branch includes a convolutional layer and a dense connection network connected to the convolutional layer. The dense connection networks together form the multi-scale dense connection network, which consists of a convolutional layer, a batch normalization layer, and an activation function. In each feature extraction branch, the convolutional layer first performs multi-scale feature extraction on the input visible light forest fire image and the source infrared forest fire image to obtain several feature maps. Each feature map is then passed through the corresponding dense connection network to obtain the corresponding deep features.

4. The forest fire detection method based on UAV dual-mode image fusion according to claim 3, characterized in that, In each feature extraction branch, multiple densely connected networks are cascaded after each convolutional layer. The input of each densely connected network is the output of the convolutional layer in that feature extraction branch and the outputs of the densely connected networks upstream of it. The output of each feature extraction branch is the output of its convolutional layer and the outputs of the densely connected networks. The deep features output by the multi-scale densely connected networks are represented as follows: ,in This represents the convolution operation. as well as All represent adaptive weight coefficients, where n is the number of feature extraction branches. The deep features of the visible light forest fire image obtained from the first to nth feature extraction branches are as follows: The deep features of the infrared forest fire image are obtained from the first to the nth feature extraction branches.

5. A forest fire detection method based on UAV dual-mode image fusion according to claim 1, characterized in that, The feature fusion layer utilizes a global attention mechanism network to process the deep features output by the multi-scale densely connected network. Perform convolution operations, where: first, the channel attention mechanism module is used to... Correction is performed to obtain an intermediate state. , = , Representative channel diagram, Representing element-based multiplication, the channel attention mechanism module preserves 3D information using a 3D arrangement; then, a two-layer multilayer perceptron (MLP) amplifies cross-dimensional channel spatial dependencies, which are then corrected again by the spatial attention mechanism module to obtain the final globally fused features. , = , Representing the spatial attention map, the spatial attention mechanism module uses two convolutions to establish a non-linear relationship between pixels in a convolution-sized square.

6. The forest fire detection method based on UAV dual-mode image fusion according to claim 1, characterized in that, In the four-layer convolutional network of the feature reconstruction layer: layers 1 to 3 each consist of a convolutional layer, a batch normalization layer, and a Leaky ReLU activation function; layer 4 consists of a convolutional layer and a tanh activation function. This four-layer convolutional decoding network is used to reconstruct features from the globally fused features obtained from the feature fusion layer. A fused image of visible light and infrared forest fires was obtained.

7. A forest fire detection method based on UAV dual-mode image fusion according to claim 1, characterized in that, The embedding of a global attention mechanism module in the feature fusion network module includes: A global attention mechanism module is embedded before the input of the upsampled feature map of the first layer of the original feature fusion network module. After embedding, the upsampled feature map of the first layer of the feature fusion network module becomes the second layer, and the first layer becomes the global attention mechanism module. Similarly, a global attention mechanism module is embedded before the input of the upsampled feature map of the fourth layer of the original feature fusion network module. After embedding, the upsampled feature map of the fourth layer of the feature fusion network module becomes the sixth layer, and the fifth layer becomes the global attention mechanism module. The channel connections from the fifth and seventh layers of the backbone feature extraction network module to the feature fusion network module output feature maps are concatted into the third and seventh layers. The embedded global attention mechanism module performs global fusion on the features output by the backbone feature extraction network and the features processed by other convolutional modules. The input features are corrected by the channel attention mechanism module to obtain an intermediate state, and then corrected again by the spatial attention mechanism module to obtain the globally fused features. The feature maps are then globally fused by the global attention mechanism module and output to other convolutional modules for further feature fusion.

8. A forest fire detection method based on UAV dual-mode image fusion according to claim 1, characterized in that, The addition of a 160×160-scale small target detection layer to the original detection head module includes: First, the 80×80 scale feature layer of layer 5 in the backbone feature extraction network module and the upsampled feature layer in the feature fusion network module are stacked upwards. After C2f and Upsample processing, a deep semantic feature layer containing small target flame feature information is obtained. This layer is then stacked with the shallow position feature layer of layer 3 in the backbone feature extraction network module, and then sent to the global attention mechanism module through C2f. Finally, it is sent to the decoupling head added in the detection head module. The main body of the Ghost convolutional lightweight model includes replacing the 7th and 10th ordinary convolutional layers of the original feature fusion network module with GhostConv.