A flame target detection method fusing channel statistics pruning and adaptive feature pyramid
Patent Information
- Application Number
- CN202610169878.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-06
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-02-06
AI Technical Summary
[0004]为了克服现有技术的不足,本发明的目的是提供一种融合通道统计量剪枝与自适应特征金字塔的火焰目标检测方法,解决现有火焰检测模型参数量大、计算复杂度高导致难以满足移动机器人、无人机等算力受限工业场景下实时检测需求的问题
本发明提供了一种融合通道统计量剪枝与自适应特征金字塔的火焰目标检测方法,通过提取权重张量的全局统计特征来评估并剪除冗余通道,解决了现有火焰检测模型参数量大、计算复杂度高导致难以满足移动机器人、无人机等算力受限工业场景下实时检测需求的问题,实现了模型的参数量与计算成本的降低;通过在颈部网络构建了BAFPN结构并设计BiFPN的双向交叉尺度连接与AFPN的非相邻层级融合机制,解决了现有轻量化网络在大幅压缩模型体积的同时特征提取能力显著衰退的问题,实现了多尺度特征的交互能力与深层语义信息的传递的增强。
Smart Images

Figure CN122049340B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent fire monitoring and computer vision technology, and in particular to a flame target detection method that integrates channel statistics pruning and adaptive feature pyramids. Background Technology
[0002] Fire is a common hazard threatening life and property in industrial production, especially in complex industrial environments. If initial fires are not detected and controlled in time, they often cause enormous casualties and economic losses. With the continuous advancement of intelligent manufacturing and computer vision technology, fire detection methods in industrial settings are becoming increasingly diversified. Utilizing mobile edge devices such as handheld mobile devices, drones, and inspection robots for flexible fire hazard investigation has become an important trend in the industry. In these mobile edge scenarios, the ability to quickly and accurately identify initial flames through vision systems will greatly improve the speed of fire response, allowing sufficient time for emergency handling and effectively reducing the losses caused by the disaster.
[0003] While deep learning-based object detection algorithms, such as the YOLO series and convolutional neural networks, have significantly improved detection accuracy and response speed compared to traditional sensors or image processing methods, existing high-performance detection models generally suffer from large parameter counts and high computational complexity. These heavyweight models have extremely high hardware computing power requirements, making them difficult to deploy directly on mobile edge devices with limited computing resources and power consumption, and thus unable to meet the stringent real-time requirements of industrial environments. Although there are attempts to replace the backbone network with lightweight networks in existing technologies, while significantly compressing the model size, this often comes with a significant decline in feature extraction capabilities. On the one hand, lightweight backbones tend to lead to sparsity of deep semantic information and loss of shallow detail features; on the other hand, existing feature fusion mechanisms, such as feature pyramid networks, struggle to effectively balance the interaction of multi-scale information when processing lightweight features. This results in a significant decrease in detection accuracy and robustness when facing complex backgrounds or varying scales of flame targets in industrial scenarios, making it difficult to achieve an ideal balance between lightweight design and high accuracy. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide a flame target detection method that integrates channel statistics pruning and adaptive feature pyramids, thereby solving the problem that existing flame detection models have a large number of parameters and high computational complexity, making it difficult to meet the real-time detection requirements of industrial scenarios with limited computing power, such as mobile robots and drones.
[0005] To achieve the above objectives, the present invention provides the following solution: A flame target detection method that integrates channel statistics pruning and adaptive feature pyramid includes: Acquire the image to be detected; The image to be detected is input into a pre-trained MNBA-YOLO detection model for detection to obtain the flame target detection result; the pre-training process of the MNBA-YOLO detection model includes: Build a basic flame dataset; Data augmentation processing is performed on the original images of the basic flame dataset to obtain an augmented image set; The enhanced image set is then normalized and annotated to obtain the training set; Construct an MSF-Net network based on the MSFU module; Construct a BAFPN neck network that integrates BiFPN and AFPN mechanisms; Construct a YOLOv11 base model, replace the CSPDarknet backbone of the YOLOv11 base model with the MSF-Net network, and replace the neck network of the YOLOv11 base model with the BAFPN neck network to obtain the MNBA-YOLO original model. The original MNBA-YOLO model is trained using the training set to obtain a temporary MNBA-YOLO model; The MSF-Net network in the MNBA-YOLO temporary model is subjected to filter pruning based on channel statistics similarity to obtain the MNBA-YOLO pruned model. The MNBA-YOLO pruning model was fine-tuned using the training set to obtain the MNBA-YOLO detection model.
[0006] Preferably, the images in the basic flame dataset include flame shapes with various shooting distances, various combustion media, and various background complexities.
[0007] Preferably, the data augmentation process includes: salt and pepper noise addition, grayscale enhancement, and yellow light source simulated interference addition.
[0008] Preferably, the MSFU module is any one of SA-MSFU, LF-MSFU, IE-MSFU, and CM-MSFU; the SA-MSFU includes: a depthwise convolutional layer, a pointwise convolutional layer, a depthwise convolutional layer, and a pointwise convolutional layer connected in sequence; the LF-MSFU includes: a depthwise convolutional layer, a pointwise convolutional layer, and a pointwise convolutional layer connected in sequence; the IE-MSFU includes: a pointwise convolutional layer, a depthwise convolutional layer, and a pointwise convolutional layer connected in sequence; and the CM-MSFU includes: a pointwise convolutional layer and a pointwise convolutional layer connected in sequence.
[0009] Preferably, the expression for the MSFU module is: ;in, This is the output of the MSFU module; , These are fixed first and second pointwise convolutions, respectively; , These are optional first depthwise convolution and second depthwise convolution, respectively.
[0010] Preferably, the BiFPN structure in the BAFPN neck network employs a fast normalization fusion method; the fusion formula for the BiFPN structure is: ;in, The output features after fusion; For the i-th input feature; Let j be the learnable weight; It is the stability constant.
[0011] Preferably, the AFPN structure in the BAFPN neck network employs an adaptive spatial fusion mechanism; the AFPN structure is used to perform weighted fusion of non-adjacent layer features of P3, P4, and P5 in the feature pyramid of the BAFPN neck network; wherein, the fusion formula corresponding to layer P4 is: ;in, ; This is the fourth layer of fusion output; The feature map after adjusting the resolution of the third layer to the fourth layer; , , These are the first spatial weight map, the second spatial weight map, and the third spatial weight map, respectively. This indicates element-wise multiplication.
[0012] Preferably, the MSF-Net network in the MNBA-YOLO temporary model is subjected to filter pruning based on channel statistical similarity to obtain the MNBA-YOLO pruned model, including: Construct a global statistical vector and a channel-level feature vector based on the global statistical characteristics and channel-by-channel statistical characteristics of the weight tensor of each intermediate depth separable convolutional layer in the MSF-Net network. Based on the global statistics vector and the channel-level feature vector, dissimilarity is calculated between the candidate channels and the global distribution to obtain the dissimilarity calculation result; the expression for the dissimilarity calculation result is: ;in, For channel Dissimilarity to the global distribution; Let be the standard deviation of the i-th statistic across all channels; , These are the i-th components of the channel-level feature vector and the global statistics vector, respectively. Redundant channels are removed from all candidate channels according to the order of the dissimilarity calculation results and the actual number of pruned channels is calculated using the formula for calculating the actual number of pruned channels, thus obtaining the MNBA-YOLO pruning model; the formula for calculating the actual number of pruned channels is: ;in, This represents the actual number of pruning channels; This represents the theoretical number of pruning channels; This represents the number of channels.
[0013] The present invention discloses the following technical effects: This invention provides a flame target detection method that integrates channel statistical pruning and adaptive feature pyramids. By extracting global statistical features from the weight tensor to evaluate and prune redundant channels, it solves the problem that existing flame detection models have large parameter counts and high computational complexity, making them difficult to meet the real-time detection requirements of industrial scenarios with limited computing power, such as mobile robots and drones. This reduces the number of model parameters and computational cost. Furthermore, by constructing a BAFPN structure in the neck network and designing a bidirectional cross-scale connection of BiFPN and a non-adjacent layer fusion mechanism of AFPN, it solves the problem that existing lightweight networks significantly reduce feature extraction capabilities while greatly compressing model size. This enhances the interaction capabilities of multi-scale features and the transmission of deep semantic information. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A schematic diagram of the flame target detection process using fusion channel statistics pruning and adaptive feature pyramid provided in an embodiment of the present invention; Figure 2 This is a structural diagram of the original MNBA-YOLO model provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the MSFU module and its four variants in the backbone network provided in the embodiments of the present invention; Figure 4 A schematic diagram of the BiFPN structure and the improved YOLO-BiFPN structure provided in the embodiments of the present invention; Figure 5 A schematic diagram of the AFPN structure provided in an embodiment of the present invention; Figure 6This is a schematic diagram of the filter pruning region based on channel statistical similarity provided in an embodiment of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] The purpose of this invention is to provide a flame target detection method that integrates channel statistics pruning and adaptive feature pyramids, solving the problem that existing flame detection models have a large number of parameters and high computational complexity, making it difficult to meet the real-time detection requirements of industrial scenarios with limited computing power, such as mobile robots and drones.
[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] Figure 1 This is a schematic diagram of the flame target detection process using fusion channel statistics pruning and adaptive feature pyramid provided in an embodiment of the present invention. Figure 2 The original MNBA-YOLO model structure diagram provided in the embodiments of the present invention is as follows: Figure 1 and Figure 2 As shown, this invention provides a flame target detection method that integrates channel statistics pruning and adaptive feature pyramids, comprising: Step 100: Acquire the image to be detected; Step 200: Input the image to be detected into the pre-trained MNBA-YOLO detection model for detection to obtain the flame target detection result; the pre-training process of the MNBA-YOLO detection model includes: Step 201: Construct the basic flame dataset; Step 202: Perform data augmentation processing on the original images of the basic flame dataset to obtain an augmented image set; Step 203: Perform standardization and image annotation on the enhanced image set to obtain the training set; Step 204: Construct the MSF-Net network based on the MSFU module; Step 205: Construct a BAFPN neck network that integrates the BiFPN and AFPN mechanisms; Step 206: Construct the YOLOv11 base model, replace the CSPDarknet backbone of the YOLOv11 base model with the MSF-Net network, and replace the neck network of the YOLOv11 base model with the BAFPN neck network to obtain the MNBA-YOLO original model. Step 207: Train the original MNBA-YOLO model using the training set to obtain a temporary MNBA-YOLO model; Step 208: Perform filter pruning based on channel statistics similarity on the MSF-Net network in the MNBA-YOLO temporary model to obtain the MNBA-YOLO pruned model; Step 209: Fine-tune the MNBA-YOLO pruning model using the training set to obtain the MNBA-YOLO detection model.
[0020] Furthermore, the core module of the MSF-Net backbone network adopts a multi-scale feature unit (MSFU), which consists of two optional depthwise convolutional layers and two fixed pointwise convolutional layers. The configuration of the depthwise convolutional layers allows for adaptation to different network structures. The specific calculation formula for the MSFU module is as follows: .
[0021] in, For input features, and For optional depthwise convolution, and The convolutions are fixed pointwise; the backbone network specifically uses an MSF-Net structure with a scaling factor of 0.5.
[0022] Specifically, the BiFPN structure integrated in the BAFPN neck network employs a fast normalization fusion method. It first unifies the number of channels by performing a 1×1 convolution on the multi-path input feature maps, and then uses learnable weights for weighted fusion. The specific fusion formula is as follows: .
[0023] in, The output features after fusion For input features, For the learnable weights of the corresponding features, This is a constant used for numerical stability, and its value is [value missing]. Meanwhile, the structure removes redundant nodes with only one input edge, transmits high-level semantic information through a top-down path, and transmits node information in reverse through a bottom-up path, thus achieving bidirectional cross-scale connectivity.
[0024] Furthermore, the AFPN structure integrated in the BAFPN neck network employs an adaptive spatial fusion mechanism (ASFF) to weight and fuse non-adjacent features from layers P3, P4, and P5 in the feature pyramid. First, a 1×1 convolution is used to uniformly compress the number of channels in each feature map to 128. Then, a spatial weight map is generated using the Softmax function. Taking layers as an example, the specific fusion formula is as follows: .
[0025] in, for Layer output; The feature map after adjusting the resolution of the 3rd layer features to that of the 4th layer. , , For the corresponding spatial weight graph, and satisfying ; This indicates element-wise multiplication.
[0026] Specifically, the filter pruning method based on channel statistical similarity includes: For each intermediate depth separable convolutional layer in the MSF-Net backbone network, extract its weight tensor. Global statistical features and channel-by-channel statistical features are used to construct global statistical vectors respectively. With channel-level feature vectors : .
[0027] .
[0028] Calculation Channel Dissimilarity from global distribution , defined as the standardized Euclidean distance, is calculated using the following formula: .
[0029] in, For the first The standard deviation of a statistic across all channels.
[0030] Set pruning ratio For a total of channels The layer, calculate the theoretical number of pruning channels. To adapt to network computing structures, based on the following formula... Adjusted to the actual number of pruning channels To ensure that the number of remaining channels is even: .
[0031] Based on the calculated actual number of pruning channels According to dissimilarity From smallest to largest, remove the first... There are corresponding redundant channels.
[0032] Optionally, this embodiment is based on the Windows 11 operating system and is conducted on a hardware environment equipped with an NVIDIA GeForce RTX 4060 Laptop GPU and an Intel Core i7-13700H CPU. The software environment uses the PyTorch 2.6.0 deep learning framework, along with the CUDA 2.6.0+cu124 acceleration library and the Python 3.11 programming language for experimental verification.
[0033] Specifically, this embodiment addresses the real-time and lightweight requirements of flame detection in industrial scenarios by constructing an MNBA-YOLO detection model. The specific implementation steps are as follows: S1: Data Preparation and Preprocessing S1.1: Constructing the basic flame dataset: This embodiment first collects data using publicly available flame and smoke datasets from GitHub and publicly available image libraries on the internet, obtaining a total of 1663 original flame images in industrial and conventional scenarios. These images cover flame morphology at different shooting distances, with different combustion media, and with varying background complexity, serving as the foundation of the original input data for the MNBA-YOLO model.
[0034] S1.2: Data augmentation processing: To address the issue of model overfitting due to the complexity of industrial environments, numerous interfering factors, and relatively insufficient raw data, this embodiment performs specific data augmentation processing on the raw images acquired in S1.1. To simulate the real-world interference environment of an industrial site, the following three augmentation strategies are employed: 1) Add salt and pepper noise: to simulate environmental noise of the camera equipment under low light or signal interference; 2) Enhance grayscale: Adjust the image grayscale value to adapt to visual changes under different time periods and lighting conditions; 3) Add yellow light source to simulate interference: simulate ambient light interference similar to the color of flames in an industrial setting.
[0035] For each original image, the three processing methods described above were applied to generate three enhanced images with added interference. After data augmentation, the dataset was expanded to 6652 images, significantly improving its robustness and diversity, and providing ample sample support for subsequent training.
[0036] S1.3: Dataset Partitioning and Formatting: The expanded 6652 images were uniformly adjusted to a resolution of 640×640 pixels to fit the input size requirements of the MNBA-YOLO network. The LabelImg tool was used to annotate the flame targets in the images, generating YOLO format .txt label files. The dataset was randomly divided into training, validation, and test sets in an 8:1:1 ratio. The specific data distribution is as follows: Training Set: Contains 5327 images, used for iterative updates of model weights; Validation Set: Contains 650 images, used for hyperparameter tuning and model monitoring during training; Test Set: Contains 675 images, used only for performance evaluation of the final model, and not involved in the training process.
[0037] S2: Construct the MSF-Net backbone network to replace the original YOLOv11 backbone network: To address the issue of excessive computational load on industrial edge mobile devices due to the original YOLOv11 backbone network, this embodiment restructures the model architecture. Specifically, the original YOLOv11 CSPDarknet backbone is removed and replaced with a lightweight MSF-Net network, with a scaling factor of 0.5, to minimize the number of parameters while maintaining feature extraction capabilities.
[0038] S2.1: Deploy the Multi-Scale Feature Unit (MSFU) module: The core of the backbone network constructed in this embodiment lies in the introduction of a Multi-Scale Feature Unit (MSFU) module. For example... Figure 3 As shown, this module adapts to different feature extraction needs by flexibly configuring two optional depthwise convolutional layers (DW) and two fixed pointwise convolutional layers (PW). In implementation, the MSFU module's operational logic is defined as follows: .
[0039] in, For the input feature tensor, and These are optional depthwise convolutional layers configured based on network depth. and These are fixed pointwise convolutional layers used for dimensionality adjustment and feature fusion.
[0040] S2.2: Quantization convolution operation process: To further clarify the mathematical process of lightweight feature extraction, this embodiment defines the convolution operation in MSF-Net as follows: 1) Depthwise Convolution Calculation: Assume the size of the input feature map is The kernel size is set to Regarding the first One input channel, which is located in coordinates Output feature value at The calculation is as follows: .
[0041] This channel-by-channel independent filtering significantly reduces the computational load.
[0042] 2) Pointwise Convolution Calculation: Subsequently, using The convolution kernels are used for pointwise convolution, and the outputs of the depthwise convolution are linearly combined along the channel dimension. Let the number of output channels be... Then the first The characteristic value of each output channel The calculation is as follows: .
[0043] This step enables information exchange between channels.
[0044] Through the above construction process, this embodiment generates an unpruned initial backbone structure of MNBA-YOLO, providing a basic model framework for subsequent feature fusion (S3) and channel pruning (S4).
[0045] S3: Constructing a BAFPN neck network that integrates BiFPN and AFPN mechanisms: To address the potential sparsity of deep semantic information and loss of shallow details that may result from the lightweight MSF-Net backbone network constructed in S2, this embodiment innovates in the design of the neck network. This step constructs a BAFPN structure that integrates bidirectional cross-scale connectivity (BiFPN) and non-adjacent layer adaptive spatial fusion (AFPN) mechanisms, replacing the original neck network of YOLOv11, and assembling it into the initial MNBA-YOLO model. The specific implementation process consists of two sub-steps: constructing the bidirectional feature pyramid and integrating the progressive feature pyramid. S3.1: Constructing a Bidirectional Feature Pyramid (BiFPN) based on fast normalization fusion: To enhance the cross-scale information transmission capability of the feature pyramid, this embodiment refers to... Figure 4 Construct a BiFPN module based on the structure shown. Figure 4 As shown, this embodiment constructs a BiFPN structure in the neck network to enhance cross-scale connectivity. This structure establishes a top-down path to pass high-level semantic information to lower layers, and a bottom-up path to pass shallow detail information in reverse. Skip connections are introduced at the same level to achieve feature reuse. During construction, redundant nodes with only one input edge are removed, retaining only nodes where feature fusion occurs to reduce computational overhead. To ensure non-linear expressiveness, a Swish activation function is introduced before feature fusion, and its calculation formula is: .
[0046] in This refers to the Sigmoid function. In the feature fusion stage, a fast normalization fusion method is used to accelerate computation for a given multi-path input feature set. First, for learnable weights Apply the ReLU activation function to ensure nonnegativity, that is: .
[0047] Subsequently, weighted normalization and feature overlay are performed, and the network automatically learns the importance of different input features. The specific fusion calculation formula is as follows: .
[0048] in, To ensure numerical stability, the constant value in this embodiment is strictly taken as [value missing]. .
[0049] S3.2: Integrating an adaptive spatial fusion-based progressive feature pyramid (AFPN) mechanism: like Figure 5 As shown, to address the issue of insufficient information interaction among non-adjacent levels in the feature pyramid, an AFPN mechanism is integrated into BiFPN, and an adaptive spatial fusion (ASFF) strategy is employed to perform weighted fusion of features from non-adjacent levels P3, P4, and P5 in the feature pyramid. Before fusion, the features are first processed through… The convolution operation compresses the number of channels in the feature maps of layers P3, P4, and P5 to a uniform 128 to reduce subsequent computational load. Then, using... Convolutional layers predict spatial weight parameters from feature maps , , The Softmax function is then used to normalize it into the final spatial weight map. , , Taking layer P4 as an example, its spatial weights... The formula for generating it is as follows: .
[0050] Similarly, it can be calculated and And satisfy: The constraints are as follows. Based on the spatial weight graph generated above, the network can autonomously suppress redundant information and enhance complementary features. The final feature fusion calculation formula for layer P4 is as follows: .
[0051] in This represents element-wise multiplication (Hadamard product). This represents the features downsampled from layer P3 to resolution P4. This represents the features upsampled from layer P5 to resolution P4.
[0052] S4: Filter pruning based on channel statistical similarity: S4.1: Pre-training and Weight Acquisition Before performing pruning, the initial MNBA-YOLO model assembled in S3 was pre-trained using the training set of 5327 images constructed in S1. The training epochs were set to 200 to allow the model weight distribution to reach a relatively stable state, ensuring that the subsequently extracted statistical features accurately reflect the importance of the channels. After training, the model weight file was loaded, and the MSFU modules in Layer 3 and Layer 4 of the MSF-Net backbone were selected as the key pruning targets. Specifically, pruning operations were performed on the expansion layers (expand_conv), middle depth separable convolutional layers (middle_dw), and projection layers (proj_conv) within these modules, as follows: Figure 6 As shown.
[0053] S4.2: Extracting statistical features from the weighted tensor: For each of the selected intermediate convolutional layers, obtain its weight tensor. ,in For the number of channels, This represents the kernel size. To quantify the information contribution of the feature channels, this embodiment calculates the global statistical features of the weight tensors respectively. Channel-by-channel statistical characteristics We select the maximum value, median value, and variance as three key statistical indicators and construct the following feature vector: First, we calculate the global statistical vector of the weights for this layer: .
[0054] Secondly, regarding the first layer of this layer The weight of each channel Calculate its channel-level feature vector: .
[0055] S4.3: Calculate channel dissimilarity: To evaluate a specific channel To determine if a channel is redundant, calculate its dissimilarity to the global distribution. This embodiment uses standardized Euclidean distance as the metric to eliminate differences in magnitude between different statistical indicators: .
[0056] In the formula, For the first The standard deviation of a statistic across all channels. The smaller the value, the more the weight distribution of the channel tends to be close to the average level within the layer, lacking the unique response capability to specific flame textures or shapes, and is judged as a redundant channel.
[0057] S4.4: Adaptive Channel Pruning Decision and Execution: According to the preset pruning ratio First, calculate the theoretical number of channels to be pruned. Considering that mobile hardware accelerators typically have optimized support for even-numbered channels, this embodiment introduces an odd-even adaptive adjustment mechanism to avoid decreased computational efficiency after pruning due to an odd number of channels. Actual number of pruned channels. The calculation logic is as follows: .
[0058] Sure Then, all channels of this layer are sorted according to their dissimilarity. Sort by size from smallest to largest, then physically remove the smaller ones. The channels with the lowest dissimilarity are selected, and the associated input-output connections are reconstructed simultaneously to complete the physical compression of the model structure.
[0059] S5: Model Fine-tuning and Performance Evaluation S5.1: Model fine-tuning training parameter settings: To recover the model accuracy loss caused by structured pruning in S4, this embodiment uses the pruned weight file as pre-training weights and fine-tunes the model using the training set of 5327 images partitioned in S1. During fine-tuning, the SGD optimizer is used to update parameters to ensure the model converges to the optimal state. All experiments are conducted without loading any additional external pre-training weights; instead, training starts from scratch based on the pruned weights. Specific training hyperparameter settings are shown in Table 1. Table 1
[0060] S5.2: Definition of Model Evaluation Indicators: After training, the performance of the final MNBA-YOLO model was evaluated using 675 test set images partitioned in S1. This embodiment selects precision (P), recall (R), mean average precision (mAP@50%), number of parameters, and computational cost (GFLOPs) as the core evaluation metrics. The specific definitions and calculation formulas for each metric are as follows: Mean accuracy (mAP) is used to measure the overall detection performance of a model across all categories, where Represents average accuracy. The number of categories to be detected is calculated using the following formula: .
[0061] Precision represents the proportion of samples correctly identified as flames out of all samples identified as flames. (True Positive) indicates the number of correctly identified flame samples. (False Positive) represents the number of samples that were falsely reported as flames, and its calculation formula is: .
[0062] Recall represents the proportion of samples correctly identified as flames by the model out of all actual flame samples in the test set. (False Negative) represents the number of flame samples that were missed, and its calculation formula is as follows: .
[0063] Computational complexity (GFLOPs) is used to measure the time complexity and inference speed of a model, where , For the height and width of the feature map, , These represent the number of input and output channels, The kernel size is calculated using the following formula: .
[0064] S5.3: Experimental Results Analysis and Verification: S5.3.1: Ablation Experiment Analysis: To verify the effectiveness of the various improvements proposed in this embodiment (MSF-Net backbone, BiFPN, AFPN, and pruning strategies), an ablation experiment was conducted using YOLOv11n as the baseline model. The experimental results are shown in Table 2.
[0065] Table 2
[0066] Analysis of the data in Table 2 shows that, firstly, while replacing the backbone network with MSF-Net (Model 1) reduced the number of parameters from 2.58M to 1.79M, the mAP@50% also decreased from 0.971 to 0.918, demonstrating that the lightweight backbone did indeed lead to a decline in feature extraction capability. Secondly, after introducing the BAFPN structure designed in this embodiment (Model 4 and the final model), although the computational cost slightly increased from 4.2 GFLOPs to 4.9 GFLOPs, the mAP@50% significantly increased to over 0.943, effectively compensating for the accuracy loss caused by the lightweight design. Finally, the MNBA-YOLO model, after channel pruning and fine-tuning, has only 1.85M parameters, a 31.4% reduction compared to the original YOLOv11 model, and a 23.8% reduction in computational cost (GFLOPs), while maintaining a high average accuracy of 0.961, achieving the best balance between lightweight design and detection accuracy.
[0067] S5.3.2: Comparison with existing mainstream algorithms: To further verify the advanced nature of this embodiment in industrial flame detection tasks, the generated MNBA-YOLO model was compared with mainstream target detection algorithms such as Faster-RCNN, RT-DETR r18, YOLOv5, YOLOv8, and YOLOv11 under the same experimental environment and dataset conditions. The results are shown in Table 3.
[0068] Table 3
[0069] Comparative data shows that the MNBA-YOLO model proposed in this embodiment has significant advantages in terms of model size and computational complexity. Compared with the classic Faster-RCNN, the number of parameters is reduced by more than 95%; compared with the latest YOLOv11 in the same series, the number of parameters is reduced by 0.81M and the computational cost is reduced by 1.5GFLOPs while the accuracy is only 3.9% lower. This indicates that this embodiment can achieve high-precision flame detection with extremely low hardware resource consumption, fully meeting the real-time deployment requirements of edge devices with limited computing power, such as mobile robots and drones.
[0070] The beneficial effects of this invention are as follows: This invention employs an MSF-Net backbone network combined with a filter pruning strategy based on channel statistical similarity to effectively eliminate redundant weights and channels in the model, significantly reducing the number of parameters and computational cost, enabling efficient deployment in industrial edge devices with limited computing power, such as mobile robots and drones. Simultaneously, addressing the issues of sparsity of deep semantic information and loss of shallow details that can easily occur with lightweight backbone networks, this invention constructs a BAFPN neck network, integrating bidirectional cross-scale connections and non-adjacent layer adaptive fusion mechanisms. This significantly enhances the multi-scale information interaction and integration capabilities within the feature pyramid, effectively improving the detection accuracy of small and complex flame targets in industrial scenarios. Through a fine-tuning training strategy after pruning, this invention maximizes the recovery of feature extraction capabilities while significantly compressing the model size, achieving an optimal balance between detection speed and accuracy, and meeting the stringent requirements of real-time performance and robustness for industrial fire early warning.
[0071] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0072] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A flame target detection method that integrates channel statistics pruning and adaptive feature pyramid, characterized in that, include: Acquire the image to be detected; The image to be detected is input into a pre-trained MNBA-YOLO detection model for detection, and the flame target detection result is obtained. The pre-training process of the MNBA-YOLO detection model includes: Build a basic flame dataset; Data augmentation processing is performed on the original images of the basic flame dataset to obtain an augmented image set; The enhanced image set is then normalized and annotated to obtain the training set; An MSF-Net network is constructed based on MSFU modules; the MSF-Net network consists of an input terminal, three convolutional layers, two MSFU modules, a convolutional layer, an SPPF module, and a C2PSA module connected in sequence; the expression of the MSFU module is: ;in, This is the output of the MSFU module; , These are fixed first and second pointwise convolutions, respectively; , These are optional first depthwise convolution and second depthwise convolution, respectively; Construct a BAFPN neck network that integrates BiFPN and AFPN mechanisms; Construct a YOLOv11 base model, replace the CSPDarknet backbone of the YOLOv11 base model with the MSF-Net network, and replace the neck network of the YOLOv11 base model with the BAFPN neck network to obtain the MNBA-YOLO original model. The original MNBA-YOLO model is trained using the training set to obtain a temporary MNBA-YOLO model; The MSF-Net network in the MNBA-YOLO temporary model is subjected to filter pruning based on channel statistics similarity to obtain the MNBA-YOLO pruned model. The MNBA-YOLO pruning model was fine-tuned and trained using the training set to obtain the MNBA-YOLO detection model. The MSF-Net network in the MNBA-YOLO temporary model is subjected to filter pruning based on channel statistics similarity to obtain the MNBA-YOLO pruned model, including: Extract the maximum value, median value, and variance of the weight tensor of each selected intermediate convolutional layer in the MSF-Net network to obtain a global statistics vector; the expression of the global statistics vector is: ;in, This is the global statistics vector; , , These represent selecting the maximum value, median value, and variance, respectively. For weight tensors; Extract the first convolutional layer from each selected intermediate convolutional layer in the MSF-Net network. The maximum, median, and variance of the weights of each channel are used to obtain the channel-level feature vector; the expression for the channel-level feature vector is: ;in, The channel-level feature vector; For the first The weight of each channel; Based on the global statistics vector and the channel-level feature vector, the dissimilarity between the candidate channels and the global distribution is calculated using standardized Euclidean distance to obtain the dissimilarity calculation result; the expression for the dissimilarity calculation result is: ;in, For channel Dissimilarity to the global distribution; Let be the standard deviation of the i-th statistic across all channels; , These are the i-th components of the channel-level feature vector and the global statistics vector, respectively. Sort all channels in the current layer according to the dissimilarity calculation results from smallest to largest, and remove the first few. The MNBA-YOLO pruning model is obtained by finding the channels with the lowest dissimilarity and synchronously reconstructing the associated input-output connections; where, ; This represents the actual number of pruning channels; This represents the theoretical number of pruning channels; This represents the number of channels.
2. The flame target detection method based on fusion of channel statistics pruning and adaptive feature pyramid as described in claim 1, characterized in that, The images in the basic flame dataset include flame patterns with various shooting distances, various combustion media, and various background complexities.
3. The flame target detection method based on the fusion of channel statistics pruning and adaptive feature pyramid as described in claim 1, characterized in that, The data augmentation process includes: salt and pepper noise addition, grayscale enhancement, and yellow light source simulation interference addition.
4. The flame target detection method based on fusion of channel statistics pruning and adaptive feature pyramid as described in claim 1, characterized in that, The MSFU module is any one of SA-MSFU, LF-MSFU, IE-MSFU, and CM-MSFU; the SA-MSFU includes: a depthwise convolutional layer, a pointwise convolutional layer, a depthwise convolutional layer, and a pointwise convolutional layer connected in sequence; the LF-MSFU includes: a depthwise convolutional layer, a pointwise convolutional layer, and a pointwise convolutional layer connected in sequence; the IE-MSFU includes: a pointwise convolutional layer, a depthwise convolutional layer, and a pointwise convolutional layer connected in sequence; the CM-MSFU includes: a pointwise convolutional layer and a pointwise convolutional layer connected in sequence.
5. The flame target detection method based on fusion of channel statistics pruning and adaptive feature pyramid as described in claim 1, characterized in that, The BiFPN structure in the BAFPN neck network employs a fast normalization fusion method; the fusion formula for the BiFPN structure is: ;in, The output features after fusion; For the i-th input feature; Let j be the learnable weight; It is the stability constant.
6. The flame target detection method based on fusion of channel statistics pruning and adaptive feature pyramid as described in claim 1, characterized in that, The AFPN structure in the BAFPN neck network employs an adaptive spatial fusion mechanism; the AFPN structure is used to perform weighted fusion of non-adjacent layer features of P3, P4, and P5 in the BAFPN neck network feature pyramid; wherein, the fusion formula corresponding to layer P4 is: ;in, ; This is the fourth layer of fusion output; The feature map after adjusting the resolution of the third layer to the fourth layer; , , These are the first spatial weight map, the second spatial weight map, and the third spatial weight map, respectively. This indicates element-wise multiplication.
Citation Information
Patent Citations
Method for detecting infection rate of wheat single-ear gibberellic disease
CN120656740A
Liquid crystal module defect detection method based on multi-difference fusion and multi-branch pyramid network
CN120852274A