Fire smoke detection method based on improved YOLOv8 model
By improving the YOLOv8 model, replacing the Neck layer and adding the SimAM attention mechanism, a model of the Gather-Distribute (GD) neck and SimAM attention mechanism is built, which solves the problem of low detection accuracy of existing fire detection algorithms in complex environments, and significantly improves the accuracy and generalization ability of fire smoke detection.
Patent Information
- Application Number
- CN202411520242.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-28
AI Technical Summary
The existing fire detection algorithm has low detection accuracy in complex environments, especially when diverse scenarios and environmental factors change, which affects the accuracy of fire detection.
Using the improved YOLOv8 model, by replacing the Neck layer of the network neck and adding the SimAM attention mechanism, a model of the Gather-Distribute (GD) neck and SimAM attention mechanism is constructed to improve the multi-scale feature extraction capability and detection accuracy.
The improved model significantly improves the accuracy of fire smoke detection in complex environments, especially the ability to identify small targets, reduces interference from irrelevant backgrounds, and improves the generalization ability of the model.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of deep learning and fire smoke recognition, and relates to a fire smoke detection method based on an improved YOLOv8 model. Background Art
[0002] According to the International Association of Fire and Rescue Services, between 1993 and 2022, there were approximately 111 million fires worldwide, killing more than 1.1 million people. The economic losses caused by global fires each year account for approximately 1% of the world's GDP, and an average of 3.8 million fires occur each year in developed and developing countries, resulting in approximately 44,300 deaths. In order to reduce such disasters, it is crucial to detect fires at an early stage without false alarms.
[0003] Existing fire detection algorithms mainly include manual detection, sensor-based detection, and machine vision detection. Manual detection is costly and the sensor detection range is limited, so machine vision detection algorithms are the current mainstream algorithms. Machine vision fire detection technology is divided into rule-based and machine learning algorithms and deep learning algorithms. Traditional rule-based and machine learning algorithms rely on manual selection or feature threshold setting to detect fires, but such algorithms are limited in generalization and actual scene application. However, deep learning algorithms automatically extract and identify smoke features by training neural networks, and have better generalization capabilities and higher detection accuracy.
[0004] Deep learning algorithms are now widely used in the field of fire detection. Although these algorithms have improved in detection accuracy and real-time performance, they still face challenges in complex environments. Because fires occur in indoor, outdoor, urban, forest and other scenes, the diversity of scenes poses great challenges to the model. In addition, environmental factors such as smoke, lighting and weather conditions will change the image attributes, hinder the subsequent feature extraction and recognition process, and affect the accuracy of fire detection. Summary of the invention
[0005] The present invention adopts the following technical solution to solve the above technical problems: a fire smoke detection method based on an improved YOLOv8 model, the present invention comprises the following steps in order:
[0006] (1) Obtain and preprocess the fire smoke dataset to obtain the fire smoke dataset, divide it into a training set and a test set in proportion, and perform data enhancement;
[0007] (2) Build an improved YOLOv8 model that introduces the Gather-Distribute (GD) neck and SimAM attention mechanism;
[0008] (3) Use the training set to iteratively train the fire smoke detection model, verify the model performance through the test set, and obtain the model with the best performance;
[0009] (4) Obtain a fire smoke image to be identified, input the fire smoke image to be identified into the trained fire smoke detection model, and generate a visualization result.
[0010] As a further optimization scheme of the fire smoke detection algorithm based on the improved YOLOv8 model of the present invention, in step (1), the fire smoke D-Fire image dataset is preprocessed to retain only images containing fire or smoke labels, and is divided into a training set and a test set in a ratio of 8:2.
[0011] As a further optimization scheme of the fire smoke detection algorithm based on the improved YOLOv8 model of the present invention, in step (1), data enhancement is performed on the fire smoke dataset, including Hue (H), Saturation (S) and Value (V), and the resolution of all images is adjusted to 640×640.
[0012] The technical solution of the present invention is:
[0013] A fire smoke detection method based on an improved YOLOv8 model, the steps of which include:
[0014] 1) Use the Gather-Distribute module to replace the Neck layer of the YOLOv8 model, and add the SimAM attention mechanism before the SPPF layer of the backbone network Backbone of the YOLOv8 model to obtain the fire smoke detection model;
[0015] 2) iteratively training the fire smoke detection model using the training set;
[0016] 3) The fire smoke image to be identified is input into the trained fire smoke detection model to obtain a detection and identification result.
[0017] Further, the Gather-Distribute module includes a Low-GD branch and a High-GD branch; the Low-GD branch includes Low-FAM, Low-IFM, and Low_IIM, and the High-GD branch includes High-FAM, High-IFM, and High_IIM; wherein,
[0018] The Low-FAM is used to adjust the multi-level feature maps output by the backbone network Backbone of the YOLOv8 model to the same spatial dimension and then splice them on the channel dimension to obtain the first combined feature F align, wherein the multi-level feature maps output by the backbone network Backbone are feature maps B2, B3, B4, and B5 in descending order; the Low-IFM is used to use a convolution module and a re-parameterized convolution block module RepCov-blocks to perform the first combined feature F align Processing generates a first global feature, and segmenting the first global feature into features of different scales according to the channel and Used to capture targets of different sizes; Low_IIM is used to Inject it into the feature map B3 to generate the feature map P3. Inject into feature map B4 to generate feature map P4, and feature map B5 is used as feature map P5;
[0019] The High-FAM is used to align the feature maps P3, P4, and P5 of different scales and then splice them in the channel dimension to obtain the second combined feature F a ' lign ; The High_IFM is used to analyze the second combined feature F through a multi-head attention mechanism and a feed-forward network a ' lign Processing is performed to generate a second global feature, and the second global feature is segmented into features of different scales according to the channel injP4 and F injP5 , used to capture targets of different sizes; High_IIM is used to capture the feature F injP4 Inject it into the feature map P4 to generate the feature map N4 and input it into the second SE-ResNeXt detection head. injP5 The feature map P5 is injected to generate the feature map N5 and input it into the third SE-ResNeXt detection head; at the same time, the feature map P3 is used as the feature map N3 and input it into the first SE-ResNeXt detection head.
[0020] Furthermore, the Low-FAM adjusts the spatial dimensions of the feature maps B2 and B3 through an average pooling operation and inputs them into the first splicing unit C, adjusts the spatial dimensions of the feature map B5 through a Bilinear layer and inputs them into the first splicing unit C, and directly inputs the feature map B4 into the first splicing unit C; the first splicing unit C splices the input feature maps in the channel dimension to obtain a first combined feature F align and input it into the Low-IFM.
[0021] Furthermore, the Low-IFM includes a first convolutional layer Conv, a re-parameterized convolutional block module RepCov-blocks, a second convolutional layer Conv and a first Split layer connected in sequence, which are used to input the first combined feature F alignProcessing generates a first global feature, and segmenting the first global feature into features of different scales according to the channel and Used to capture targets of different sizes.
[0022] Furthermore, the High-FAM aligns the scales of the feature maps P3 and P4 through an average pooling operation and then inputs them into the second splicing unit C, and directly inputs the feature map P5 into the second splicing unit C; the second splicing unit C splices the input feature maps in the channel dimension to obtain the second combined feature F a ' lign And input it into the High-IFM.
[0023] Furthermore, the High-IFM includes a multi-head self-attention module, a feedforward network, and a second Split layer; the High-IFM uses the multi-head self-attention module to calculate the second combined feature F a ' lign The global attention is combined with the second feature F a ' lign After fusion, the features are input into the feedforward network; the feedforward network extracts the input fusion features to obtain high-level features and fuses them with the fusion features to obtain the second global features; the second Split layer divides the second global features into features of different scales according to channels. injP4 and F injP5 .
[0024] Furthermore, forest fire images with fire or smoke labels are obtained from the fire image dataset D-Fire, and the obtained forest fire images are divided into a training set and a test set; then the fire smoke detection model is trained after data enhancement is performed on the training set.
[0025] A server, characterized in that it comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing the above method.
[0026] A computer-readable storage medium stores a computer program, wherein the computer program implements the above method when executed by a processor.
[0027] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0028] (1) The present invention uses HSV data enhancement for the training set, and the test set remains unchanged. By adding disturbances to the three channels of Hue (H), Saturation (S) and Value (V) in the HSV color space, hue transformation is performed to achieve data enhancement. The generated fire smoke image samples are of high quality and strong diversity, which solves the problem of unsatisfactory detection accuracy caused by fewer and poorer training samples;
[0029] (2) The present invention improves the YOLOv8 model for fire smoke detection, including replacing the network neck and adding an attention mechanism. The improved YOLOv8 model has a strong generalization ability and improves the multi-scale feature extraction capability, especially for small targets in fire smoke. It focuses the network attention on the target to be detected, reduces the interference of irrelevant background, and effectively improves the detection accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flow chart of a fire smoke detection method based on an improved YOLOv8 model of the present invention.
[0031] Figure 2 It is a schematic diagram of the Gather-Distribute (GD) module used in the present invention.
[0032] Figure 3 Schematic diagram of the Low-GD branch used in the present invention.
[0033] Figure 4 It is a schematic diagram of the High-GD branch used in the present invention.
[0034] Figure 5 This is a schematic diagram of the SimAM attention mechanism used in the present invention.
[0035] Figure 6 This is a simplified diagram of the network structure of the improved YOLOv8 model of the present invention.
[0036] Figure 7 It is the heat map generated by the improved YOLOv8 model of the present invention;
[0037] (a) Heat map of smoke image after adding different modules, (b) Heat map of fire image after adding different modules. DETAILED DESCRIPTION
[0038] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings:
[0039] In order to solve the problem of low detection accuracy in fire smoke detection, the present invention proposes a fire smoke detection algorithm based on an improved YOLOv8 model by replacing the neck in the YOLOv8 network and integrating the attention mechanism. The algorithm can effectively improve the detection accuracy and better capture small target fire smoke. The present invention proposes a fire smoke detection algorithm based on the improved YOLOv8 model, such as Figure 1 As shown, the algorithm is implemented by the following steps:
[0040] (1) Obtain and preprocess the fire smoke dataset, divide the preprocessed fire smoke dataset into a training set and a test set in proportion, and perform data enhancement on the training set; the D-Fire dataset is a dataset of fire smoke collected by de The fire smoke dataset released by et al. is used to detect smoke and fire, including aerial images and ground images, with a total of 21,527 images, of which 1,164 images are images containing only fire labels, 5,867 images are images containing only smoke labels, 4,658 images are images containing both smoke and fire labels, and the remaining 9,838 images do not contain fire and smoke images. We only select the labeled images and divide the selected images into training and test sets in a ratio of 8:2. The training set is enhanced with Hue (H), Saturation (S), and Value (V) datasets, and the test set remains unchanged. After data enhancement, the training set contains 18,622 images, the test set contains 2,338 images, and the resolution of all images is resized to 640×640.
[0041] (2) Construct an improved YOLOv8 model that introduces the Gather-Distribute (GD) neck and SimAM attention mechanism: Improve the YOLOv8 model by replacing the neck of the YOLOv8 model with the Gather-Distribute (GD) neck and add the SimAM attention mechanism before the SPPF layer of the YOLOv8 model Backbone to obtain a fire smoke detection model.
[0042] 21) Use Gather-Distribute (GD) neck to replace the neck in the YOLOv8 model. The YOLOv8 model uses an advanced feature fusion strategy in its Neck layer for feature perception at multiple scales. Although the original fusion strategy is effective, there is still room for improvement in the integration of cross-layer features when dealing with fire identification tasks. Therefore, the present invention introduces the Gather and Distribute (GD) feature fusion module, which is borrowed from the Gold-YOLO model and especially optimizes the ability to capture fine-grained features. Figure 2As shown in Figure 1, the Gather-Distribute (GD) mechanism includes three modules: feature alignment module FAM, information fusion module IFM, and information injection module IIM. The feature alignment module FAM aligns input features of different scales to make them have consistent spatial dimensions and generates alignment features. The formula is: align =Concat(Upsample(F small ),Downsample(F large )). The information fusion module IFM inputs the alignment features into the multi-layer re-parameterized convolution block RepBlocks or Transformer block to generate a global fusion feature. The formula is: F fuse =RepBlocks(F align )or Transformer(F align ). Then F fuse Segment into features of different scales And fused with the features of the corresponding scale. Finally, the information injection module IIM With the current scale feature F i Fusion. And generate the final fusion features through the attention mechanism And generate the output feature X through further processing i , the formula is: In order to adapt to fire images of different scales, the GD module includes two branches: Low-GD and High-GD. Low-GD specializes in processing larger-sized fire images, and enhances the local details of features by adjusting the feature map size and adopting a fusion strategy. High-GD focuses on smaller-sized fire images, and performs feature fusion through an advanced multi-head attention mechanism and a feedforward network to improve the model's recognition accuracy for small target fires.
[0043] 211) The Low-GD branch includes Low-FAM, Low-IFM and Low-IIM. Figure 3 , the feature maps B2, B3, B4 and B5 output from the backbone network Backbone are used as the input of Low-FAM. Low-FAM uses the feature map B4 as the target feature size, aligns other feature maps by upsampling and downsampling, and generates a combined feature F align Then, F align Input to Low-IFM, processed by convolution and re-parameterized convolution blocks (RepCov-blocks), generate global features, and split into features of multiple scales through channels F injB3 and F injB4 It is used to capture targets of different sizes. Next, in Low-IIM, the feature F injB3Inject it into the corresponding original feature map B3 to generate feature map P3, and transform feature F injB4 Inject it into the corresponding original feature map B4 to generate feature map P4, while retaining B5 as P5. Finally, the output features generated by Low-GD are P3, P4, and P5.
[0044] Among them, Figure 3 As shown, Low-FAM adjusts the spatial dimensions of feature maps B2 and B3 through an average pooling operation and then inputs them into the first splicing unit C. The spatial dimension of feature map B5 is adjusted through a Bilinear layer and then input into the first splicing unit C. Feature map B4 is directly input into the first splicing unit C. The first splicing unit C splices the input feature maps in the channel dimension to obtain the first combined feature F align And input it to Low-IFM.
[0045] Low-IFM includes a first convolutional layer Conv, a re-parameterized convolutional block module RepCov-blocks, a second convolutional layer Conv and a first Split layer connected in sequence, which are used to input the first combined feature F align Processing is performed to generate the first global feature, and the first global feature is segmented into features of different scales by channel and Used to capture targets of different sizes.
[0046] 212) High-GD branch includes High-FAM, High-IFM and High-IIM. Figure 4 , select P3, P4, and P5 feature maps from the Low-GD output as the input of High-FAM. Take P5 as the target feature size, align other feature maps by upsampling and downsampling, and generate a combined feature F a ' lign Then, F a ' lign Input to High-IFM, processed by Multi-Head Attention and Feed-Forward Network, global features are generated and divided into features of multiple scales according to channels. injP4 and F injP5 , used to capture targets of different sizes. Next, in High-IIM, the feature F injP4 Inject it into the feature map P4 to generate the feature map N4 and input it into the second SE-ResNeXt detection head; injP5The feature map P5 is injected to generate the feature map N5 and input it to the third SE-ResNeXt detection head; at the same time, the feature map P3 is used as the feature map N3 and input it to the first SE-ResNeXt detection head. Finally, the output features generated by High-GD are N3, N4 and N5. By introducing the GD feature aggregation module on YOLOv8, it not only solves the limitations of the original model in fire identification, but also improves the performance of the entire model in processing fine-grained features, thereby providing more powerful and accurate technical support for early fire detection and response.
[0047] like Figure 4 As shown in Fig. 1, High-FAM aligns the scales of feature maps P3 and P4 through an average pooling operation and then inputs them into the second concatenation unit C, and directly inputs feature map P5 into the second concatenation unit C; the second concatenation unit C concatenates the input feature maps in the channel dimension to obtain the second combined feature map F a ' lign And input it into High-IFM.
[0048] High-IFM includes a multi-head self-attention module, a feedforward network, and a second Split layer; High-IFM uses the multi-head self-attention module to calculate the second combined feature F a ' lign The global attention is combined with the second feature F a ' lign After fusion, the feed-forward network is input; the feed-forward network extracts the input fusion features, obtains high-level features and fuses them with the fusion features to obtain the second global features. The second Split layer divides the second global features into features of different scales according to the channels. injP4 and F injP5 .
[0049] 22) Add the SimAM attention mechanism before the SPPF layer of the YOLOv8 model backbone network. In the field of fire identification, the use of an effective attention mechanism can significantly improve the model's feature recognition ability, thereby improving detection accuracy and response speed. Although existing attention modules can optimize feature maps in the channel or spatial dimension, they are usually unable to learn attention weights in both dimensions at the same time, and often require adjusting hyperparameters to achieve optimal performance. In order to solve these problems and specifically target fire detection tasks, the present invention introduces the SimAM attention module in the improved YOLOv8 model, which is a module that does not require parameter adjustment and uses 3D attention weights to enhance the model's target detection performance. The schematic diagram of the SimAM attention mechanism is shown in the figure. Figure 5As shown in the figure, the SimAM attention mechanism extracts key information from features through the energy function. The SimAM energy function calculates the energy of each neuron (i.e., each pixel), thereby helping the model to focus on the feature areas related to fire more effectively. The energy function formula is: in u t is the average value of all neurons, is the variance of all neurons, t is the target neuron, x i are the other neurons in the input feature channel, and λ is the regularization coefficient. The number of neurons on this channel can be obtained by (M = H × W). In short, the difference between a neuron and its surrounding neurons is related to energy. The importance of each neuron can be obtained by (1 / e * ) calculation. The entire refinement phase formula of the SimAM module is: X = X·sigmoid(1 / E), where E combines e in all channels and spatial dimensions, and the sigmoid function is used to ensure that the weight value remains in a suitable range. By introducing the SimAM attention module, not only the dimensional collaborative learning problem of the feature map is optimized, but also the dependence on hyperparameter adjustment is reduced through precise 3D weight allocation, thereby significantly enhancing the performance and response speed of the overall model in the fire identification task.
[0050] (3) Use the training set to iteratively train the fire smoke detection model, verify the model performance through the test set, and obtain the model with the best performance;
[0051] The specific method of iteratively training the fire smoke detection model using the training set is as follows:
[0052] 1) Input the training set images into the Backbone network that introduces the SimAM attention mechanism to extract features and convert the input images into multi-level feature maps;
[0053] 2) The obtained feature map is passed to the Gather-Distribute (GD) neck for multi-scale feature fusion and then passed to the head layer;
[0054] 3) The Head layer predicts the fire and smoke categories, center offsets, and four bounding box parameters of fire and smoke based on each pixel on each feature map, including width, height, angle, and confidence;
[0055] 4) Use the non-maximum suppression algorithm to filter out the final detection results based on the confidence level and intersection-over-union ratio, and calculate the loss value between the predicted value and the true value through the loss function, and perform back propagation until the set number of iterations is reached.
[0056] The model has completed training.
[0057] The improved YOLOv8 model network structure diagram is as follows Figure 6 As shown, the model hyperparameters are as follows: set learning rate = 0.01, input image size = 640 × 640, batch size = 16, Epoch = 300, learning rate momentum = 0.937, optimizer = SGD, and patience = 5000. The experimental environment used: Ubuntu 20.04 operating system, PyTorch 2.0.0, Python 3.8, CUDA 11.8, Intel (R) Xeon (R) Platinum 8352V CPU @ 2.10GHz CPU, RTX 4090 (24GB) GPU, 120GB memory.
[0058] (4) Obtain the fire smoke image to be identified, input the fire smoke image to be identified into the trained fire smoke detection model, and generate a visualization result. Figure 7 As shown, the present invention visualizes the feature map after introducing the GD feature aggregation module and SimAM on YOLOv8. The GD feature aggregation module can capture the target area more accurately, and the bright spots in the heat map are concentrated in the core area of the smoke and flame. After further introducing SimAM, the heat map covers a wider range, and in addition to the core area, it also includes relevant background information around it. This shows that SimAM enhances the model's attention to global features, helps to filter out irrelevant information in the background, and thus improves the robustness of detection. The heat map in the figure shows that the improved model can more accurately focus on key areas in smoke and flame detection tasks, while reducing interference from irrelevant backgrounds. These improvements significantly improve the detection ability of the model in complex scenes.
[0059] In summary, the fire smoke detection method based on the improved YOLOv8 model provided by the embodiment of the present invention first obtains a fire smoke data set, and then uses the Gather-Distribute (GD) module to replace the Neck layer in the original YOLOv8 model to better capture and identify small fire targets and improve detection accuracy; further, the SimAM attention mechanism is introduced into the backbone network to enhance the learning ability of important features and reduce the dependence on hyperparameter adjustment; then, the improved model is trained to obtain a model with higher detection accuracy; finally, the trained model is used to detect the fire smoke image to obtain the final detection effect.
Claims
1. A fire smoke detection method based on an improved YOLOv8 model, the steps comprising: 1) Use the Gather-Distribute module to replace the Neck layer of the YOLOv8 model, and add the SimAM attention mechanism before the SPPF layer of the backbone network Backbone of the YOLOv8 model to obtain the fire smoke detection model; 2) iteratively training the fire smoke detection model using the training set; 3) The fire smoke image to be identified is input into the trained fire smoke detection model to obtain a detection and identification result.
2. The method according to claim 1, characterized in that The Gather-Distribute module includes a Low-GD branch and a High-GD branch; the Low-GD branch includes Low-FAM, Low-IFM, and Low_IIM, and the High-GD branch includes High-FAM, High-IFM, and High_IIM; wherein, The Low-FAM is used to adjust the multi-level feature maps output by the backbone network Backbone of the YOLOv8 model to the same spatial dimension and then splice them on the channel dimension to obtain the first combined feature F align , wherein the multi-level feature maps output by the backbone network Backbone are feature maps B2, B3, B4, and B5 in descending order; the Low-IFM is used to use a convolution module and a re-parameterized convolution block module RepCov-blocks to perform the first combined feature F align Processing is performed to generate a first global feature, and the first global feature is segmented into features of different scales according to the channel injB3 and F injB4 , used to capture targets of different sizes; Low_IIM is used to convert feature F injB3 Inject it into feature map B3 to generate feature map P3, and inject feature F injB4 Inject into feature map B4 to generate feature map P4, and feature map B5 is used as feature map P5; The High-FAM is used to align the feature maps P3, P4, and P5 of different scales and then splice them in the channel dimension to obtain the second combined feature F a ' lign ; The High_IFM is used to analyze the second combined feature F through a multi-head attention mechanism and a feed-forward network a ' lign Processing is performed to generate a second global feature, and the second global feature is segmented into features of different scales according to the channel injP4 and F injP5 , used to capture targets of different sizes; High_IIM is used to capture the feature F injP4 Inject it into the feature map P4 to generate the feature map N4 and input it into the second SE-ResNeXt detection head. injP5 The feature map P5 is injected to generate the feature map N5 and input it into the third SE-ResNeXt detection head; at the same time, the feature map P3 is used as the feature map N3 and input it into the first SE-ResNeXt detection head.
3. The method according to claim 2, characterized in that The Low-FAM adjusts the spatial dimensions of the feature maps B2 and B3 through an average pooling operation and then inputs them into the first splicing unit C. The feature map B5 is adjusted through a Bilinear layer and then input into the first splicing unit C. The feature map B4 is directly input into the first splicing unit C. The first splicing unit C splices the input feature maps in the channel dimension to obtain a first combined feature map F. align and input it into the Low-IFM.
4. The method according to claim 2, characterized in that: The Low-IFM includes a first convolution layer Conv, a re-parameterized convolution block module RepCov-blocks, a second convolution layer Conv and a first Split layer connected in sequence, and is used to input a first combined feature F align Processing is performed to generate a first global feature, and the first global feature is segmented into features of different scales according to the channel injB3 and F injB4 , used to capture targets of different sizes.
5. The method according to claim 2, characterized in that: The High-FAM aligns the scales of the feature maps P3 and P4 through an average pooling operation and then inputs them into the second splicing unit C, and directly inputs the feature map P5 into the second splicing unit C; the second splicing unit C splices the input feature maps in the channel dimension to obtain the second combined feature map F a ' lign And input it into the High-IFM.
6. The method according to claim 2, characterized in that The High-IFM includes a multi-head self-attention module, a feedforward network and a second Split layer; the High-IFM uses the multi-head self-attention module to calculate the second combined feature F a ' lign The global attention is combined with the second feature F a ' lign After fusion, the features are input into the feedforward network; the feedforward network extracts the input fusion features to obtain high-level features and fuses them with the fusion features to obtain the second global features; the second Split layer divides the second global features into features of different scales according to channels. injP4 and F injP5 .
7. The method according to claim 1, characterized in that Forest fire images with fire or smoke labels are obtained from the fire image dataset D-Fire, and the obtained forest fire images are divided into a training set and a test set; then the fire smoke detection model is trained after data enhancement is performed on the training set.
8. A server, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing 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, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Tomato fruit maturity detection method based on YOLOv11
CN120472453A
Model training method, firework detection method, device, equipment, medium and product
CN120953742A