Fire subject regression detection method and system based on spatial adaptive reconstruction and semantic purification
By introducing spatial adaptive reconstruction and semantic purification methods, the detection accuracy problem in flame detection under irregular shapes and complex backgrounds is solved, achieving high-quality feature extraction and accurate localization of flame and smoke targets, thus improving detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUILIN UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-31
AI Technical Summary
Existing flame detection technologies struggle to accurately capture the core visual features of irregularly shaped flames and smoke targets. Complex backgrounds and semantic overlap with the target lead to false detections. Traditional bounding box annotations are mismatched, and traditional IoU metrics cannot adapt to the uncertainty of flame and smoke boundaries, thus limiting detection accuracy.
A fire subject regression detection method based on spatial adaptive reconstruction and semantic purification is adopted. The C2f_ELDC module is used to introduce an efficient linear deformable convolution mechanism for dynamic spatial modeling. The SPF-Net module is combined for semantic-level feature filtering and reconstruction. The Gaussian combined distance loss function is used to optimize the bounding box regression, thereby improving feature extraction and anti-interference ability.
It improves the feature representation ability of irregular flames and smoke targets, enhances the model's anti-interference ability in complex backgrounds and the adaptability of soft boundary target regression supervision, and significantly improves detection accuracy and robustness.
Smart Images

