Flame smoke detection method and system based on feature-specific alignment and dynamic aspect ratio adjustment

The flame and smoke detection method, which combines feature-specific alignment and dynamic aspect ratio adjustment, solves the problem of differences in physical properties and geometric shape between flames and smoke, and achieves higher accuracy in flame detection.

CN122176640APending Publication Date: 2026-06-09GUILIN UNIVERSITY OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUILIN UNIVERSITY OF TECHNOLOGY
Filing Date
2026-03-31
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively address the differences in physical properties between flames and smoke, as well as the large variations in target size and the variable aspect ratio and height, resulting in low flame detection accuracy, especially in complex field scenarios.

Method used

A flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment is adopted. The feature-specific alignment and adaptive module (FSAD) is used to identify the heterogeneous features of flame and smoke. The network is optimized by the adaptive spatial feature fusion module (ASFF) and the dynamic aspect ratio adjustment loss function (ARAIoU) to generate a highly discriminative feature map and dynamically adjust the regression weights.

Benefits of technology

It significantly improves the accuracy and robustness of flame and smoke detection, enabling more precise capture of the heterogeneous morphological features of non-rigid targets, thus enhancing detection accuracy and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176640A_ABST
    Figure CN122176640A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of fire detection technology, specifically disclosing a flame and smoke detection method and system based on feature-specific alignment and dynamic aspect ratio adjustment. The method includes the following steps: acquiring original feature maps of flames and smoke and inputting them into a fire detection network (FAA-Net); embedding a feature-specific alignment and adaptive module (FSAD) to generate a heterogeneous perception recognition feature map with strong discriminative power; introducing an adaptive spatial feature fusion module (ASFF) to dynamically adjust the fusion ratio of features from different levels of the backbone network; introducing the ARA1oU dynamic aspect ratio adjustment loss function to train the FAA-Net network; acquiring the fire image to be detected and inputting it into the optimized FAA-Net network to obtain the target detection result. This technical solution, based on feature-specific alignment and dynamic aspect ratio adjustment, improves the accuracy and robustness of flame and smoke detection by combining channel and scale dual representation optimization with a dynamic aspect ratio regression mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of fire detection technology and relates to a flame and smoke detection method and system based on feature-specific alignment and dynamic aspect ratio adjustment. Background Technology

[0002] Fires pose a serious threat to human life, health, and property safety worldwide, causing hundreds of thousands of injuries and deaths and enormous economic losses annually. Therefore, target detection in fire images has received widespread attention in recent years, especially in indoor and outdoor environments, industrial plants, urban built-up areas, and forested areas, where flame detection has become an important research topic. Compared to target detection in natural scenes, flame target detection faces many challenges, including:

[0003] 1) Target channel information specificity: The huge differences in physical properties between flames and smoke cause them to exhibit completely different "activation modes" in the feature channels of neural networks, and traditional models have difficulty handling such "different features" at the same time.

[0004] 2) Large target scale variation: Flames and smoke exhibit significant scale variations in time and space, making it difficult to detect targets in a timely and stable manner using a single scale or fixed fusion strategy.

[0005] 3) Target aspect ratio is highly variable: Flames and smoke are non-rigid and are affected by wind direction, terrain, and burning materials, often exhibiting extreme aspect ratios. This high degree of variability in geometry makes it difficult for traditional bounding box regression logic to converge accurately, leading to inaccurate positioning and unstable regression when locating irregular boundaries.

[0006] To address these challenges, recent research has focused on improving flame detection accuracy by optimizing bounding box regression mechanisms. However, these methods often fall short when dealing with fire lines or diffuse smoke columns with extreme aspect ratios. This is mainly because existing models struggle to effectively capture the dynamic, elongated structural features of such targets, leading to unstable bounding box regression and inaccurate target boundary contour capture, which in turn affects detection accuracy in complex field scenarios. Summary of the Invention

[0007] The purpose of this invention is to address the aforementioned problems in existing technologies by proposing a flame and smoke detection method and system based on feature-specific alignment and dynamic aspect ratio adjustment.

[0008] To achieve the above objectives, the basic solution of this invention is: a flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment, comprising the following steps:

[0009] S1, Collect the original feature maps of flames and smoke, and input them into the fire detection network (FAA-Net).

[0010] S2, embed the Feature-Specific Alignment and Adaptive Module (FSAD) into the input of the backbone network CSPDarknet of FAA-Net;

[0011] FSAD uses a dual-branch channel attention mechanism to identify the activation intensity distribution of flames and smoke in different channels. It achieves specific reweighting and adaptive enhancement based on the heterogeneous features of fire and smoke targets. Through channel-level feature alignment, it generates a heterogeneous perception and recognition feature map with strong discriminative power.

[0012] S3 introduces an adaptive spatial feature fusion module (ASFF) in the Neck part of FAA-Net. ASFF dynamically adjusts the fusion ratio of features from different levels of the backbone network by learning a pixel-level spatial weight map.

[0013] S4, FAA-Net introduces the ARAIOU dynamic aspect ratio adjustment loss function in the detection head part. Based on the geometric shape information of non-rigid targets such as flames and smoke, it adjusts the regression weights of the width and height dimensions to train the FAA-Net network.

[0014] S5: Acquire the fire image to be detected and input it into the optimized FAA-Net network to obtain the target detection result.

