An infrared small target detection method based on weighted gradient guided fusion
Patent Information
- Application Number
- CN202610572516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-28
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-04-28
AI Technical Summary
[0012]为了解决上述现有技术存在的问题,本发明的目的是提供一种基于加权梯度引导融合的红外小目标检测方法,针对复杂背景条件下红外小目标易被背景响应淹没、在多层下采样过程中能量快速衰减以及在解码重建阶段边缘与结构信息容易被平滑破坏等问题,构建了兼顾显著性增强、多尺度上下文建模、跨层信息交互和边缘保持能力的编码、瓶颈与解码式检测框架
本发明在目标显著性增强、跨层特征传递、复杂背景抑制以及边缘结构保持等方面具有明显优势,具体体现在以下几个方面:
Smart Images

Figure CN122265654B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to an infrared small target detection method based on weighted gradient guided fusion. Background Technology
[0002] Infrared small target detection technology is widely used in target early warning, precision guidance, maritime and air surveillance, unmanned system perception, and intelligent security. Compared with visible light images, infrared images do not depend on external lighting and can maintain stable imaging under conditions such as nighttime, backlighting, and complex weather. Therefore, they have significant application value in all-day, all-weather target detection tasks. However, due to factors such as imaging mechanism, detection distance, sensor noise, and target size limitations, targets in infrared images are usually small in size, low in contrast, with weak texture information, and blurred edges, making their detection significantly more difficult than conventional target detection tasks.
[0003] Existing infrared small target detection methods are mainly divided into two categories: traditional methods and deep learning-based methods.
[0004] On the one hand, traditional methods typically rely on manually designed prior models or filtering strategies, such as local contrast enhancement, morphological filtering, high-pass filtering, low-rank sparse decomposition, and background modeling methods. These methods have a certain detection effect in simple backgrounds or scenes with high target contrast, but under complex background conditions such as clouds, ocean waves, surface thermal radiation textures, and strong noise clutter, they are prone to misclassifying high-response areas of the background as targets, and are also quite sensitive to parameter settings, lacking robustness.
[0005] On the other hand, with the development of deep learning, infrared small target detection methods based on convolutional neural networks have gradually become mainstream. Most existing methods use U-Net or its improved structure as the basic framework, achieving multi-scale feature extraction and recovery through an encoder-decoder structure, and leveraging skip connections to balance high-level semantic information with low-level detail information. These methods have stronger feature representation capabilities than traditional methods, but they still have the following shortcomings in infrared small target scenes with complex backgrounds: (1) The response of weak targets is prone to rapid decay during downsampling: Infrared small targets usually occupy only a few pixels. After multiple convolutions and downsampling, their local brightness response is easily averaged, which leads to a decrease in the salience of the target in deep features and affects the detection accuracy.
[0006] (2) Ordinary convolution lacks the ability to explicitly enhance the central region of small targets: Existing convolution operations usually use the same convolution method for different positions in the receptive field, which makes it difficult to highlight the bright spot features of the center of small infrared targets, resulting in insufficient ability to distinguish between targets and complex backgrounds.
[0007] (3) The cross-layer feature fusion method is relatively crude: Existing skip connections usually adopt direct splicing or addition, which lacks effective modeling of the differences in importance between features of different layers. It is easy to introduce redundant background information during fusion, weakening the edge and structural features of small targets.
[0008] (4) The bottleneck layer is not capable of jointly modeling local and contextual relationships: Ordinary convolution is limited by a fixed receptive field. Although it can extract local structural features, it is difficult to take into account both local response enhancement and larger-scale contextual information modeling in complex background scenes, resulting in limited separability between target and background.
[0009] (5) Edge and structural information is easily destroyed during decoding and reconstruction: During multiple upsampling and convolution recovery processes, the contour and gradient information of small targets are easily weakened, especially for small targets with low contrast and blurred edges, which may result in unclear target contours or even missing detection.
[0010] (6) Existing methods do not make full use of gradient and edge priors: Infrared small targets are usually accompanied by local brightness abrupt changes. Their first-order gradient and second-order gradient information are of great significance for target localization and contour recovery. However, existing methods mostly rely on implicit learning and lack explicit modeling and gating guidance of gradient priors.
[0011] In summary, existing infrared small target detection technologies still have shortcomings in areas such as complex background suppression, preservation of weak and small target responses, stable fusion of cross-layer features, and protection of edge structural information. Therefore, there is an urgent need for a new infrared small target detection technology that can synergistically enhance the saliency, structural integrity, and edge preservation capabilities of small targets while controlling network complexity. Summary of the Invention
[0012] To address the problems existing in the prior art, the present invention aims to provide an infrared small target detection method based on weighted gradient guided fusion. This method addresses issues such as infrared small targets being easily submerged by background response under complex background conditions, rapid energy decay during multi-layer downsampling, and the easy smoothing destruction of edge and structural information during the decoding and reconstruction stage. It constructs an encoding, bottleneck, and decoding detection framework that balances saliency enhancement, multi-scale context modeling, cross-layer information interaction, and edge preservation capabilities.
[0013] To achieve the above objectives, the present invention provides the following solution: An infrared small target detection method based on weighted gradient guided fusion includes: Infrared images are acquired and input into an infrared small target detection model to obtain a target segmentation map. The infrared small target detection model is trained using a training set while optimizing model parameters through loss functions calculated by auxiliary output branches and main output branches set in the bottleneck layer and multiple decoding layers. The weighted convolutional encoder module, which incorporates a weighted convolution mechanism in the infrared small target detection model, extracts multi-scale features layer by layer. Based on the cross-layer jump enhancement module, which incorporates a cross-layer dual attention interaction mechanism, the features are jointly modulated and fused. The spatial resolution of the target features is restored step by step by the decoding and reconstruction module, which incorporates attention-guided fusion and gradient gating enhancement mechanisms.
[0014] Optionally, the infrared small target detection model includes: The weighted convolutional encoder module is used to extract multi-scale features from the infrared image layer by layer to obtain encoded features; The cross-layer skip enhancement module is used to interactively fuse the encoded features to obtain enhanced fused features; The bottleneck enhancement module is used to extract multi-scale contextual features from the enhanced fusion features in parallel through multiple convolutional branches with different dilation rates, and then fuse them by projection convolution after concatenation in the channel dimension. The projective convolutional fusion features are divided according to the target window size, and then each window is flattened into a sequence of the target length. For each target length, layer normalization and multi-head self-attention calculation are performed sequentially. After being enhanced by a feedforward network, the original spatial layout is restored to obtain the target features to be supplemented. A lightweight global mean compensation term is introduced to obtain the target features. The decoding and reconstruction module is used to restore the spatial resolution of the target features step by step to obtain the final enhanced features; The Laplacian edge enhancement and output module is used to perform channel averaging on the final enhanced features, extract high-frequency edge responses, add the high-frequency edge responses to the features to be enhanced to obtain the enhancement result, and then output the target segmentation map through the output branch.
[0015] Optionally, the weighted convolutional encoder module includes: The weighted convolutional encoder unit is used to perform element-wise multiplication of a two-dimensional spatial weighted matrix with a convolutional kernel to obtain a weighted convolutional kernel. The weighted convolutional kernel is used to extract multi-scale features from the infrared image layer by layer to obtain encoded features. The two-dimensional spatial weighted matrix is obtained by constructing and normalizing a one-dimensional weight vector through an outer product. During the element-wise multiplication of the two-dimensional spatial weighted matrix and the convolution kernel, when the size of the two-dimensional spatial weighted matrix is inconsistent with the size of the convolution kernel, the size of the two-dimensional spatial weighted matrix is adjusted by bilinear interpolation.
[0016] Optionally, obtaining the encoded features includes: ; in, Indicates the first Layer coding features, Represents a non-linear activation function. This indicates a batch normalization operation. This represents element-wise multiplication. Indicates the first Layer coding features, For weighted convolution operations, For the first Standard convolutional kernels for each layer, For the first A two-dimensional weighted matrix.
[0017] Optionally, the cross-layer jump enhancement module includes: The cross-layer skip enhancement unit is used to fuse encoded features with high-level semantic discriminative information in adjacent high-level features and detailed edge information in adjacent low-level features to obtain fused features. Enhanced fusion features are generated by jointly modulating the fusion features using channel attention and spatial attention.
[0018] Optionally, generating the enhanced fusion feature includes: ; ; ; in, This indicates a global pooling operation. , For mapping functions, Indicates nonlinear activation. Represents the Sigmoid mapping. and These represent average pooling and max pooling along the channel dimension, respectively. Indicates fusion features, Indicates channel splicing. Represents a convolution mapping. For channel attention, For spatial attention, To enhance fusion features, This is element-wise multiplication.
[0019] Optionally, the decoding and reconstruction module includes: The decoding and reconstruction unit is used to upsample the target features, concatenate the upsampled target features with the corresponding jump enhancement features, and perform structural compensation after convolutional mapping to obtain the feature decoding result. The feature decoding results are subjected to channel attention mapping and spatial attention mapping to obtain attention-enhanced features; The attention enhancement feature is averaged along the channel dimension, and the horizontal and vertical gradients are extracted to obtain the second-order gradient, which is used to construct a gradient guidance map. The gradient guidance map is concatenated with the attention enhancement feature along the channel dimension and fused by convolution to obtain the enhancement feature. The enhancement feature is then multiplied element-wise with the gate weights to obtain the final enhancement feature.
[0020] Optionally, obtaining the final enhanced feature includes: ; ; ; in, To ultimately enhance features, To obtain enhanced features through convolutional fusion, For gating weights, Indicates nonlinear activation. Represents the Sigmoid mapping. To concatenate the gradient guidance map with the original decoded features in the channel dimension, These are the original decoding features, i.e., the basic feature maps from the decoding stage. To represent batch normalization operation, This is a convolution operation.
[0021] Optionally, the loss function includes: ; in, For loss function, This is a true annotated image. , Weights are assigned to the loss branches. The loss function represents the main branch and is used to constrain the main output result. With real labeling The differences between them Indicates the number of auxiliary branches. This represents the index of the auxiliary branch, i = 1, 2, ..., n. The loss function for the auxiliary branches is used to constrain the difference between each auxiliary output and the true label. Let represent the predicted output of the i-th auxiliary branch.
[0022] The beneficial effects of this invention are as follows: This invention has significant advantages in target saliency enhancement, cross-layer feature transfer, complex background suppression, and edge structure preservation, specifically in the following aspects: Enhancing the initial response capability of weak targets: This invention introduces a weighted convolution mechanism in the encoding stage. By embedding a center-enhanced spatial weighting matrix in the convolution kernel, the convolution operation focuses more on the central response region where the target may appear within the local receptive field. Unlike traditional convolution, which uses a uniform modeling approach for all spatial locations, this mechanism effectively enhances the central bright spot response of small infrared targets and suppresses interference from irrelevant regions in complex backgrounds. This improves the sensitivity of shallow features to weak targets, laying a high signal-to-noise ratio feature foundation for subsequent multi-layer semantic extraction.
[0023] Enhancing Cross-Layer Information Interaction: Addressing the issues of coarse feature fusion and the easy introduction of redundant background information in traditional skip connections, this invention establishes a cross-layer skip enhancement module. This module jointly utilizes shallow detail information, current layer features, and deep semantic information, and incorporates channel attention and spatial attention mechanisms to adaptively filter and enhance multi-scale features. This design significantly improves the complementary fusion capability between shallow edge details and deep semantic discriminative information, alleviates the response attenuation phenomenon of small targets caused by multiple downsampling, and enhances the stability of feature transfer.
[0024] Enhancing the separability of targets and backgrounds in complex contexts: In the bottleneck layer, this invention jointly introduces ASPP multi-scale context modeling and Local Window Transformer (LDT) local window relationship modeling mechanisms. On the one hand, multi-scale contextual information is obtained through dilated convolutions with different dilation rates, expanding the network's effective receptive field and enhancing its ability to discriminate the spatial relationship between complex backgrounds and targets. On the other hand, self-attention modeling within local windows strengthens the characterization of fine-grained pixel relationships in local regions, improving the response consistency of low-contrast targets within local areas. The synergistic effect of these two mechanisms enables deep features to have a stronger ability to distinguish weak targets in complex backgrounds.
[0025] Improving Edge Degradation in the Decoding Stage: During the decoding process, this invention employs CBAM attention-guided fusion and Light GradGate gradient gating enhancement mechanisms to explicitly constrain the target structure recovery process. Specifically, the CBAM module filters effective skip features from both channel and spatial dimensions, reducing the introduction of background clutter; the Light GradGate module constructs a gradient prior map by fusing Sobel first-order gradients and Laplace second-order gradients, and enhances and compensates the decoded features through gating, thereby effectively mitigating the blurring of small target edges and structural degradation caused by interpolation, convolution, and feature smoothing.
[0026] Enhancing Target Contour and Structure Preservation: This invention introduces a Laplacian edge enhancement mechanism into the bottleneck deep supervision output branch and the final decoding output branch. By applying high-frequency edge compensation to key output features, it improves the target contour representation and local structural clarity. Simultaneously, an edge output branch is set up, allowing the network to focus on both target existence and edge structure learning, thereby enhancing the target morphological integrity and boundary separation capabilities.
[0027] Improving network training stability and multi-scale adaptability: By setting up multi-scale deep supervision output branches, this invention jointly constrains the outputs of the bottleneck layer and multiple decoding layers during the training phase, enabling shallow, mid-layer, and deep features to directly receive supervision from the detection task. This mechanism not only helps alleviate the gradient propagation difficulties in deep network training, improving convergence speed and training stability, but also significantly enhances the network's adaptability to small infrared targets of different sizes, brightness levels, and background conditions.
[0028] Excellent overall detection performance: This invention demonstrates superior detection performance on multiple publicly available infrared small target detection datasets, achieving detection probabilities of 99.71%, 94.84%, and 99.42% on the SIRST, IRSTD, and NUDT-SIRST datasets, respectively. The IoU values are 80.51%, 67.34%, and 85.34%, respectively. This indicates that the invention possesses strong comprehensive advantages in complex background suppression, weak target saliency enhancement, structure preservation, and edge recovery, making it suitable for infrared small target detection tasks in complex scenes. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a schematic diagram of the network structure of an infrared small target detection method based on weighted gradient guided fusion according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the weighted convolution module structure according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the cross-layer jump enhancement module structure according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the ASPP module structure according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the LWT module structure according to an embodiment of the present invention; Figure 6This is a schematic diagram of the LGG module structure according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the CBAM module structure according to an embodiment of the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0033] like Figure 1 As shown, this embodiment discloses an infrared small target detection method based on weighted gradient guided fusion, including: acquiring infrared images, inputting the infrared images into an infrared small target detection model to obtain a target segmentation map; the infrared small target detection model is trained using a training set while optimizing model parameters through loss functions calculated by auxiliary output branches and main output branches set in the bottleneck layer and multiple decoding layers; multi-scale features are extracted layer by layer using a weighted convolution encoder module that introduces a weighted convolution mechanism in the infrared small target detection model, and the features are jointly modulated and fused based on a cross-layer jump enhancement module that introduces a cross-layer dual attention interaction mechanism; the spatial resolution of the target features is restored step by step through a decoding reconstruction module that introduces attention-guided fusion and gradient gating enhancement mechanisms.
[0034] Specifically, this embodiment discloses an infrared small target detection method based on weighted gradient guided fusion. In view of the problems that infrared small targets are easily submerged by background response under complex background conditions, rapid energy decay during multi-layer downsampling, and easy smoothing destruction of edge and structural information during the decoding and reconstruction stage, an encoding, bottleneck and decoding detection framework is constructed that takes into account saliency enhancement, multi-scale context modeling, cross-layer information interaction and edge preservation capabilities.
[0035] The network comprises: a weighted convolutional encoder module, a cross-layer skip enhancement module, a bottleneck enhancement module, a decoding and reconstruction module, a Laplacian edge enhancement and output module, and a multi-scale deep supervision module. The network input is the raw infrared image, and the main output branch outputs an infrared small target segmentation map (target detection map) corresponding to the input image, used to characterize the spatial distribution of targets at the pixel level.
[0036] From a processing flow perspective, the input infrared image first enters the encoder, where it undergoes multiple levels of convolution and downsampling to progressively extract shallow texture information and deep semantic information. During this process, a weighted convolutional structure is introduced to enhance the response of the target's central region, improving the network's initial representation ability for small targets. Subsequently, the encoded features at each scale are further fused through a cross-layer skip enhancement module to establish robust associations between shallow details, local structures, and high-level semantics. The deepest features enter a bottleneck enhancement module, where multi-scale context extraction and local window relationship modeling further improve the separability of the target from the background under complex background conditions. Then, the decoder progressively restores the spatial resolution of the feature maps, introducing attention-guided fusion and gradient-gated enhancement at each level to improve the target region response and suppress the smoothing effect during reconstruction. Finally, the network generates detection results through the main output branch and implements multi-scale deep supervision through multiple auxiliary output branches to enhance the discriminative ability of features at different levels.
[0037] From a formal perspective, let the input infrared image be denoted as: ; in, Indicates batch size, Indicates the number of input channels. and Let these represent the image height and width, respectively. The network of this invention can then be abstractly represented as: ; in, This represents a weighted convolutional encoder. This indicates enhanced cross-level skipping. This indicates a bottleneck enhancement module. This indicates the decoding and reconstruction module. This indicates the output mapping and deep supervision module. This indicates the final infrared small target detection result.
[0038] Through the above overall design, the present invention can achieve synergistic enhancement of target saliency, structural integrity and edge preservation capability, thereby improving the accuracy and robustness of infrared small target detection.
[0039] Weighted Convolution (WConv) module: Module Function: The weighted convolutional encoder module is located at the front end of the entire network. It is used to extract multi-scale features layer by layer from the input infrared image and highlight the local response of weak targets in the early stages of feature extraction. Since small infrared targets usually occupy only a few pixels and have low brightness, limited texture information, and blurred edges, conventional convolution using uniform parameter modeling in spatial location is difficult to achieve targeted enhancement of the target's central region. Therefore, it is easily interfered with by background noise or texture clutter in the shallow stages. To solve this problem, this invention introduces a weighted convolution mechanism in the encoding stage, enabling the convolution kernel to have a spatial prior of center enhancement, thereby improving the network's initial sensitivity to weak targets.
[0040] The encoder consists of multiple cascaded weighted convolutional blocks and downsampling units. Each weighted convolutional block includes a weighted convolutional layer, a batch normalization layer, and a nonlinear activation layer. The input feature map is known. for: ; The standard convolution kernel is denoted as: ; in, Indicates the kernel size. The number of channels in the output feature map. Let H be the number of channels in the input feature map, H be the height of the input feature map, W be the width of the input feature map, and k be the spatial size of the convolution kernel. To enhance the response in the central region of the convolution kernel, this invention introduces a two-dimensional spatial weighting matrix: ; Then, perform element-wise multiplication with the convolution kernel to construct a weighted convolution kernel: ; The weighted convolution output can then be represented as: ; in, For bias terms, This indicates element-wise multiplication.
[0041] In a preferred embodiment, a two-dimensional spatial weighting matrix From a one-dimensional weight vector: ; in, This is a one-dimensional weight vector of length k, used to characterize the spatial weight distribution of the convolution kernel in a single direction. It is the k-th element in the one-dimensional weight vector (i.e., the weight coefficient at the corresponding position). Through the outer product construction, we obtain: ; in, This is a transpose operation; Further Normalization is performed: ; To ensure numerical stability. When the weighting matrix size is inconsistent with the convolution kernel size, bilinear interpolation can be used to adjust the weighting matrix. Adjust to the target size.
[0042] The overall output of the weighted convolutional block is: ; in, Indicates the first Layer coding features, Represents a non-linear activation function. This indicates batch normalization operation.
[0043] By explicitly introducing a center-enhanced spatial weighting matrix into the convolutional kernel, the encoder module enables the network to generate a stronger response to the bright spot at the center of the potential target in the shallow layers, while relatively reducing its sensitivity to background edges, local textures, and random noise. This mechanism can improve the signal-to-noise ratio of the initial features of the target, slow down the response decay of small targets in subsequent multi-layer downsampling, and provide a more stable feature base for subsequent cross-layer fusion and decoding recovery.
[0044] Dual Attention Skip Interaction (DASI) module: Module Functionality: While multi-layer downsampling can enhance the semantic abstraction ability of a network, it also leads to compression of spatial information of small objects, edge blurring, and rapid loss of response energy. Traditional skip connections typically transmit shallow features to the decoder by direct concatenation or element-wise addition, lacking fine-grained modeling of the contribution of features from different layers, and easily introducing a large amount of redundant background information during the recovery process. Therefore, this invention designs a cross-layer skip enhancement module to establish a more effective interaction relationship between shallow details and deep semantics.
[0045] Let the first The current feature of the layer is Its adjacent high-rise buildings have the following characteristics: The characteristics of adjacent lower layers are The cross-layer jump enhancement module is used to... Input the main branch and utilize it comprehensively. The high-level semantic discriminant information contained therein and The detailed edge information retained in the image forms the fusion feature: ; in, This represents a cross-layer interactive fusion function.
[0046] Building upon this, channel attention and spatial attention are introduced to jointly modulate the fused features. Channel attention can be expressed as: ; in, This indicates a global pooling operation. For mapping functions, Indicates nonlinear activation. Let represent the Sigmoid mapping, denoted as . Spatial attention can be represented as: ; in, and These represent average pooling and max pooling along the channel dimension, respectively. Indicates channel splicing. Represents a convolutional mapping; The final enhanced output is: .
[0047] By introducing a cross-layer dual attention interaction mechanism, this module can adaptively coordinate the contribution relationships between features from the current layer, higher layers, and lower layers, preserving spatial details and edge structures while enhancing target-related semantic information. Compared to traditional skip connections, this scheme can more effectively suppress background redundant responses and improve the ability to preserve weak targets during cross-layer transmission.
[0048] Bottleneck Enhancement Module: Module Function: The bottleneck layer is a crucial transition region connecting the encoder and decoder, and its input features have low spatial resolution and strong semantic abstraction capabilities. To further enhance the ability of deep features to express complex backgrounds, low-contrast targets, and local structural differences, this invention sets up a multi-scale context extraction unit and a local window relationship modeling unit in the bottleneck layer to perform two-level enhancement of the features.
[0049] Atrous Spatial Pyramid Pooling Module (ASPP): Let the bottleneck input characteristics be: ; in This represents the output of the layer l cross-layer jump enhancement module, where B represents the batch size. , and These represent the number of channels, height, and width of the feature map, respectively. To expand the receptive field and enhance the ability to model the background context, this invention employs an ASPP structure, using multiple structures with different dilation rates. Convolutional branches extract features in parallel: ; in, Indicates the expansion rate The dilated convolution is used. All branch outputs are concatenated along the channel dimension and then fused using projective convolution. ; Multi-scale context extraction units can obtain receptive field information at different scales without significantly reducing resolution, enabling the network to focus on the local area around the target while also using a wider range of background context to establish discrimination criteria, thereby improving the separability of the target and background in complex backgrounds.
[0050] Local Window Transformer (LWT): To further characterize the correlation between pixels within a local window, the Local WindowTransformer module is introduced after ASPP. Let its input features be... First, according to window size The feature map is divided. When the feature size is not divisible by the window size, the boundaries are first padded. Then, each window is flattened to a length of [missing information]. sequence: ; in, Indicates the number of windows. This represents the number of feature channels.
[0051] For each window sequence, perform layer normalization and multi-head self-attention computation sequentially: ; in, For attention output, For input features, This is a multi-head self-attention mechanism. For layer normalization operation; Further enhanced by a feedforward network: ; in, The output after enhancement by the feedforward network. For MLP output, This is a layer normalization operation.
[0052] After completing the local window modeling, the features are then restored to the original spatial layout to obtain... .
[0053] To appropriately supplement global statistical information, a lightweight global mean compensation term is introduced: ; in, This represents the mean mapping along the channel dimension. Enhanced features output by the bottleneck module. These are the input features after lightweight transformation or bottleneck structure processing.
[0054] This local window relationship modeling unit can flexibly establish inter-pixel dependencies within a local area, compensating for the limitations of conventional convolution with its fixed receptive field. Especially for low-contrast infrared small targets, subtle but consistent response patterns within their local regions can be more effectively aggregated and enhanced through a self-attention mechanism, thereby improving the quality of deep feature representation.
[0055] Decoding and Reconstruction Module: Module Function: The decoding and reconstruction module is responsible for progressively restoring the deep features after bottleneck enhancement to a high-resolution representation and finally outputting the target detection result. During this process, small targets are prone to problems such as blurred contours and weakened responses due to upsampling and convolutional smoothing. To address this issue, this invention introduces attention-guided fusion and gradient-gated enhancement mechanisms during the decoding process.
[0056] Let the first Level decoding input features are The corresponding jump enhancement feature is First, regarding Perform upsampling: ; in, This indicates an upsampling operation. Subsequently, it is concatenated with the attention-enhanced jump features: ; in, This indicates an attention-guided fusion unit. The features obtained from the cross-layer skip connections in the j-th layer are... This is a feature concatenation operation along the channel dimension. This is the fused feature obtained by concatenating the current decoded features with the attention-enhanced skip features. The concatenated features are then subjected to convolutional mapping to obtain the preliminary decoding result. ; After that, The input gradient-gated enhancement unit is used for structural compensation to obtain the final decoding output of this stage: ; in, For the first The final output features of the level decoding, This is a gradient-gated enhancement unit, used to introduce gradient-guided information and perform structural compensation and detail enhancement on the decoded features. These are intermediate decoded features after convolutional mapping and feature fusion.
[0057] By introducing attention guidance and gradient gating into the decoding stage, this module can preserve target structure and edge information while restoring spatial resolution, improve the quality of target contour reconstruction, and reduce the adverse effects of background clutter and interpolation smoothing.
[0058] Attention-guided fusion unit: Module Function: The attention-guided fusion unit is used to perform target-oriented recalibration of skip connection features before they participate in decoding fusion, so that the network prioritizes feature responses related to target detection in both channel and spatial dimensions.
[0059] This invention preferably employs a Convolutional Block Attention Module (CBAM). Let the input features be... The channel attention mapping is as follows: ; in, This is a channel attention weight mapping used to characterize the importance of different channels. It is a multilayer perceptron. This is a global average pooling operation used to extract average statistics for each channel. This is a global max pooling operation used to extract significant response information from channels.
[0060] The channel enhancement results are as follows: ; in, This is the feature representation after channel enhancement. For channel attention weights, For the input feature, ⊙ represents element-wise multiplication.
[0061] Furthermore, spatial attention is mapped as follows: ; in, To represent a spatial attention map, used to characterize the importance distribution of features across spatial dimensions. The Sigmoid activation function is used to map the output to the 0-1 range to generate weight coefficients. This is an average pooling operation along the channel dimension, used to extract spatially averaged response features. This is a max pooling operation along the channel dimension, used to extract spatially significant response features.
[0062] The final attention enhancement feature is: .
[0063] The CBAM module can simultaneously filter skip features from both semantic channel importance and spatial salience, thereby highlighting target-related regions and suppressing background interference, providing more discriminative input for subsequent decoding and fusion.
[0064] Gradient-gated augmentation unit (LightGradGate, LGG): Module Function: The gradient-gated enhancement unit is used to explicitly introduce priors on edge and brightness abrupt changes during the decoding stage to suppress structural degradation and edge blurring during the recovery process.
[0065] Let the input decoding features be: ; First, we take the average along the channel dimension to obtain the single-channel representation: ; in, The single-channel feature map obtained after average pooling along the channel dimension. This is the feature map of the c-th channel.
[0066] The Sobel operator is used to extract horizontal and vertical gradients separately. By extracting horizontal and vertical gradient information from the image, the Sobel operator enhances the edge response capability of the target region, thereby strengthening structural contour features and improving the separability between small targets and complex backgrounds. ; in, Represents horizontal gradient features; Representing vertical gradient features and Let SobelX and SobelY represent the convolution kernels, respectively. The second-order gradient is further extracted using the Laplace operator: ; in, This represents the Laplace convolution kernel. This is the convolution kernel corresponding to the Laplace operator, used to extract the second-order gradient information of the image.
[0067] The gradient guidance graph is constructed as follows: ; in, To prevent numerically unstable minimal constants, This represents the gradient guidance map, used to fuse first-order and second-order gradient information. Then, the gradient guidance map is concatenated with the original decoded features along the channel dimension. ; Enhanced features are obtained through convolutional fusion: ; Then, the gating weights are generated: ; The final output is: ; in, This is a fusion feature obtained by concatenating the original decoded features with the gradient guidance map along the channel dimension. For feature splicing operations, The enhanced features are those obtained after convolutional fusion. Enhanced decoding features for the final output These are the original decoding features (i.e., the decoding features that have not undergone gradient-guided fusion).
[0068] This module utilizes both first-order and second-order gradient information to construct a gradient prior map, enabling the network to explicitly perceive regions of abrupt brightness changes and target edge contours during the decoding stage. Through gated residual enhancement, it preserves the original semantic features while strengthening the target's structural information, thereby improving the sharpness and morphological integrity of the target edges.
[0069] Laplacian Edge Enhancement and Output Module: Module Function: To further enhance the edge representation capability of the key output stage, this invention introduces a Laplacian edge enhancement mechanism in the deep supervision branch of the bottleneck layer and the final decoding output branch to compensate for the loss of high-frequency information that may still exist during the feature recovery process.
[0070] Let the feature to be enhanced be First, channel averaging is performed: ; Then, the high-frequency edge response is extracted using Laplace convolution kernels: ; Add it to the original output features to obtain the enhanced result. Used for final prediction: ; For the final decoded output Through Convolution generates object detection maps: ; By applying Laplacian edge enhancement at key locations, the module can highlight the target outline and high-frequency structural details, improving the boundary separation capability between the target area and the background.
[0071] Multi-scale deep supervision module: Module Function: The multi-scale deep supervision module is used to constrain the output features of different levels simultaneously during the training phase, so as to enhance the perception ability of shallow, medium and deep features of the target, and improve the training stability and multi-scale detection performance of the network.
[0072] This invention sets auxiliary output branches in the bottleneck layer and multiple decoding layers. Let the auxiliary outputs be: ; Upsample it to the same size as the input image: ; During the training phase, the main output and all auxiliary outputs participate in the loss calculation, and the total loss function can be written as: ; in, This is a true annotated image. Weights are assigned to the loss values of each branch.
[0073] Multi-scale deep supervision mechanisms enable features at different levels to be directly constrained by the target detection task, thereby reducing the difficulty of gradient propagation, improving network training efficiency, and enhancing the ability to recognize targets of different sizes.
[0074] Without departing from the overall technical concept of this invention, all the above modules can be equivalently replaced or reasonably modified. For example, the spatial weighting matrix in weighted convolution can be constructed using a Gaussian distribution, exponential distribution, bell-shaped distribution, or a learnable weight function; the local window relationship modeling unit can use other local attention or lightweight self-attention structures; in addition to Sobel and Laplace, gradient extraction operators can also use high-frequency operators such as Scharr, Prewitt, and LoG; the attention-guided fusion unit can be replaced with other attention mechanisms such as SE, ECA, and coordinate attention; the upsampling method can be implemented using bilinear interpolation, transposed convolution, or pixel rearrangement; the number of deep supervision branches and the form of the loss function can also be adjusted according to the specific application scenario. All equivalent replacements, equivalent transformations, and reasonable improvements made based on the technical concept of this invention should be considered to fall within the protection scope of this invention.
[0075] In one embodiment, using long-range aerial target monitoring as the application background, this method is suitable for real-time detection and identification of low-altitude flying targets (including drones, aircraft, etc.) based on UAV platforms or ground-based infrared monitoring equipment. The system uses single-frame infrared images acquired by an infrared imaging device as input data. The targets to be detected typically appear as small, low-contrast, weak bright spots, and are easily affected by complex backgrounds and noise. Based on this, the specific processing flow of this embodiment is as follows: Overall network architecture implementation: This embodiment provides an infrared small target detection network based on weighted gradient guided fusion, the overall structure of which is as follows: Figure 1 As shown, the network adopts a hierarchical architecture of encoder-bottleneck layer-decoder, including a weighted convolutional encoder module, a cross-layer skip enhancement module, a bottleneck enhancement module, a decoding and reconstruction module, a Laplacian edge enhancement and output module, and a multi-scale deep supervision module.
[0076] Input is an infrared image After passing through a multi-stage weighted convolutional encoder, multi-layer coded features are obtained. .in, These are shallow, high-resolution features. This involves deep, low-resolution semantic features. Subsequently, a cross-layer jump enhancement module is used to interactively enhance the multi-scale features, generating corresponding jump-enhanced features. This information is then passed to the decoding stage for progressive fusion. (Deepest features) After being processed by the bottleneck enhancement module, the data enters the decoder for layer-by-layer upsampling and recovery. Finally, the main output branch generates an infrared small target detection map, and multiple auxiliary output branches implement multi-scale deep supervision during the training phase.
[0077] Implementation of the weighted convolutional encoder module: like Figure 2 As shown, the weighted convolutional encoder module in this embodiment includes multiple cascaded weighted convolutional blocks. Each weighted convolutional block includes a weighted convolutional layer, a batch normalization layer, and a ReLU activation layer. The weighted convolutional layer enhances the weights of the central region of the convolutional kernel by introducing a two-dimensional spatial weighting matrix into the standard convolutional kernel.
[0078] In one specific embodiment, let the kernel size be... The one-dimensional weight vector can be selected as A two-dimensional weighted matrix is constructed after interpolation adjustment and then normalized. This weighted matrix is then multiplied element-wise with the convolution kernel parameters to form a weighted convolution kernel with center enhancement properties, which is used to perform convolution operations on the input image or feature map.
[0079] Specifically, the encoder's first layer performs convolutional mapping on the original infrared image to extract initial shallow features. Then, it gradually reduces the resolution and enhances semantic expressiveness through downsampling convolutions with a stride of 2, forming a five-level feature representation. Compared to traditional convolutional structures, this module can strengthen the bright spot features at the target center in the initial stage of the network, improve sensitivity to weak infrared targets, and suppress random high-response interference in complex backgrounds.
[0080] Implementation of the cross-layer jump enhancement module: like Figure 3 As shown, the cross-layer skip enhancement module in this embodiment operates between features at various scale levels of the encoder. For a given current layer feature, it interacts with adjacent deep layer features and adjacent shallow layer features to achieve joint modeling of semantic and detail information.
[0081] Specifically, taking a certain level of features as an example, the current layer features serve as the backbone input, higher-level features provide stronger semantic discrimination information for the target, and lower-level features supplement edge details and spatial positioning information. After the three types of features are fused, they are successively enhanced through channel attention and spatial attention to highlight the channel and position responses related to the target and suppress background redundancy. The processed enhanced features are output to the decoder and fused with the upsampled features.
[0082] This design transforms skip connections from simple information copying into a cross-layer interaction mechanism with adaptive filtering and reconstruction capabilities, thereby enhancing the ability to preserve the features of small targets.
[0083] Bottleneck enhancement module implementation method: like Figure 4-5 As shown, the bottleneck enhancement module in this embodiment mainly consists of an ASPP multi-scale context extraction unit and a LocalWindowTransformer local window relationship modeling unit.
[0084] First, the deepest features The ASPP module is input, and multi-scale contextual information is extracted in parallel through multiple convolutional branches with different dilation rates. The output features of each branch are concatenated along the channel dimension, and then... Convolutional fusion yields context-enhanced features. These features then enter the Local WindowTransformer module, where multi-head self-attention computation and feedforward mapping are performed within a predefined local window to enhance the representation of relationships between pixels within the window. After completing window-level attention modeling, the features are restored to their original spatial layout, and a global mean compensation term is superimposed to further incorporate lightweight global information.
[0085] Through the aforementioned bottleneck enhancement design, the deepest semantic features can be supplemented at both the multi-scale context and local relation levels, thereby improving the ability of deep features to express infrared small targets under complex background conditions.
[0086] Decoding and reconstruction module implementation method: The decoding and reconstruction module in this embodiment includes four levels of upsampling units, each of which includes upsampling, attention-guided fusion, convolutional mapping, and gradient gating enhancement processes.
[0087] Specifically, the bottleneck enhancement output is first upsampled to the previous layer resolution using bilinear interpolation and then concatenated with the skip enhancement features at the corresponding scale. Before concatenation, the skip enhancement features are recalibrated using the CBAM attention module to highlight target-related responses. The concatenated features are then fused and compressed using convolution, batch normalization, and ReLU activation to obtain preliminary recovered features. Subsequently, these features are input into the LightGradGate gradient-gated enhancement module, which further enhances the structure and edges using gradient guidance maps.
[0088] This process is repeated step by step until the spatial resolution is restored to be close to that of the input image. This decoding method restores the feature space size while preserving as much of the contours of small targets, regions of abrupt brightness changes, and local structural information as possible.
[0089] like Figure 7 As shown, the implementation method of the attention-guided fusion unit is as follows: During each decoding stage, the jump-enhanced features at the corresponding scale are first subjected to attention modulation by the CBAM module. This module first uses global pooling to obtain the overall description of the features in the channel dimension and generates channel attention weights to enhance important semantic channels; then, it calculates spatial attention weights on the enhanced features to emphasize the possible locations of the target.
[0090] After attention-guided fusion, background regions unrelated to target detection in the skip features are weakened, while edges, textures, and local responses related to the target are highlighted, thereby improving the effectiveness of subsequent fusion with upsampled features.
[0091] like Figure 6 As shown, the gradient-gated enhancement unit implementation method is as follows: The gradient gating enhancement unit in this embodiment includes four processes: gradient extraction, feature splicing and convolution fusion, gating modulation, and residual enhancement.
[0092] First, the input decoded features are averaged along the channel dimension to obtain a single-channel representation. Second, the SobelX and SobelY operators are used to extract first-order gradient information, and the Laplace operator is used to extract second-order gradient information. These are then fused to construct a gradient guidance map. Next, this gradient guidance map is concatenated with the original decoded features along the channel dimension, and enhanced features are obtained through convolution, normalization, and activation. Finally, using... Convolution and Sigmoid mapping generate gated weights, which are then used to weight and compensate the original features through residuals, resulting in structurally enhanced decoded features.
[0093] This module can explicitly enhance the brightness abrupt change areas and edge contour information in the decoding stage, effectively reducing target blurring and structural degradation caused by smoothing.
[0094] Laplacian edge enhancement and output implementation: In this embodiment, Laplacian edge enhancement is applied to the final decoding feature process. Specifically, the output features are first averaged across channels, then Laplacian convolution is applied to extract high-frequency edge responses, and the edge enhancement result is added to the original output features to improve the sharpness of the target contour.
[0095] In the final output stage, the enhanced decoded features are input into the main output convolutional branch to generate the final infrared small target detection map. During training, edge information and target detection information can jointly constrain the network's learning, thereby improving the target structure recovery ability and detection accuracy.
[0096] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for detecting small infrared targets based on weighted gradient-guided fusion, characterized in that, include: Infrared images are acquired and input into an infrared small target detection model to obtain a target segmentation map; The infrared small target detection model is obtained by training the training set and optimizing the model parameters by calculating the loss function through the auxiliary output branches and main output branches set by the bottleneck layer and multiple decoding layers. The weighted convolution encoder module, which incorporates a weighted convolution mechanism in the infrared small target detection model, extracts multi-scale features layer by layer. Based on the cross-layer jump enhancement module, which incorporates a cross-layer dual attention interaction mechanism, the features are jointly modulated and fused. The spatial resolution of the target features is restored step by step by the decoding and reconstruction module, which incorporates attention-guided fusion and gradient gating enhancement mechanisms. The decoding and reconstruction module includes: The decoding and reconstruction unit is used to upsample the target features, concatenate the upsampled target features with the corresponding jump enhancement features, and perform structural compensation after convolutional mapping to obtain the feature decoding result. The feature decoding results are subjected to channel attention mapping and spatial attention mapping to obtain attention-enhanced features; The attention enhancement feature is averaged along the channel dimension, and the horizontal and vertical gradients are extracted to obtain the second-order gradient, which is used to construct a gradient guidance map. The gradient guidance map is concatenated with the attention enhancement feature along the channel dimension and fused by convolution to obtain the enhancement feature. The enhancement feature is then multiplied element-wise with the gate weights to obtain the final enhancement feature.
2. The infrared small target detection method based on weighted gradient guided fusion according to claim 1, characterized in that, The infrared small target detection model includes: The weighted convolutional encoder module is used to extract multi-scale features from the infrared image layer by layer to obtain encoded features; The cross-layer skip enhancement module is used to interactively fuse the encoded features to obtain enhanced fused features; The bottleneck enhancement module is used to extract multi-scale contextual features from the enhanced fusion features in parallel through multiple convolutional branches with different dilation rates, and then fuse them by projection convolution after concatenation in the channel dimension. The projective convolutional fusion features are divided according to the target window size, and then each window is flattened into a sequence of the target length. For each target length, layer normalization and multi-head self-attention calculation are performed sequentially. After being enhanced by a feedforward network, the original spatial layout is restored to obtain the target features to be supplemented. A lightweight global mean compensation term is introduced to obtain the target features. The decoding and reconstruction module is used to restore the spatial resolution of the target features step by step to obtain the final enhanced features; The Laplacian edge enhancement and output module is used to perform channel averaging on the final enhanced features, extract high-frequency edge responses, add the high-frequency edge responses to the final enhanced features to obtain the enhancement result, and then output the target segmentation map through the output branch.
3. The infrared small target detection method based on weighted gradient guided fusion according to claim 1, characterized in that, The weighted convolutional encoder module includes: The weighted convolutional encoder unit is used to perform element-wise multiplication of a two-dimensional spatial weighted matrix with a convolutional kernel to obtain a weighted convolutional kernel. The weighted convolutional kernel is used to extract multi-scale features from the infrared image layer by layer to obtain encoded features. The two-dimensional spatial weighted matrix is obtained by constructing and normalizing a one-dimensional weight vector through an outer product. During the element-wise multiplication of the two-dimensional spatial weighted matrix and the convolution kernel, when the size of the two-dimensional spatial weighted matrix is inconsistent with the size of the convolution kernel, the size of the two-dimensional spatial weighted matrix is adjusted by bilinear interpolation.
4. The infrared small target detection method based on weighted gradient guided fusion according to claim 3, characterized in that, Obtaining the encoded features includes: ; in, Indicates the first Layer coding features, Represents a non-linear activation function. This indicates a batch normalization operation. This represents element-wise multiplication. Indicates the first Layer coding features, For weighted convolution operations, For the first Standard convolutional kernels for each layer, For the first A two-dimensional weighted matrix.
5. The infrared small target detection method based on weighted gradient guided fusion according to claim 1, characterized in that, The cross-layer jump enhancement module includes: The cross-layer skip enhancement unit is used to fuse encoded features with high-level semantic discriminative information in adjacent high-level features and detailed edge information in adjacent low-level features to obtain fused features. Enhanced fusion features are generated by jointly modulating the fusion features using channel attention and spatial attention.
6. The infrared small target detection method based on weighted gradient guided fusion according to claim 5, characterized in that, Generating the enhanced fusion features includes: ; ; ; in, This indicates a global pooling operation. , For mapping functions, Indicates nonlinear activation. Represents the Sigmoid mapping. and These represent average pooling and max pooling along the channel dimension, respectively. Indicates fusion features, Indicates channel splicing. Represents a convolution mapping. For channel attention, For spatial attention, To enhance fusion features, This is element-wise multiplication.
7. The infrared small target detection method based on weighted gradient guided fusion according to claim 1, characterized in that, Obtaining the final enhanced features includes: ; ; ; in, To ultimately enhance features, To obtain enhanced features through convolutional fusion, For gating weights, Indicates nonlinear activation. Represents the Sigmoid mapping. To concatenate the gradient guidance map with the original decoded features in the channel dimension, These are the original decoding features, i.e., the basic feature maps from the decoding stage. To represent batch normalization operation, This is a convolution operation.
8. The infrared small target detection method based on weighted gradient guided fusion according to claim 1, characterized in that, The loss function includes: ; in, For loss function, This is a true annotated image. , Weights are assigned to the loss branches. The loss function represents the main branch and is used to constrain the main output result. With real labeling The differences between them Indicates the number of auxiliary branches. This represents the index of the auxiliary branch, i = 1, 2, ..., n. The loss function for the auxiliary branches is used to constrain the difference between each auxiliary output and the true label. Let represent the predicted output of the i-th auxiliary branch.
Citation Information
Patent Citations
Attention-guided hybrid double-branch spatial decomposition neural network infrared weak and small target detection method
CN118570439A