Figure CN122493391A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fire detection technology and relates to a fire subject regression detection method and system based on spatial adaptive reconstruction and semantic purification. 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) Irregular target shape: Flames and smoke are typical non-rigid targets. Their shape changes drastically with the environment, wind force and the properties of the combustibles. They lack a fixed geometric structure, which leads to insufficient feature representation in traditional models and makes it difficult to capture their core visual features.
[0004] 2) Complex background and target semantic aliasing: In real-world scenarios, fire-like targets such as sunsets and lights, as well as complex textured backgrounds, can easily overlap with the features of real flames. This aliasing of category semantic features makes it difficult for the model to distinguish between the target and background noise, leading to frequent false detections.
[0005] 3) Bounding box annotation mismatch: Due to the diffuse nature of flames and smoke, their edges are blurred and dynamically evolving. Traditional rectangular bounding boxes are insufficient to accurately depict their true contours, leading to bounding box annotation mismatch. This can easily cause limited localization accuracy and non-convergence issues during model training.
[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 highly irregular flames or smoke columns. This is mainly because traditional IoU, a rigid metric based on deterministic boundaries, cannot adequately handle the inherent uncertainty and ambiguity of flame and smoke boundaries. This leads to unstable bounding box regression and inaccurate target boundary contour capture, thus affecting 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 fire subject regression detection method and system based on spatial adaptive reconstruction and semantic purification.
[0008] To achieve the above objectives, the basic solution of this invention is: a fire subject regression detection method based on spatial adaptive reconstruction and semantic purification, comprising the following steps:
[0009] S1, Construct SPSR-Net (Fire Main Regression Detection Network);
[0010] S2, the C2f_ELDC (spatial adaptive reconstruction) module is embedded into the backbone network of SPSR-Net to replace the original C2f module. C2f_ELDC introduces an efficient linear deformable convolution mechanism to adaptively adjust the receptive field and perform dynamic spatial modeling, extracting high-order feature maps with morphological adaptability.
[0011] In the Neck part of SPSR-Net, the SPF-Net (signal purification and multi-scale feature fusion) module is introduced. The high-order feature map with morphological adaptability is input into the Neck part, and the semantic-level feature filtering and reconstruction mechanism is used to filter and weight the data to extract pure fire semantic information.
[0012] Pure fire semantic information is input into the SPSR-Net detector head, and the predicted bounding box is regressed and optimized using the Gaussian combined distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-height difference.
[0013] S3: Acquire the fire image to be detected and input it into the optimized fire subject regression detection network to obtain the fire subject regression detection result.
[0014] The working principle and beneficial effects of this basic scheme are as follows: This technical scheme designs the C2f_ELDC module, introduces an efficient linear deformable convolution mechanism, and enhances the network's ability to extract features of irregular flame boundaries and diffuse smoke morphology through adaptive receptive field adjustment and dynamic spatial modeling, thereby improving the representation accuracy in complex scenes while taking into account computational efficiency.
[0015] Furthermore, an SPF-Net module was constructed, which actively suppresses fire-like noise and complex background interference in the low-level features through semantic-level feature filtering and reconstruction mechanisms, thereby extracting purer fire semantic information and enhancing the model's anti-interference ability in complex environments.
[0016] This invention introduces the GCD loss function and constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-to-height difference, replacing the traditional IoU optimization method based on boundary overlap. This makes regression supervision more adaptable to the regional approximate labeling of soft boundary targets such as flames and smoke, and improves the model's ability to learn the localization and scale consistency of the main area.
[0017] SPSR-Net effectively improves the feature representation ability of irregular targets, the semantic anti-interference ability in complex backgrounds, and the adaptability of soft boundary target regression supervision in flame and smoke detection tasks. It can more accurately focus on the main fire area and improve the consistency of scale learning, thereby significantly improving the detection accuracy, robustness and generalization ability in complex scenes.
[0018] Furthermore, the C2f_ELDC (Spatial Adaptive Reconstruction) module is embedded into the backbone network of SPSR-Net to replace the original C2f module. C2f_ELDC introduces an efficient linear deformable convolution mechanism to adaptively adjust the receptive field and perform dynamic spatial modeling. The method for extracting high-order feature maps with morphological adaptability is as follows:
[0019] The fire image to be detected is transformed into an input feature map through a backbone network, and the input feature map F is then segmented using a feature segmentation operation. in Assigned to two independent paths: a short path that preserves gradients and a long path that processes semantics.
[0020] ,
[0021] Among them, F id and F main These represent the short path features and long path features obtained by equal-proportion segmentation, respectively, where r is the segmentation ratio; split represents the feature segmentation operation function.
[0022] Long paths are processed through n stacked geometrically adaptive computation blocks. An efficient linear deformable convolution ELDConv is introduced in the middle layer of each geometrically adaptive computation block to extract local features F through channel compression. mid Generate offsets to drive sampled mesh deformation:
[0023] ,
[0024] Among them, F mid This represents the intermediate feature map, i.e., local features; This represents the learned spatial offset; OffsetNet represents the channel compression function.
[0025] The bilinear interpolation operator GridSample, based on the underlying fusion mechanism, resamples features according to the deformed grid:
[0026] ,
[0027] in, This represents the deformed mesh; Indicates the reference coordinates; Indicates the initial sampling shape offset; This represents the learned spatial offset; The representation is the feature of N points "after moving their positions"; stack represents the spatial stacking operation, which vertically concatenates the coordinates of N sampling points in the height dimension;
[0028] The sampling points are fused using linear aggregation convolution to generate the output feature F of the bottleneck layer. EL :
[0029] ,
[0030] Where k represents the size of the convolution kernel, and N represents the number of sampling points;
[0031] The output features of all bottleneck layers are aggregated with the identity features of the shortest path, and then channel fusion is performed through a 1×1 convolutional module:
[0032] ,
[0033] in, This represents the output feature of the i-th (geometric adaptive computation block) Bottleneck_LD block, and Concat indicates the feature concatenation operation. This is a high-order feature map with morphological adaptability. For the initial branch identity feature, Based on the characteristics of the branch processing.
[0034] C2f_ELDC introduces an efficient linear deformable convolution mechanism. Through adaptive receptive field adjustment and dynamic spatial modeling, it predicts the offset of sampling points in real time, thereby generating a feature extraction operator that is adaptively adjusted according to the irregular flame boundary and diffuse smoke morphology. This enables accurate capture of nonlinear geometric deformation features and generates high-order feature maps with morphological adaptability.
[0035] Furthermore, an SPF-Net module is introduced into the Neck part of SPSR-Net. A morphologically adaptive high-order feature map is input into the Neck part, and semantic-level feature filtering and reconstruction mechanisms are used for selection and weighting to extract pure fire semantic information. The specific steps are as follows:
[0036] The SPF-Net module receives multi-scale features (P3, P4, P5) from the backbone network output, uses deep features as semantic guides, and leverages the channel attention (CA) mechanism to enhance the expressive power of specific channels:
[0037] ,
[0038] Where F is the input feature map, , These represent the global average pooling operation and the global max pooling operation, respectively; σ is the Sigmoid function, and CA(F) represents the result of the function mapping.
[0039] The features processed by CA are then fused stepwise from top to bottom via transposed convolution to generate a set of spatially aligned and texture-enhanced intermediate features (N3, N4, N5):
[0040] ,
[0041] ,
[0042] ,
[0043] Among them, P i Let be the output feature map of the i-th layer in the backbone network, where when At that time, they correspond to multi-scale feature layers with scales of P3 and P4, respectively; O represents the final feature representation after multi-scale dynamic aggregation and global semantic residual enhancement;
[0044] Multi-scale attention (MSA) is used to establish non-linear interactions between features of different dimensions. Intermediate features are aligned and concatenated. Then, scale-adaptive weights w are generated by learning the non-linear interactions between channels through global average pooling and a multilayer perceptron (MLP).
[0045] ,
[0046] Where w represents the adaptive weighting coefficient for features at different scales;
[0047] By reweighting features at each scale using adaptive weighting coefficients, and dynamically aggregating features at each scale, the output F of the MSA branch is generated. msa This is then combined with the highest-level semantic feature N5 through a global residual connection to generate the final enhanced feature output:
[0048] ,
[0049] Among them, F msa The aggregated output representing the MSA branch, This indicates element-wise multiplication. This indicates the characteristics of different input systems, referring to N3, N4, and N5. This represents the adaptive weighting coefficients for features at different scales.
[0050] The SPF-Net module utilizes semantic-level feature filtering and reconstruction mechanisms to filter and weight the low-level features output by the backbone network. This serves as a guide to actively suppress "fire-like" light and shadow noise and complex background interference, thereby further extracting pure fire semantic information and enhancing the model's feature discrimination in complex environments.
[0051] Furthermore, the pure fire semantic information is input into the SPSR-Net detection head, and the predicted bounding box is optimized by regression using the Gaussian Combined Distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-to-height difference. The specific steps are as follows:
[0052] D measures the alignment between the center points of the predicted bounding box and the ground truth bounding box. loc :
[0053] ,
[0054] Where (x, y, w, h) and (x gt , y gt , w gt , h gt ) represent the center coordinates and width and height of the predicted bounding box and the ground truth bounding box, respectively;
[0055] Calculate the symmetrical scale distance D using the relative proportions of the width and height of both sides. shape Simultaneously, measure the difference in aspect ratio:
[0056] ,
[0057] Alignment level D loc The combined geometric distance D is obtained by aggregating the symmetric scale distance and the geometric distance. GCD And construct a regression loss function L based on Gaussian mapping. GCD :
[0058] ,
[0059] .
[0060] The GCD loss function uses the consistency of the target's central region to guide the model's convergence, enabling the regression supervision process to adapt to the regional approximate labeling of soft boundary targets such as flames and smoke, thereby optimizing the model's localization accuracy and scale learning ability for the main region.
[0061] The present invention also provides a fire subject regression detection system based on spatial adaptive reconstruction and semantic purification, including a data acquisition unit and a processing unit. The data acquisition unit is used to acquire fire images to be detected and transmit them to the processing unit.
[0062] The processing unit executes the method described in this invention and outputs the fire main body regression detection results.
[0063] This system utilizes data acquisition and processing units to obtain the fire main body regression detection results, and is easy to operate.
[0064] Furthermore, the processing unit is equipped with an SPSR-Net network, which includes:
[0065] The backbone network is embedded with a C2f_ELDC module, which is used to adaptively adjust the receptive field and perform dynamic spatial modeling through an efficient linear deformable convolution mechanism, and extract high-order feature maps with irregular flame boundaries or diffuse smoke morphology adaptability.
[0066] The neck network is connected to the backbone network. The neck network includes an SPF-Net module, which is used to perform semantic-level feature filtering and reconstruction on the high-order feature map to extract pure fire semantic information.
[0067] The detection head, connected to the neck network, is used to perform regression optimization on the predicted bounding box using the Gaussian Combined Distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-to-height difference, and outputs the regression detection result of the fire body.
[0068] The SPSR-Net network significantly improves detection accuracy and performance by deepening target feature representation and enhancing semantic discriminability, while achieving stable capture of flame and smoke regions.
[0069] Furthermore, the C2f_ELDC module includes a channel-adjustable convolutional layer at the input end, a feature segmentation unit, a long path branch composed of cascaded geometrically adaptive computation blocks, and a feature aggregation layer at the end.
[0070] After the input feature map enters the module, it undergoes information preprocessing through a channel-adjustable convolutional layer. The feature segmentation unit then divides the data into a short path identity branch that preserves gradients and a long path branch that performs semantic computation, based on the channel dimension.
[0071] The long path branch performs progressive depth processing on the features through n cascaded geometric adaptive computation blocks. Within each computation block, the spatial offset is learned through an integrated efficient linear deformable convolution (ELDConv) operator, and the features are resampled and stacked using a fusion sampling operator to achieve spatial alignment between the feature path and the irregular boundary of the fire.
[0072] The identity features of short paths, the initial features of long paths, and the output features of each level of geometric adaptive computation blocks are fully spliced and aggregated in the channel dimension. The feature aggregation layer at the end performs cross-depth information refinement and channel fusion to output alignment features with geometric awareness.
[0073] The C2f_ELDC module introduces an efficient linear deformable convolution mechanism. Through adaptive receptive field adjustment and dynamic spatial modeling, it enhances the network's ability to extract features of irregular flame boundaries and diffuse smoke morphology, improving the representation accuracy in complex scenes while maintaining computational efficiency.
[0074] Furthermore, the SPF-Net module includes a series of channel attention units, multi-scale attention units, and an output residual enhancement layer;
[0075] The input multi-scale backbone feature map enters the channel attention unit, which uses the internally integrated channel attention mechanism to extract the salient features of each level, and performs top-down progressive upsampling alignment in conjunction with transposed convolution to generate a set of spatially aligned and texture-enhanced intermediate feature streams.
[0076] The aligned multi-scale features are fed into a multi-scale attention unit, where macroscopic statistical information at each scale is captured through global average pooling, and a scale weight vector is generated using a lightweight perceptual network. Adaptive weighted summation is performed on features at different resolutions, and deep global semantics and shallow local details are aggregated into aggregated features at a single scale.
[0077] The aggregated features are channel-integrated through the output refinement layer consisting of 1×1 convolution, normalization layer and activation function, and added pixel-by-pixel with the residual mapping branch from the highest intermediate layer features. By introducing high-level semantic residuals to compensate for information loss during the fusion process, the semantically purified fire semantics are finally obtained.
[0078] The SPF-Net module actively suppresses "fire-like" noise and complex background interference in the underlying features through semantic-level feature filtering and reconstruction mechanisms, thereby extracting purer fire semantic information and enhancing the model's anti-interference ability in complex environments. Attached Figure Description
[0079] Figure 1 This is a flowchart illustrating the fire subject regression detection method based on spatial adaptive reconstruction and semantic purification of the present invention.
[0080] Figure 2 This is a schematic diagram of the C2f_ELDC module of the fire subject regression detection system based on spatial adaptive reconstruction and semantic purification of the present invention;
[0081] Figure 3This is a flowchart of the ELDConv module of the fire subject regression detection method based on spatial adaptive reconstruction and semantic purification of the present invention.
[0082] Figure 4 This is a schematic diagram of the SPF-Net module of the fire subject regression detection system based on spatial adaptive reconstruction and semantic purification of the present invention. Detailed Implementation
[0083] 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.
[0084] 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.
[0085] 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.
[0086] This invention discloses a fire subject regression detection method based on spatial adaptive reconstruction and semantic purification, achieving high-quality feature extraction and semantic purification for irregular flame and smoke targets, and constructing a dynamic regression optimization mechanism suitable for soft-boundary targets. By combining efficient linear deformable feature extraction, semantic filtering reconstruction, and subject constraint mechanisms, the accuracy, robustness, and generalization ability of flame and smoke detection in complex backgrounds are improved.
[0087] like Figure 1 As shown, the fire subject regression detection method based on spatial adaptive reconstruction and semantic purification includes the following steps:
[0088] S1, based on the existing network YOLOv8s, constructs SPSR-Net (Fire Body Regression Detection Network), which consists of a backbone network, a neck network, and a detection head connected sequentially:
[0089] The backbone network, through a series of convolutional layers, a cross-stage fusion module, and a spatial adaptive reconstruction module, combined with the terminal spatial pyramid, achieves deep extraction of fire features and multi-scale perception and recognition.
[0090] The neck network receives feature outputs from different levels of the backbone network through skip connections, and uses upsampling, splicing layers and signal purification and fusion modules to perform bidirectional interaction and semantic enhancement of features;
[0091] The detection head targets the multi-scale fusion features output by the neck network, adopts the V8 detection architecture and combines a bounding box regression branch based on Gaussian combination distance, and finally achieves accurate classification and location output of the fire subject.
[0092] The cross-stage fusion module (corresponding to the C2f module in the engineering implementation) adopts a dual-branch flow structure. First, the input features are channel-segmented through 1×1 convolution to form an initial residual branch and a main processing branch. The main processing branch contains a feature transformation chain composed of multiple bottleneck units cascaded together. The core feature of this module is that the intermediate output features generated by each bottleneck unit are fed back to the fusion node in real time through skip connections, and multiple concatenations are performed with the initial residual branch in the channel dimension. Through this dense cross-stage information interaction, the gradient propagation path is significantly broadened and the degradation problem of deep networks is alleviated, while the deep aggregation of multi-scale semantic features of the fire subject is achieved. Finally, the highly robust refined feature tensor is output through the aggregation convolutional layer.
[0093] Purification and fusion is the SPF-Net module.
[0094] S2, the C2f_ELDC (spatial adaptive reconstruction) module is embedded into the backbone network of SPSR-Net to replace the original C2f module. C2f_ELDC introduces an efficient linear deformable convolution mechanism to adaptively adjust the receptive field and perform dynamic spatial modeling, extracting high-order feature maps with morphological adaptability.
[0095] In the Neck part of SPSR-Net, the SPF-Net (signal purification and multi-scale feature fusion) module is introduced. The high-order feature map with morphological adaptability is input into the Neck part, and the semantic-level feature filtering and reconstruction mechanism is used to filter and weight the data to extract pure fire semantic information.
[0096] Pure fire semantic information is input into the SPSR-Net detector head, and the predicted bounding box is regressed and optimized using the Gaussian combined distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-height difference.
[0097] S3 acquires the fire image to be detected and inputs it into the optimized fire subject regression detection network to obtain the fire subject regression detection result. The accuracy and robustness of flame and smoke detection in complex scenes are improved through feature representation optimization, semantic cleansing enhancement, and subject region constraints.
[0098] The optimized SPSR-Net effectively improves the feature representation ability of irregular targets, the semantic anti-interference ability in complex backgrounds, and the adaptability of soft boundary target regression supervision in flame and smoke detection tasks. It can more accurately focus on the main fire area and improve the consistency of scale learning, thereby significantly improving the detection accuracy, robustness and generalization ability in complex scenes.
[0099] In a preferred embodiment of the present invention, the C2f_ELDC (Spatial Adaptive Reconstruction) module is embedded in the backbone network YOLOv8 of SPSR-Net to replace the original C2f module. C2f_ELDC introduces an efficient linear deformable convolution mechanism to adaptively adjust the receptive field and perform dynamic spatial modeling. The method for extracting high-order feature maps with morphological adaptability is as follows:
[0100] To avoid dynamic target shape mismatch caused by standard convolutional fixed geometry sampling and to enhance the representation ability of highly irregular targets such as fire and smoke, a spatial adaptive reconstruction module C2f_ELDC is proposed.
[0101] This module aims to use a linear deformable mechanism to drive adaptive reconstruction of the receptive field, thereby achieving accurate spatial-semantic alignment between the feature extraction path and complex boundaries.
[0102] Within C2f_ELDC, an efficient linear deformable convolution ELDConv based on a fusion sampling operator is designed, such as... Figure 3 As shown, this design reconstructs the feature resampling process through implicit coordinate transformation, avoiding the materialization of intermediate feature maps. While optimizing memory access patterns, it significantly improves the computational density and execution efficiency of the operator.
[0103] The fire image to be detected is transformed into an input feature map through a backbone network (the backbone network performs multi-scale convolution operations on the original fire image, nonlinearly mapping the original pixel space to a high-dimensional feature space. In this process, the network can automatically decouple and extract the color distribution, edge texture, and geometric features of the flame, thereby generating an input feature map rich in discriminative information). Feature segmentation is then used to process the input feature map F. in Assigned to two independent paths: a short path that preserves gradients and a long path that processes semantics.
[0104] ,
[0105] Among them, F id and F main These represent the short path features and long path features obtained by equal-proportion segmentation, respectively, where r is the segmentation ratio; split represents the feature segmentation operation function.
[0106] The long path passes through n stacked geometrically adaptive computational blocks (i.e. Figure 2 The bottleneck block in the computation is processed, and an efficient linear deformable convolution ELDConv is introduced in the middle layer of the geometrically adaptive computation block to extract local features F through channel compression. mid Generate offsets to drive sampled mesh deformation:
[0107] ,
[0108] Among them, F mid This represents the intermediate feature map, i.e., local features; This represents the learned spatial offset; OffsetNet represents the channel compression function.
[0109] Efficient Linear Deformable Convolution (ELDConv) utilizes lightweight convolutional branches to extract spatial offset features from the input features. These offset features are then superimposed onto a predefined linear sampling shape reference, generating a dynamic sampling coordinate matrix. This coordinate matrix is used to perform bilinear interpolation sampling on the input features, and a row-direction stacking strategy is employed to reconstruct the N sampled feature points into a linearly arranged feature flow. Finally, a fusion convolutional layer with a kernel size of N × 1 integrates the information from the linear feature flow, achieving adaptive modeling of irregular fire source shapes with extremely low parameter counts.
[0110] The bilinear interpolation operator GridSample, based on the underlying fusion mechanism, resamples features according to the deformed grid:
[0111] ,
[0112] in, This represents the deformed mesh; Indicates the reference coordinates; Indicates the initial sampling shape offset; This represents the learned spatial offset; The representation is the feature of N points "after moving their positions"; stack represents the spatial stacking operation, which vertically concatenates the coordinates of N sampling points in the height dimension; through this dynamic sampling operation, the model can capture more diverse geometric features;
[0113] The sampling points are fused using linear aggregation convolution to generate the output feature F of the bottleneck layer.EL :
[0114] ,
[0115] Where k represents the size of the convolution kernel, and N represents the number of sampling points;
[0116] To fuse multi-scale geometric features across different depths, the output features of all bottleneck layers are aggregated with the identity features of short paths, and channel fusion is performed through a 1×1 convolutional module:
[0117] ,
[0118] in, The output feature of the i-th bottleneck block is represented by Concat, which indicates the feature concatenation operation. This is a high-order feature map with morphological adaptability. For the initial branch identity feature, This design uses basic processing of branch features to ensure that the model can both preserve low-level detail textures and capture deep-level global geometric deformations.
[0119] The C2f_ELDC module is designed, which introduces an efficient linear deformable convolution mechanism. Through adaptive receptive field adjustment and dynamic spatial modeling, it enhances the network's ability to extract features of irregular flame boundaries and diffuse smoke morphology, thereby improving the representation accuracy in complex scenes while taking into account computational efficiency.
[0120] In a preferred embodiment of the present invention, an SPF-Net module is introduced into the Neck part of SPSR-Net. A high-order feature map with morphological adaptability is input into the Neck part, and semantic-level feature filtering and reconstruction mechanisms are used for screening and weighting to extract pure fire semantic information. The specific steps are as follows:
[0121] In fire detection scenarios, to mitigate spurious activations introduced by complex backgrounds and reduce false detection rates, a signal purification and fusion module, SPF-Net, was designed. This module enhances discriminative channels and suppresses interference responses through semantically guided feature refinement, while utilizing scale attention-driven global aggregation to achieve adaptive fusion of multi-scale evidence, thereby obtaining a robust semantic representation of fire.
[0122] The SPF-Net module receives multi-scale features (P3, P4, P5) from the backbone network output, uses deep features as semantic guides, and leverages the channel attention (CA) mechanism to enhance the expressive power of specific channels:
[0123] ,
[0124] Where F is the input feature map, generally referring to p3, p4, and p5; , These represent the global average pooling operation and the global max pooling operation, respectively; σ is the Sigmoid function, and CA(F) represents the result of the function mapping.
[0125] The features processed by CA are then fused stepwise from top to bottom via transposed convolution to generate a set of spatially aligned and texture-enhanced intermediate features (N3, N4, N5):
[0126] ,
[0127] ,
[0128] ,
[0129] Among them, P i Let be the output feature map of the i-th layer in the backbone network, where when At that time, they correspond to multi-scale feature layers with scales of P3 and P4, respectively; O represents the final feature representation after multi-scale dynamic aggregation and global semantic residual enhancement;
[0130] To further enhance the expressive power of the current target semantics, multi-scale attention (MSA) is used to establish non-linear interactions between features of different dimensions. Intermediate features are aligned and concatenated, and scale-adaptive weights w are generated through global average pooling and the non-linear interaction between learning channels in a multilayer perceptron (MLP).
[0131] ,
[0132] Where w represents the adaptive weighting coefficient for features at different scales;
[0133] By reweighting features at different scales using adaptive weighting coefficients, the model can adaptively focus on key evidence regions in complex fire scenarios. The output F of the MSA branch is generated by dynamically aggregating features at each scale. msa This is then combined with the highest-level semantic feature N5 through a global residual connection to generate the final enhanced feature output:
[0134] ,
[0135] Among them, F msa The aggregated output representing the MSA branch, This indicates element-wise multiplication. This indicates the characteristics of different input systems, referring to N3, N4, and N5. This represents the adaptive weighting coefficients for features at different scales. This design ensures that shallow textures are effectively denoised before entering the aggregation stage, while retaining key global geometric information in deep features, significantly improving the model's discriminative ability in complex backgrounds.
[0136] An SPF-Net module is constructed, which actively suppresses "fire-like" noise and complex background interference in the low-level features through semantic-level feature filtering and reconstruction mechanisms, thereby extracting purer fire semantic information and enhancing the model's anti-interference ability in complex environments.
[0137] In a preferred embodiment of the present invention, pure fire semantic information is input into the detection head of SPSR-Net, and the predicted bounding box is regressed and optimized using the Gaussian Combined Distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-height difference. The specific steps are as follows:
[0138] In fire detection scenarios, since the rectangular bounding boxes of flame and smoke targets are only approximate constraints of their main regions, traditional loss functions based on IoU overemphasize boundary overlap during training, resulting in insufficient stability of the model when dealing with amorphous targets.
[0139] To address this, Gaussian combined distance (GCD) is introduced, which provides more continuous and stable regression supervision for irregular targets through a symmetric distance metric with bidirectional scale normalization.
[0140] D measures the alignment between the center points of the predicted bounding box and the ground truth bounding box. loc This method uses both the predicted and actual scales to symmetrically normalize the center offset, eliminating the offset error caused by a single-scale reference.
[0141] ,
[0142] Where (x, y, w, h) and (x gt , y gt , w gt , h gt ) represent the center coordinates and width and height of the predicted bounding box and the ground truth bounding box, respectively;
[0143] To accurately characterize the fit of the geometric scale, the symmetrical scale distance D is calculated using the relative proportions of the width and height of both sides. shape Simultaneously, measure the difference in aspect ratio:
[0144] This metric does not depend on the overlap area and can reflect the shape deviation of the target in both the horizontal and vertical dimensions in a balanced way, ensuring that the predicted box and the ground truth box are highly consistent in terms of geometric scale.
[0145] Alignment level D loc The combined geometric distance D is obtained by aggregating the symmetric scale distance and the geometric distance. GCD And construct a regression loss function L based on Gaussian mapping. GCD :
[0146] ,
[0147] .
[0148] A GCD loss function is introduced, constructing a bidirectional scale-normalized symmetric distance metric based on center offset and relative width-to-height difference. This replaces the traditional IoU optimization method based on boundary overlap, making regression supervision more adaptable to the regional approximate labeling of soft boundary targets of flames and smoke, and improving the model's ability to learn the localization and scale consistency of the main region. The exponential loss mechanism provides smooth gradient guidance for different optimization stages, significantly enhancing the model's generalization performance in capturing the main region of fire smoke in complex backgrounds.
[0149] This invention also provides a fire subject regression detection system based on spatial adaptive reconstruction and semantic purification, comprising a data acquisition unit and a processing unit. The data acquisition unit acquires fire images to be detected and transmits them to the processing unit. The processing unit executes the method described in this invention and outputs the fire subject regression detection results.
[0150] In a preferred embodiment of the present invention, the processing unit is provided with an SPSR-Net network, the SPSR-Net network comprising:
[0151] The backbone network is embedded with a C2f_ELDC module, which is used to adaptively adjust the receptive field and perform dynamic spatial modeling through an efficient linear deformable convolution mechanism, and extract high-order feature maps with irregular flame boundaries or diffuse smoke morphology adaptability.
[0152] The neck network is connected to the backbone network. The neck network includes an SPF-Net module, which is used to perform semantic-level feature filtering and reconstruction on the high-order feature map to extract pure fire semantic information.
[0153] The detection head, connected to the neck network, is used to perform regression optimization on the predicted bounding box using the Gaussian Combined Distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-to-height difference, and outputs the regression detection result of the fire body.
[0154] SPSR-Net can effectively improve the model's ability to represent features of irregular flames and diffuse smoke targets, its semantic anti-interference ability in complex backgrounds, and its adaptability to soft boundary target regression supervision, thereby more accurately focusing on the main fire area and significantly improving the accuracy, robustness, and real-time performance of flame and smoke detection.
[0155] In a preferred embodiment of the present invention, such as Figure 2 As shown, the C2f_ELDC module includes a channel-adjusted convolutional layer at the input end, a feature segmentation unit, a long path branch consisting of cascaded geometrically adaptive computation blocks, and a feature aggregation layer at the end.
[0156] After the input feature map enters the module, it undergoes information preprocessing through a channel-adjustable convolutional layer. The feature segmentation unit then divides the data into a short path identity branch that preserves gradients and a long path branch that performs semantic computation, based on the channel dimension.
[0157] The long path branch performs progressive depth processing on the features through n cascaded geometric adaptive computation blocks. Within each computation block, the spatial offset is learned through an integrated efficient linear deformable convolution (ELDConv) operator, and the features are resampled and stacked using a fusion sampling operator to achieve spatial alignment between the feature path and the irregular boundary of the fire.
[0158] The identity features of short paths, the initial features of long paths, and the output features of each level of geometric adaptive computation blocks are fully spliced and aggregated in the channel dimension. The feature aggregation layer at the end performs cross-depth information refinement and channel fusion to output alignment features with geometric awareness.
[0159] In a preferred embodiment of the present invention, such as Figure 4 As shown, the SPF-Net module includes cascaded channel attention units, multi-scale attention units, and an output residual enhancement layer;
[0160] The input multi-scale backbone feature map enters the channel attention unit, which uses the internally integrated channel attention mechanism to extract the salient features of each level, and performs top-down progressive upsampling alignment in conjunction with transposed convolution to generate a set of spatially aligned and texture-enhanced intermediate feature streams.
[0161] The aligned multi-scale features are fed into a multi-scale attention unit, where macroscopic statistical information at each scale is captured through global average pooling, and a scale weight vector is generated using a lightweight perceptual network. Adaptive weighted summation is performed on features at different resolutions, and deep global semantics and shallow local details are aggregated into aggregated features at a single scale.
[0162] The aggregated features are channel-integrated through the output refinement layer consisting of 1×1 convolution, normalization layer and activation function, and added pixel-by-pixel with the residual mapping branch from the highest intermediate layer features. By introducing high-level semantic residuals to compensate for information loss during the fusion process, the semantically purified fire semantics are finally obtained.
[0163] 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.
[0164] 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.
[0165] 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 fire subject regression detection method based on spatial adaptive reconstruction and semantic purification, characterized in that, Includes the following steps: S1, Construct the SPSR-Net fire subject regression detection network; S2, the C2f_ELDC (spatial adaptive reconstruction) module is embedded into the backbone network of SPSR-Net to replace the original C2f module. C2f_ELDC introduces an efficient linear deformable convolution mechanism to adaptively adjust the receptive field and perform dynamic spatial modeling, extracting high-order feature maps with morphological adaptability. In the Neck part of SPSR-Net, the SPF-Net (signal purification and multi-scale feature fusion) module is introduced. The high-order feature map with morphological adaptability is input into the Neck part, and the semantic-level feature filtering and reconstruction mechanism is used to filter and weight the data to extract pure fire semantic information. Pure fire semantic information is input into the SPSR-Net detector head, and the predicted bounding box is regressed and optimized using the Gaussian combined distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-height difference. S3: Acquire the fire image to be detected and input it into the optimized fire subject regression detection network to obtain the fire subject regression detection result.
2. The fire subject regression detection method based on spatial adaptive reconstruction and semantic purification according to claim 1, characterized in that, The C2f_ELDC (Spatial Adaptive Reconstruction) module is embedded into the backbone network of SPSR-Net to replace the original C2f module. C2f_ELDC introduces an efficient linear deformable convolution mechanism to adaptively adjust the receptive field and perform dynamic spatial modeling. The method for extracting high-order feature maps with morphological adaptability is as follows: The fire image to be detected is converted into an input feature map through a backbone network, and a feature segmentation operation is performed on the input feature map F in is allocated to two independent paths: a short path that retains gradients and a long path that processes semantics: , where F id and F main represent the short path feature and the long path feature obtained by equal proportion splitting, respectively, r is the splitting proportion; split represents a feature splitting operation function; The long path is processed through n stacked geometry adaptive computing blocks, and an efficient linear deformable convolution ELDConv is introduced in the middle layer of the geometry adaptive computing block, and local features F are extracted through channel compression mid Generate an offset to drive the sampling grid deformation: , Among them, F mid This represents the intermediate feature map, i.e., local features; This represents the learned spatial offset; OffsetNet represents the channel compression function. The bilinear interpolation operator GridSample, based on the underlying fusion mechanism, resamples features according to the deformed grid: , in, This represents the deformed mesh; Indicates the reference coordinates; Indicates the initial sampling shape offset; This represents the learned spatial offset; The representation is the feature of the point after moving N positions; stack represents the spatial stacking operation, which vertically concatenates the coordinates of N sampling points in the height dimension; The output features F of the bottleneck layer are generated by fusing the sampling points using linear aggregation convolution EL : , Where k represents the size of the convolution kernel, and N represents the number of sampling points; The output features of all bottleneck layers are aggregated with the identity features of the shortest path, and then channel fusion is performed through a 1×1 convolutional module: , in, The output feature of the i-th bottleneck block is represented by Concat, which indicates the feature concatenation operation. This is a high-order feature map with morphological adaptability. For the initial branch identity feature, Based on the characteristics of the branch processing.
3. The fire subject regression detection method based on spatial adaptive reconstruction and semantic purification according to claim 1, characterized in that, An SPF-Net module is introduced into the Neck part of SPSR-Net. A morphologically adaptive high-order feature map is input into the Neck part, and semantic-level feature filtering and reconstruction mechanisms are used for selection and weighting to extract pure fire semantic information. The specific steps are as follows: The SPF-Net module receives multi-scale features (P3, P4, P5) from the backbone network output, uses deep features as semantic guides, and leverages the channel attention (CA) mechanism to enhance the expressive power of specific channels: , Where F is the input feature map, , These represent the global average pooling operation and the global max pooling operation, respectively; σ is the Sigmoid function, and CA(F) represents the result of the function mapping. The features processed by CA are then fused stepwise from top to bottom via transposed convolution to generate a set of spatially aligned and texture-enhanced intermediate features (N3, N4, N5): , , , Among them, P i Let be the output feature map of the i-th layer in the backbone network, where when At that time, they correspond to multi-scale feature layers with scales of P3 and P4, respectively; O represents the final feature representation after multi-scale dynamic aggregation and global semantic residual enhancement. Multi-scale attention (MSA) is used to establish non-linear interactions between features of different dimensions. Intermediate features are aligned and concatenated. Then, scale-adaptive weights w are generated by learning the non-linear interactions between channels through global average pooling and a multilayer perceptron (MLP). , Where w represents the adaptive weighting coefficient for features at different scales; The output F of the MSA branch is generated by dynamically aggregating each scale feature by re-weighting each scale feature through adaptive weight coefficients msa and combining it with the highest layer semantic feature N5 through a global residual connection to generate the final enhanced feature output: , Among them, F msa The aggregated output representing the MSA branch, This indicates element-wise multiplication. This indicates the characteristics of different input systems, referring to N3, N4, and N5. This represents the adaptive weighting coefficients for features at different scales.
4. The fire subject regression detection method based on spatial adaptive reconstruction and semantic purification according to claim 1, characterized in that, Pure fire semantic information is input into the SPSR-Net detector head, and the predicted bounding box is optimized by regression using the Gaussian Combined Distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-to-height difference. The specific steps are as follows: Measuring the degree of alignment D of the predicted box with the true box center points loc : , Where (x, y, w, h) and (x gt , y gt , w gt , h gt ) represent the center coordinates and width and height of the predicted bounding box and the ground truth bounding box, respectively; Calculate the symmetrical scale distance D using the relative proportions of the width and height of both sides. shape Simultaneously, measure the difference in aspect ratio: , Alignment level D loc The combined geometric distance D is obtained by aggregating the symmetric scale distance and the geometric distance. GCD And construct a regression loss function L based on Gaussian mapping. GCD : , 。 5. A fire subject regression detection system based on spatial adaptive reconstruction and semantic purification, characterized in that, It includes a data acquisition unit and a processing unit. The data acquisition unit is used to acquire images of the fire to be detected and transmit them to the processing unit. The processing unit executes the method described in any one of claims 1-4 and outputs the fire main body regression detection results.
6. The fire subject regression detection system based on spatial adaptive reconstruction and semantic purification according to claim 5, characterized in that, The processing unit is equipped with an SPSR-Net network, which includes: The backbone network is embedded with a C2f_ELDC module, which is used to adaptively adjust the receptive field and perform dynamic spatial modeling through an efficient linear deformable convolution mechanism, and extract high-order feature maps with irregular flame boundaries or diffuse smoke morphology adaptability. The neck network is connected to the backbone network. The neck network includes an SPF-Net module, which is used to perform semantic-level feature filtering and reconstruction on the high-order feature map to extract pure fire semantic information. The detection head, connected to the neck network, is used to perform regression optimization on the predicted bounding box using the Gaussian Combined Distance (GCD) loss function. The GCD loss function constructs a bidirectional scale-normalized symmetric distance metric through center offset and relative width-to-height difference, and outputs the regression detection result of the fire body.
7. The fire subject regression detection system based on spatial adaptive reconstruction and semantic purification according to claim 6, characterized in that, The C2f_ELDC module includes a channel-adjustable convolutional layer at the input end, a feature segmentation unit, a long path branch consisting of cascaded geometrically adaptive computation blocks, and a feature aggregation layer at the end. After the input feature map enters the module, it undergoes information preprocessing through a channel-adjustable convolutional layer. The feature segmentation unit then divides the data into a short path identity branch that preserves gradients and a long path branch that performs semantic computation, based on the channel dimension. The long path branch performs progressive depth processing on the features through n cascaded geometric adaptive computation blocks. Within each computation block, the spatial offset is learned through an integrated efficient linear deformable convolution (ELDConv) operator, and the features are resampled and stacked using a fusion sampling operator to achieve spatial alignment between the feature path and the irregular boundary of the fire. The identity features of short paths, the initial features of long paths, and the output features of each level of geometric adaptive computation blocks are fully spliced and aggregated in the channel dimension. The feature aggregation layer at the end performs cross-depth information refinement and channel fusion to output alignment features with geometric awareness.
8. The fire subject regression detection system based on spatial adaptive reconstruction and semantic purification according to claim 6, characterized in that, The SPF-Net module includes cascaded channel attention units, multi-scale attention units, and an output residual enhancement layer; The input multi-scale backbone feature map enters the channel attention unit, which uses the internally integrated channel attention mechanism to extract the salient features of each level, and performs top-down progressive upsampling alignment in conjunction with transposed convolution to generate a set of spatially aligned and texture-enhanced intermediate feature streams. The aligned multi-scale features are fed into a multi-scale attention unit, where macroscopic statistical information at each scale is captured through global average pooling, and a scale weight vector is generated using a lightweight perceptual network. Adaptive weighted summation is performed on features at different resolutions, and deep global semantics and shallow local details are aggregated into aggregated features at a single scale. The aggregated features are channel-integrated through the output refinement layer consisting of 1×1 convolution, normalization layer and activation function, and added pixel-by-pixel with the residual mapping branch from the highest intermediate layer features. By introducing high-level semantic residuals to compensate for information loss during the fusion process, the semantically purified fire semantics are finally obtained.