[0015] The working principle and beneficial effects of this basic scheme are as follows: This technical scheme is based on the Fire Detection Network (FAA-Net) with Feature-Specific Alignment and Dynamic Adjustment. It improves detection performance and accuracy through the synergistic optimization of heterogeneous feature representation and dynamic bounding box regression mechanism.

[0016] The Feature-Specific Alignment and Adaptation (FSAD) module is designed to identify the heterogeneous features of flames and smoke using a channel attention mechanism. By strengthening the representation of different channels and achieving feature complementarity, the representation conflict between the two types of targets in the feature space is resolved.

[0017] An adaptive spatial feature fusion module (ASFF) is constructed. By introducing a spatial weight allocation mechanism, it effectively integrates the multi-scale features output by the backbone network. While achieving cross-scale feature complementarity, it suppresses the semantic pollution of tiny fire points by complex backgrounds.

[0018] A dynamic aspect ratio adjustment loss function (ARAIoU) is proposed, which dynamically adjusts the regression weights based on the target's geometric shape information. This solves the convergence instability problem caused by extreme aspect ratios for non-rigid targets such as flames and smoke, and improves the localization accuracy of the bounding box.

[0019] Furthermore, in step S2, FSAD uses a dual-branch channel attention mechanism to identify the activation intensity distribution of flames and smoke in different channels. Based on the heterogeneous features of the fire and smoke targets, it performs specific reweighting and adaptive enhancement. Through channel-level feature alignment, it generates a heterogeneous perception and recognition feature map with strong discriminative power. The specific steps are as follows:

[0020] In FSAD, parallel flame enhancement and smoke perception branches are designed, and the input feature maps are... Send to these two parallel processing paths:

[0021] Design a statically learnable scaling mechanism that introduces a learnable parameter vector with the same number of input channels. Channel-by-channel static weight compensation is performed on the input features:

[0022] ,

[0023] in, This represents element-wise multiplication channel by channel. This is a representation of the enhanced flame features after processing by a static learnable scaling mechanism;

[0024] We design a dynamic channel attention mechanism based on global statistical awareness, which utilizes global average pooling (GAP) to compress the spatial dimension into channel descriptors. :

[0025] ,

[0026] Where X represents the input feature map, H and W represent the height and width of the feature map, respectively, and c represents the channel index. c This indicates the c-th channel currently being processed. Represents: the pixel activation value at coordinates (i, j) in the c-th channel of the input feature map. The channel descriptor for the c-th channel is a scalar value representing the global statistics of that channel.

[0027] A lightweight perceptron consisting of a single linear layer and a sigmoid activation function are used to generate dynamic channel weight vectors. :

[0028] ,

[0029] Where σ is the Sigmoid activation function;

[0030] By adaptively weighting the original features using dynamic channel weight vectors, the weak signal representation of smoke in complex backgrounds is enhanced.

[0031] ,

[0032] in, This is a representation of smoke features enhanced by the "dynamic channel attention mechanism";

[0033] To achieve deep alignment and complementarity of flame and smoke features, the enhanced features generated by the two branches are concatenated along the channel dimension:

[0034] ,

[0035] in, ;

[0036] Apply one Convolutional layer Cross-channel information interaction and dimensionality reduction are performed on the cascaded heterogeneous features to generate the final aligned feature map Y, which is a heterogeneous perception and recognition feature map with strong discriminative power:

[0037] .

[0038] FSAD uses a dual-branch channel attention mechanism to deeply identify the activation intensity distribution of flames and smoke in different channels. It can achieve specific reweighting and adaptive enhancement based on the heterogeneous features of fire and smoke targets, effectively resolving the representation conflict between the two types of targets in feature mapping.

[0039] Through this channel-level feature alignment, the model can generate heterogeneous perception and recognition feature maps with strong discriminative power at the beginning stage of the backbone network, laying a solid feature foundation for the subsequent accurate capture of non-rigid fire targets.

[0040] Furthermore, step S3 introduces an Adaptive Spatial Feature Fusion (ASFF) module into the Neck part of FAA-Net. ASFF dynamically adjusts the fusion ratio of features from different layers of the backbone network by learning a pixel-level spatial weight map. The steps are as follows:

[0041] An importance-guided downsampling module (IGD) is set up. IGD first generates a pixel-wise importance map M to measure the contribution of spatial location, and then performs non-linear enhancement on the input feature X1.

[0042] ,

[0043] ,

[0044] in, Indicates shallow high-resolution features. and They represent and Convolution operation, Use the Sigmoid activation function; The guiding strength coefficient; express Depthwise convolution; express Pointwise convolution, These are features enhanced by nonlinearity;

[0045] Enhanced features Mid-layer characteristics Compared with upsampled deep features Perform splicing along the channel dimension and utilize... Convolutional layer Generate the original spatial scoring map :

[0046] ,

[0047] ,

[0048] in, This means concatenating the channel numbers of F1, F2, and F3, keeping the size unchanged. C is the number of channels, H is the height, W is the width, and R indicates that each number in the tensor is a real number (including integers, decimals, positive numbers, and negative numbers). The original importance evaluation of each spatial location to the three features was recorded;

[0049] Score chart Apply the Softmax function along the channel dimension to generate three sets of pixel-level normalized weights. , , This allows the sampling location to automatically adjust the fusion ratio based on the actual scale distribution of the flame or smoke target:

[0050] ,

[0051] in, Through this mechanism, when detecting small targets, the weights of shallow features are automatically increased. To obtain fine details; when a large target is detected, the weight of deep features is increased. To leverage global semantics:

[0052] ,

[0053] ,

[0054] Where A is the feature map output by ASFF. These are the features after weighted fusion.

[0055] The Neck section utilizes the ASFF module to achieve adaptive spatial fusion and alignment of multi-scale features. ASFF dynamically adjusts the fusion ratio of features from different levels of the backbone network by learning pixel-level spatial weight maps.

[0056] When dealing with flames and smoke that change drastically in scale, it can automatically suppress noise interference from complex backgrounds and enhance the response of key feature regions, thereby achieving accurate alignment and depth complementarity between deep semantics and shallow details, significantly improving the model's ability to perceive the features of non-rigid targets in the spatiotemporal evolution process.

[0057] Furthermore, in step S4, FAA-Net introduces the ARAIOU dynamic aspect ratio adjustment loss function in the detection head. Based on the geometric morphology information of non-rigid targets such as flames and smoke, the regression weights for the width and height dimensions are adjusted to train the FAA-Net network. The specific method is as follows:

[0058] Calculate the length and width distribution factors based on the shape information of the predicted target, and adaptively adjust the penalty weights of the length and width dimensions accordingly to achieve dynamic dimension focusing:

[0059] ,

[0060] ,

[0061] in, This is represented by the length and width distribution factors of the predicted bounding box. and These represent the width and height of the predicted bounding box, respectively. and These are the adaptive weighting coefficients in the width and height directions, respectively. It is represented as a weighted hyperparameter, used to control the steepness of the aspect ratio deviation on the weight distribution;

[0062] The shape-aware penalty is calculated by using adaptive weights in the width and height dimensions and the relative size deviation between the predicted and ground truth bounding boxes. :

[0063] ,

[0064] in, and These represent the width and height of the actual bounding box, respectively.

[0065] After obtaining the shape-perceived penalty value, it is combined with the basic intersection-union ratio and the dynamic balance factor. Calculate the final regression loss value:

[0066] ,

[0067] ,

[0068] ,

[0069] in, This represents the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box. Represents the x-coordinates of the top-left and bottom-right vertices of the ground truth bounding box and the predicted bounding box; This represents the corresponding y-coordinate. The variance of the diagonal length of the minimum bounding rectangle containing the two boxes is represented by IoU, which is the proportion of the overlap area between the predicted box and the ground truth box to the total coverage area. ARAIoU is the adaptive aspect ratio-aware intersection-union ratio loss function.

[0070] FAA-Net introduces the ARAIoU dynamic aspect ratio adjustment loss function in the detection head to guide the bounding box regression process. ARAIoU can adaptively adjust the regression weights of the width and height dimensions based on the geometric shape information of non-rigid targets such as flames and smoke. This significantly improves the model's localization accuracy and convergence stability for irregular edge targets in complex scenes.

[0071] The present invention also provides a flame and smoke detection system based on feature-specific alignment and dynamic aspect ratio adjustment, including a data acquisition unit and a processing unit. The data acquisition unit is used to acquire the original feature maps of flame and smoke and input them to the processing unit.

[0072] The processing unit executes the method described in this invention to complete the flame and smoke detection.

[0073] This system utilizes processing units to more accurately capture the heterogeneous morphological characteristics of non-rigid fire targets, significantly improving detection accuracy and performance.

[0074] Furthermore, the processing unit is equipped with a fire detection network (FAA-Net).

[0075] The Feature-Specific Alignment and Adaptation (FSAD) module is embedded at the input of the backbone network CSPDarknet of FAA-Net. After the input features enter the FSAD module, they are simultaneously fed into two specialization branches for processing:

[0076] The flame branch employs a static learnable scaling mechanism, which uses a parameter vector equal to the number of channels to weight the input channel by channel, locking in fixed features of the flame in color and brightness through "experience accumulation".

[0077] The smoke branch introduces a dynamic channel attention mechanism, which captures macroscopic statistical information of the image through global average pooling (GAP), and then uses a lightweight perceptual network to generate a weight vector W in real time, which is used to perform adaptive enhancement for semi-transparent, low-contrast targets such as smoke.

[0078] After processing, the flame enhancement features and smoke enhancement features are concatenated along the channel dimension to form a feature cluster containing multi-dimensional information. Finally, it is processed through a... Convolutional layers enable cross-channel information exchange and feature refinement, integrating complementary information from different branches into the final output feature Y;

[0079] An adaptive spatial feature fusion module (ASFF) is introduced in the Neck part of FAA-Net to align and adaptively fuse multiple original features from different network depths. Specifically:

[0080] The ASFF module receives feature streams from different levels through multiple parallel inputs. For shallow high-resolution feature paths, the IGD module is configured to perform non-linear downsampling alignment. For medium and deep feature paths, channel mapping alignment is performed through convolutional layers.

[0081] The aligned features are concatenated and aggregated along the channel dimension and connected to a weight prediction branch. This weight prediction branch generates a pixel-level spatial weight distribution through a convolution operator. Finally, the multi-path features are integrated into the output features through a weighted summation operator.

[0082] The IGD submodule adopts a dual-branch parallel configuration. Its first branch is an importance-aware branch, which consists of cascaded convolutional layers. Its output generates a pixel-level weight map through the Sigmoid function.

[0083] The second branch is the main path feature enhancement branch. Its input is connected to the original features. The weight map is applied to the original features through a pixel-wise multiplier to achieve saliency enhancement. The enhanced features are then fed into a downsampling layer consisting of depthwise convolution and pointwise convolution. Spatial resolution compression and channel feature reconstruction are achieved through stride convolution, and finally output to the alignment buffer of ASFF.

[0084] Through the collaborative efforts of modules within the processing unit, the feature alignment capability for heterogeneous targets such as flames and smoke, as well as the adaptability to extreme shapes, are effectively improved in fire detection tasks. Attached Figure Description

[0085] Figure 1 This is a flowchart illustrating the flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment according to the present invention.

[0086] Figure 2This is a schematic diagram of the fire detection network (FAA-Net) of the processing unit of the flame and smoke detection system based on feature-specific alignment and dynamic aspect ratio adjustment of the present invention.

[0087] Figure 3 This is a schematic diagram of the Feature Specific Alignment and Adaptive Module (FSAD) of the Flame and Smoke Detection System Based on Feature Specific Alignment and Dynamic Aspect Ratio Adjustment of the present invention;

[0088] Figure 4 This is a schematic diagram of the adaptive spatial feature fusion module (ASFF) of the flame and smoke detection system based on feature-specific alignment and dynamic aspect ratio adjustment of the present invention.

[0089] Figure 5 This is a schematic diagram of the IGD sampling module, which is guided by the importance of the flame and smoke detection system based on feature-specific alignment and dynamic aspect ratio adjustment, according to the present invention. Detailed Implementation

[0090] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0091] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0092] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0093] This invention discloses a flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment. By combining dual characterization optimization of channels and scale with a dynamic aspect ratio regression mechanism, the accuracy and robustness of flame and smoke detection are improved. Figure 1As shown, the flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment includes the following steps:

[0094] S1: Collect the original feature maps of flames and smoke, and input them into the fire detection network (FAA-Net, which adds FSAD, ASFF modules, loss function and structural design to the existing YOLO network).

[0095] S2, embed the Feature-Specific Alignment and Adaptive Module (FSAD) into the input of the backbone network CSPDarknet of FAA-Net;

[0096] FSAD identifies the activation intensity distribution of flames and smoke in different channels through a dual-branch channel attention mechanism. It achieves specific reweighting and adaptive enhancement based on the heterogeneous features of fire and smoke targets. Through channel-level feature alignment, it generates a heterogeneous perception and recognition feature map with strong discriminative power. By using the channel attention mechanism to identify the heterogeneous features of flames and smoke, and by strengthening the representation of different channels and achieving feature complementarity, it solves the problem of representation conflict between the two types of targets in the feature space.

[0097] S3 introduces an adaptive spatial feature fusion module (ASFF) in the Neck part of FAA-Net. ASFF learns a pixel-level spatial weight map and dynamically adjusts the fusion ratio of features from different levels of the backbone network. By introducing a spatial weight allocation mechanism, it effectively integrates the multi-scale features output by the backbone network, achieving cross-scale feature complementarity while suppressing the semantic pollution of small fire points by complex backgrounds.

[0098] S4, FAA-Net introduces the ARAIOU dynamic aspect ratio adjustment loss function in the detection head. Based on the geometric morphology information of non-rigid targets such as flames and smoke, it adjusts the regression weights of the width and height dimensions to train the FAA-Net network. By dynamically adjusting the regression weights based on the target's geometric morphology information, it solves the convergence instability problem caused by extreme aspect ratios of non-rigid targets such as flames and smoke, and improves the localization accuracy of the bounding box.

[0099] S5: Acquire the fire image to be detected and input it into the optimized FAA-Net network to obtain the target detection result. FAA-Net effectively improves the feature alignment capability and adaptability to extreme shapes for heterogeneous targets such as flames and smoke in fire detection tasks. It can more accurately capture the dynamically evolving features of flames and smoke, and significantly improve detection accuracy and robustness.

[0100] In a preferred embodiment of the present invention, in order to resolve the heterogeneity conflict between flame and smoke in channel representation and enhance the model's ability to represent non-rigid fire targets, in step S2, FSAD identifies the activation intensity distribution of flame and smoke in different channels through a dual-branch channel attention mechanism, performs specific reweighting and adaptive enhancement based on the heterogeneous features of fire and smoke targets, and generates a heterogeneous perception and recognition feature map with strong discriminative power through feature alignment at the channel level. The specific steps are as follows:

[0101] Parallel flame enhancement and smoke detection branches were designed in FSAD to achieve feature-specific alignment for heterogeneous targets, thereby effectively improving the accuracy and stability of flame and smoke detection and providing more reliable feature support for early fire monitoring in complex scenarios. The input feature map was then used... Send to these two parallel processing paths:

[0102] Considering that flames have strong prior saliency in specific color channels, a static learnable scaling mechanism is designed, introducing a learnable parameter vector with the same number of input channels. Channel-by-channel static weight compensation is performed on the input features:

[0103] ,

[0104] in, This represents element-wise multiplication channel by channel. This is a flame enhancement feature representation processed by a static learnable scaling mechanism; this branch can stably highlight the color representation of the flame and filter out normalized noise interference in the background.

[0105] Given the anisotropic and low-contrast characteristics of smoke features, their representation is highly dependent on the global context of the current scene. A dynamic channel attention mechanism based on global statistical awareness is designed, utilizing global average pooling (GAP) to compress the spatial dimension into channel descriptors. :

[0106] ,

[0107] Where X represents the input feature map, H and W represent the height and width of the feature map, respectively, and c represents the channel index. c This indicates the c-th channel currently being processed. Represents: the pixel activation value at coordinates (i, j) in the c-th channel of the input feature map. The channel descriptor for the c-th channel is a scalar value representing the global statistics of that channel.

[0108] A lightweight perceptron consisting of a single linear layer and a sigmoid activation function are used to generate dynamic channel weight vectors. :

[0109] ,

[0110] Where σ is the Sigmoid activation function;

[0111] By adaptively weighting the original features using dynamic channel weight vectors, the weak signal representation of smoke in complex backgrounds is enhanced.

[0112] ,

[0113] in, The smoke feature representation is enhanced by the "dynamic channel attention mechanism";

[0114] To achieve deep alignment and complementarity of flame and smoke features, the enhanced features generated by the two branches are concatenated along the channel dimension:

[0115] ,

[0116] in, ;

[0117] Apply one Convolutional layer Cross-channel information interaction and dimensionality reduction are performed on the cascaded heterogeneous features to generate the final aligned feature map Y, which is a heterogeneous perception and recognition feature map with strong discriminative power:

[0118] .

[0119] FSAD employs a dual-branch channel attention mechanism to deeply identify the activation intensity distribution of flames and smoke across different channels. This module can perform specific reweighting and adaptive enhancement based on the heterogeneous features of fire and smoke targets, effectively resolving representational conflicts between the two types of targets in feature mapping. Through this channel-level feature alignment, the model can generate highly discriminative heterogeneous perception and recognition feature maps at the initial stage of the backbone network, laying a solid feature foundation for the subsequent accurate capture of non-rigid fire targets.

[0120] In a preferred embodiment of the present invention, step S3 introduces an adaptive spatial feature fusion module (ASFF) into the Neck part of FAA-Net. The ASFF dynamically adjusts the fusion ratio of features from different layers of the backbone network by learning a pixel-level spatial weight map.

[0121] Based on the multi-scale features extracted by the backbone network, ASFF is used to further refine the fusion ratio of features at different levels through a spatial adaptive weighting mechanism. Combined with the IGD module, key fire area information is retained during downsampling, achieving accurate alignment and complementarity of cross-scale features and generating feature representations that are highly robust to targets with drastic scale changes.

[0122] To address the issue of subtle fire point information loss during downsampling of high-resolution features, an importance-guided downsampling module (IGD) is implemented. IGD first generates a pixel-wise importance map M to measure the contribution of spatial location and then performs non-linear enhancement on the input feature X1.

[0123] ,

[0124] ,

[0125] in, This represents shallow high-resolution features (referring to the P3 feature map). and They represent and Convolution operation, Use the Sigmoid activation function; The guiding strength coefficient; express Depthwise convolution; express Pointwise convolution, This is the feature after nonlinear enhancement; through this operation, the model can preferentially retain salient regions with fire discrimination, thereby mitigating information loss while reducing resolution.

[0126] To achieve alignment of multi-scale features within the same feature space, the enhanced features will be... Mid-layer characteristics Compared with upsampled deep features Perform splicing along the channel dimension and utilize... Convolutional layer Generate the original spatial scoring map :

[0127] ,

[0128] ,

[0129] in, This means concatenating the channel numbers of F1, F2, and F3, keeping the size unchanged. C is the number of channels, H is the height, W is the width, and R indicates that every number in the tensor is a real number (including integers, decimals, positive numbers, and negative numbers). In deep learning, the weights or activation values ​​in the feature map are almost all real numbers. The original importance evaluation of each spatial location to the three features was recorded;

[0130] Score chart Apply the Softmax function along the channel dimension to generate three sets of pixel-level normalized weights. , , This allows the sampling location to automatically adjust the fusion ratio based on the actual scale distribution of the flame or smoke target:

[0131] ,

[0132] in, Through this mechanism, when detecting small targets, the weights of shallow features are automatically increased. To obtain fine details; when a large target is detected, the weight of deep features is increased. To leverage global semantics:

[0133] ,

[0134] ,

[0135] Where A is the feature map output by ASFF. These are the features after weighted fusion.

[0136] Through the above steps, ASFF effectively solves the problem of detection instability caused by the drastic spatiotemporal evolution of fire targets, and significantly enhances the feature capture accuracy of the model in complex scenarios.

[0137] The Neck section utilizes the ASFF module to achieve adaptive spatial fusion and alignment of multi-scale features. ASFF dynamically adjusts the fusion ratio of features from different levels of the backbone network by learning pixel-level spatial weight maps.

[0138] When dealing with flames and smoke that change drastically in scale, this module can automatically suppress noise interference from complex backgrounds and enhance the response of key feature regions, thereby achieving accurate alignment and depth complementarity between deep semantics and shallow details, significantly improving the model's ability to perceive the features of non-rigid targets in the spatiotemporal evolution process.

[0139] In a preferred embodiment of the present invention, in step S4, FAA-Net introduces the ARAIOU dynamic aspect ratio adjustment loss function in the detection head part. Based on the geometric morphology information of non-rigid targets such as flames and smoke, the regression weights of the width and height dimensions are adjusted to train the FAA-Net network. The specific method is as follows:

[0140] The regression weights are dynamically adjusted based on the geometric morphology information of the target to optimize the quality of sample regression.

[0141] Meanwhile, a dimensional difference weighting method is adopted to provide differentiated gradient compensation for positive samples of different shapes, thereby optimizing the localization process of bounding boxes.

[0142] Calculate the length and width distribution factors based on the shape information of the predicted target, and adaptively adjust the penalty weights of the length and width dimensions accordingly to achieve dynamic dimension focusing:

[0143] ,

[0144] ,

[0145] in, This is represented by the length and width distribution factors of the predicted bounding box. and These represent the width and height of the predicted bounding box, respectively. and These are the adaptive weighting coefficients in the width and height directions, respectively. This is expressed as a weighted hyperparameter, used to control the steepness of the aspect ratio deviation on the weight distribution; through this formula, the model can automatically apply stronger penalties on geometric dimensions with more significant differences, reducing gradient variance.

[0146] A shape-aware penalty term is introduced to optimize the regression path of selected positive samples, evaluating its shape matching degree and adding geometric constraint information. The shape-aware penalty value is calculated using adaptive weights of the width and height dimensions and the relative size deviation of the predicted / grounded bounding boxes. :

[0147] ,

[0148] in, and These represent the width and height of the actual bounding box, respectively.

[0149] After obtaining the shape-perceived penalty value, it is combined with the basic intersection-union ratio and the dynamic balance factor. Calculate the final regression loss value:

[0150] ,

[0151] ,

[0152] ,

[0153] in, This represents the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box. Represents the x-coordinates of the top-left and bottom-right vertices of the ground truth bounding box and the predicted bounding box; This represents the corresponding y-coordinate. The variance of the diagonal length of the minimum bounding rectangle containing the two boxes is represented by IoU, which is the proportion of the overlap area between the predicted box and the ground truth box to the total coverage area. ARAIoU is the adaptive aspect ratio-aware intersection-union ratio loss function.

[0154] FAA-Net introduces the ARAIoU dynamic aspect ratio adjustment loss function in the detection head to guide the bounding box regression process. ARAIoU can adaptively adjust the regression weights of the width and height dimensions based on the geometric shape information of non-rigid targets such as flames and smoke. This significantly improves the model's localization accuracy and convergence stability for irregular edge targets in complex scenes.

[0155] This invention effectively improves the target feature alignment capability and the adaptability of dynamic regression strategies in flame and smoke detection tasks, enabling more accurate capture of the heterogeneous morphological features of non-rigid fire targets, and significantly improving detection accuracy and performance.

[0156] This invention also provides a flame and smoke detection system based on feature-specific alignment and dynamic aspect ratio adjustment, comprising a data acquisition unit and a processing unit. The data acquisition unit acquires raw feature maps of flames and smoke and inputs them to the processing unit. The processing unit executes the method described in this invention to complete the flame and smoke detection.

[0157] In a preferred embodiment of the present invention, such as Figure 2 As shown, the processing unit is equipped with a fire detection network (FAA-Net) based on feature-specific alignment and dynamic adjustment.

[0158] like Figure 3 As shown, a Feature-Specific Alignment and Adaptation (FSAD) module is embedded at the input of the backbone network CSPDarknet of FAA-Net. After the input features enter the FSAD module, they are simultaneously fed into two specialization branches for processing:

[0159] The flame branch employs a static learnable scaling mechanism, which uses a parameter vector equal to the number of channels to weight the input channel by channel, locking in fixed features of the flame in color and brightness through "experience accumulation".

[0160] The smoke branch introduces a dynamic channel attention mechanism, which captures macroscopic statistical information of the image through global average pooling (GAP), and then uses a lightweight perceptual network to generate a weight vector W in real time, which is used to perform adaptive enhancement for semi-transparent, low-contrast targets such as smoke.

[0161] After processing, the flame enhancement features and smoke enhancement features are concatenated along the channel dimension to form a feature cluster containing multi-dimensional information. Finally, it is processed through a... Convolutional layers enable cross-channel information exchange and feature refinement, integrating complementary information from different branches into the final output feature Y;

[0162] In the Neck section of FAA-Net

[0163] like Figure 4 As shown,

[0164] An adaptive spatial feature fusion module (ASFF) is introduced in the Neck part of FAA-Net to align and adaptively fuse multiple original features from different network depths. Specifically:

[0165] The ASFF module receives feature streams from different levels through multiple parallel inputs. For shallow high-resolution feature paths, the IGD module is configured to perform non-linear downsampling alignment. For medium and deep feature paths, channel mapping alignment is performed through convolutional layers.

[0166] The aligned features are concatenated and aggregated along the channel dimension and connected to a weight prediction branch. This weight prediction branch generates a pixel-level spatial weight distribution through a convolution operator. Finally, the multi-path features are integrated into the output features through a weighted summation operator.

[0167] like Figure 5 As shown, the IGD submodule adopts a dual-branch parallel configuration. Its first branch is an importance-aware branch, which consists of cascaded convolutional layers. Its output generates a pixel-level weight map through the Sigmoid function.

[0168] The second branch is the main path feature enhancement branch. Its input is connected to the original features. The weight map is applied to the original features through a pixel-wise multiplier to achieve saliency enhancement. The enhanced features are then fed into a downsampling layer consisting of depthwise convolution and pointwise convolution. Spatial resolution compression and channel feature reconstruction are achieved through stride convolution, and finally output to the alignment buffer of ASFF.

[0169] The specific embodiments described herein are merely illustrative examples of the present invention. Those skilled in the art can make various modifications or additions to the described embodiments or use similar methods to substitute them, without departing from the technology of the present invention or exceeding the scope defined by the appended claims.

[0170] In the embodiments of this application, terms such as "fixed," "fixed connection," and "fixed connection" refer to common fixing methods in the prior art, such as welding, riveting, and screws. "Rotary connection" refers to common rotary connection methods in the prior art, such as hinges and bearing rotation. If electrical components are provided, the functions, control, and power supply methods of all electrical components are common technical means in the prior art. This application has not improved them and they are not within the protection scope of this application. Therefore, this application will not elaborate on them.

[0171] Furthermore, the selection of materials and strength limitations for all components in this application can be made and arranged by those skilled in the art based on the site environment and the requirements of relevant national or industry standards, and are not within the scope of protection of this application. Therefore, this application will not elaborate on these points.

Claims

1. A flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment, characterized in that, Includes the following steps: S1, Collect the original feature maps of flames and smoke, and input them into the fire detection network (FAA-Net). S2, embed the Feature-Specific Alignment and Adaptive Module (FSAD) into the input of the backbone network CSPDarknet of FAA-Net; FSAD uses a dual-branch channel attention mechanism to identify the activation intensity distribution of flames and smoke in different channels. It achieves specific reweighting and adaptive enhancement based on the heterogeneous features of fire and smoke targets. Through channel-level feature alignment, it generates a heterogeneous perception and recognition feature map with strong discriminative power. S3 introduces an adaptive spatial feature fusion module (ASFF) in the Neck part of FAA-Net. ASFF dynamically adjusts the fusion ratio of features from different levels of the backbone network by learning a pixel-level spatial weight map. S4, FAA-Net introduces the ARAIOU dynamic aspect ratio adjustment loss function in the detection head part. Based on the geometric shape information of non-rigid targets such as flames and smoke, it adjusts the regression weights of the width and height dimensions to train the FAA-Net network. S5: Acquire the fire image to be detected and input it into the optimized FAA-Net network to obtain the target detection result.

2. The flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment according to claim 1, characterized in that, In step S2, FSAD uses a dual-branch channel attention mechanism to identify the activation intensity distribution of flames and smoke in different channels. Based on the heterogeneous features of the fire and smoke targets, it performs specific reweighting and adaptive enhancement. Through channel-level feature alignment, it generates a heterogeneous perception and recognition feature map with strong discriminative power. The specific steps are as follows: In FSAD, parallel flame enhancement and smoke perception branches are designed, and the input feature maps are... Send to these two parallel processing paths: Design a statically learnable scaling mechanism that introduces a learnable parameter vector with the same number of input channels. Channel-by-channel static weight compensation is performed on the input features: , in, This represents element-wise multiplication channel by channel. This represents the flame enhancement feature representation after processing by a static learnable scaling mechanism. We design a dynamic channel attention mechanism based on global statistical awareness, which uses global average pooling (GAP) to compress the spatial dimension into channel descriptors: , Where X represents the input feature map, H and W represent the height and width of the feature map, respectively, and c represents the channel index. c This indicates the c-th channel currently being processed. Represents: the pixel activation value at coordinates (i, j) in the c-th channel of the input feature map. The channel descriptor for the c-th channel is a scalar value representing the global statistics of that channel. A lightweight perceptron consisting of a single linear layer and a sigmoid activation function are used to generate dynamic channel weight vectors. : , Where σ is the Sigmoid activation function; By adaptively weighting the original features using dynamic channel weight vectors, the weak signal representation of smoke in complex backgrounds is enhanced. , in, The smoke feature representation is enhanced by the "dynamic channel attention mechanism"; To achieve deep alignment and complementarity of flame and smoke features, the enhanced features generated by the two branches are concatenated along the channel dimension: , in, ; Apply one Convolutional layer Cross-channel information interaction and dimensionality reduction are performed on the cascaded heterogeneous features to generate the final aligned feature map Y, which is a heterogeneous perception and recognition feature map with strong discriminative power: 。 3. The flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment according to claim 1, characterized in that, Step S3 introduces an Adaptive Spatial Feature Fusion (ASFF) module into the Neck part of FAA-Net. ASFF dynamically adjusts the fusion ratio of features from different layers of the backbone network by learning pixel-level spatial weight maps. The steps are as follows: An importance-guided downsampling module (IGD) is set up. IGD first generates a pixel-wise importance map M to measure the contribution of spatial location, and then performs non-linear enhancement on the input feature X1. , , in, Indicates shallow high-resolution features. and They represent and Convolution operation, Use the Sigmoid activation function; The guiding strength coefficient; express Depthwise convolution; express Pointwise convolution, These are features enhanced by nonlinearity; Enhanced features Mid-layer characteristics Compared with upsampled deep features Perform splicing along the channel dimension and utilize... Convolutional layer Generate the original spatial scoring map : , , in, This means concatenating the channel numbers of F1, F2, and F3, keeping the size unchanged. C is the number of channels, H is the height, W is the width, and R indicates that each number in the tensor is a real number (including integers, decimals, positive numbers, and negative numbers). The original importance evaluation of each spatial location to the three features was recorded; Score chart Apply the Softmax function along the channel dimension to generate three sets of pixel-level normalized weights. , , This allows the sampling location to automatically adjust the fusion ratio based on the actual scale distribution of the flame or smoke target: , in, Through this mechanism, when detecting small targets, the weights of shallow features are automatically increased. To obtain fine details; when a large target is detected, the weight of deep features is increased. To leverage global semantics: , , Where A is the feature map output by ASFF. These are the features after weighted fusion.

4. The flame and smoke detection method based on feature-specific alignment and dynamic aspect ratio adjustment according to claim 1, characterized in that, In step S4, FAA-Net introduces the ARAIOU dynamic aspect ratio adjustment loss function in the detection head. Based on the geometric morphology information of non-rigid targets such as flames and smoke, it adjusts the regression weights of the width and height dimensions to train the FAA-Net network. The specific method is as follows: Calculate the length and width distribution factors based on the shape information of the predicted target, and adaptively adjust the penalty weights of the length and width dimensions accordingly to achieve dynamic dimension focusing: , , in, This is represented by the length and width distribution factors of the predicted bounding box. and These represent the width and height of the predicted bounding box, respectively. and These are the adaptive weighting coefficients in the width and height directions, respectively. It is represented as a weighted hyperparameter, used to control the steepness of the aspect ratio deviation on the weight distribution; The shape-aware penalty is calculated by using adaptive weights in the width and height dimensions and the relative size deviation between the predicted and ground truth bounding boxes. : , in, and These represent the width and height of the actual bounding box, respectively. After obtaining the shape-perceived penalty value, it is combined with the basic intersection-union ratio and the dynamic balance factor. Calculate the final regression loss value: , , , in, This represents the Euclidean distance between the center point of the predicted bounding box and the center point of the ground truth bounding box. Represents the x-coordinates of the top-left and bottom-right vertices of the ground truth bounding box and the predicted bounding box; This represents the corresponding y-coordinate. The variance of the diagonal length of the minimum bounding rectangle containing the two boxes is represented by IoU, which is the proportion of the overlap area between the predicted box and the ground truth box to the total coverage area. ARAIoU is the adaptive aspect ratio-aware intersection-union ratio loss function.

5. A flame and smoke detection system based on feature-specific alignment and dynamic aspect ratio adjustment, characterized in that, It includes a data acquisition unit and a processing unit. The data acquisition unit is used to acquire the original feature maps of flames and smoke and input them into the processing unit. The processing unit executes the method described in any one of claims 1-4 to complete the flame and smoke detection.

6. The flame and smoke detection system based on feature-specific alignment and dynamic aspect ratio adjustment according to claim 5, characterized in that, The processing unit is equipped with a fire detection network (FAA-Net). The Feature-Specific Alignment and Adaptation (FSAD) module is embedded at the input of the backbone network CSPDarknet of FAA-Net. After the input features enter the FSAD module, they are simultaneously fed into two specialization branches for processing: The flame branch employs a static learnable scaling mechanism, which uses a parameter vector equal to the number of channels to weight the input channel by channel, locking in fixed features of the flame in color and brightness through "experience accumulation". The smoke branch introduces a dynamic channel attention mechanism, which captures the macroscopic statistical information of the image through global average pooling (GAP), and then uses a lightweight perceptual network to generate a weight vector W in real time, so as to perform adaptive enhancement for the semi-transparent and low-contrast target of smoke. After processing, the flame enhancement features and smoke enhancement features are concatenated along the channel dimension to form a feature cluster containing multi-dimensional information. Finally, it is processed through a... Convolutional layers enable cross-channel information exchange and feature refinement, integrating complementary information from different branches into the final output feature Y; An adaptive spatial feature fusion module (ASFF) is introduced in the Neck part of FAA-Net to align and adaptively fuse multiple original features from different network depths. Specifically: The ASFF module receives feature streams from different levels through multiple parallel inputs. For shallow high-resolution feature paths, the IGD module is configured to perform non-linear downsampling alignment. For medium and deep feature paths, channel mapping alignment is performed through convolutional layers. The aligned features are concatenated and aggregated along the channel dimension and connected to a weight prediction branch. This weight prediction branch generates a pixel-level spatial weight distribution through a convolution operator. Finally, the multi-path features are integrated into the output features through a weighted summation operator. The IGD submodule adopts a dual-branch parallel configuration. Its first branch is an importance-aware branch, which consists of cascaded convolutional layers. Its output generates a pixel-level weight map through the Sigmoid function. The second branch is the main path feature enhancement branch. Its input is connected to the original features. The weight map is applied to the original features through a pixel-wise multiplier to achieve saliency enhancement. The enhanced features are then fed into a downsampling layer consisting of depthwise convolution and pointwise convolution. Spatial resolution compression and channel feature reconstruction are achieved through stride convolution, and finally output to the alignment buffer of ASFF.