A method for infrared small target detection based on frequency-space cooperative gating attention network
Patent Information
- Application Number
- CN202610931157.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-09-01
AI Technical Summary
[0010]本发明的目的在于,提供一种基于频率-空间协同门控注意力网络的红外小目标检测方法,其能够有效融合空间多尺度上下文特征与频域全局信息,增强目标频谱,并且在高性能检测的同时降低计算开销,从而解决现有技术中目标微小信号放大效果有限、动态调整和上下文感知能力不足、模型计算复杂度较高的问题
[0060] This invention performs collaborative modeling from three levels: spatial semantic information, frequency domain structural information, and prior spectrum cues. By using a frequency-space collaborative gated attention module, it performs gated collaborative fusion of spatial and frequency domain information, enabling the network to dynamically determine at the feature level what information should be focused on for the current position and channel. This significantly improves the separability of targets and clutter in complex backgrounds and avoids information redundancy caused by mechanical splicing or coarse-grained fusion.
Smart Images

Figure CN122676159A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of infrared small target detection, specifically relating to an infrared small target detection method based on a frequency-space cooperative gating attention network. Background Technology
[0002] Infrared small target detection is one of the core research directions in the fields of computer vision and infrared imaging. Small targets in infrared images are usually extremely small in size, have a low pixel ratio, and have similar spatial characteristics to background clutter. Therefore, traditional methods are prone to missed detections or false alarms.
[0003] Currently, infrared small target detection methods mainly fall into the following categories: Traditional model-driven methods rely on manually designed filters or statistical features, such as Top-hat transform and background modeling. Their advantage is simple computation, but they are easily affected by abnormal scenes and have difficulty capturing high-level semantic information of complex targets. Convolutional neural network methods use convolutional layers to capture local spatial features. Some methods combine multi-scale features to enhance target resolution. However, the receptive field of convolutional operations is limited, making it difficult to effectively distinguish background noise similar to the target. Transformer and global modeling methods capture long-range spatial context information through Vision Transformer or local-global hybrid attention mechanisms, but they usually ignore frequency domain features, leading to high false alarm rates or missed detections. Among frequency domain methods, SFDTNet models global frequency context information through frequency domain Transformer, FSUNet uses wavelet transform for high-low frequency decoupling, and HDNet uses dynamic high-pass filters to remove low-frequency background information. All of these have made progress in frequency domain processing, but it is still difficult to achieve a balance between target recognition and noise filtering.
[0004] To further improve detection performance, some studies have attempted to combine the spatial and frequency domains or enhance the frequency domain, such as FSUNet and SFDTNet; however, the above methods still have the following shortcomings:
[0005] 1. The target signal amplification capability is limited. Existing methods are insufficient for amplifying signals of small targets, and low-contrast targets are easily missed.
[0006] 2. Insufficient dynamic adjustment and context awareness capabilities: Existing methods struggle to dynamically adjust feature responses according to complex scenarios, resulting in limited ability to accurately suppress background clutter.
[0007] 3. The dual-domain fusion processing is crude. The current spatial-frequency domain fusion method is relatively simple and lacks dynamic gating and feature refinement mechanisms, which can easily lead to false alarms or missed detections.
[0008] 4. Frequency domain separation of target and noise is difficult. Existing methods usually treat the target as a high-frequency component and the background as a low-frequency component. However, noise and background in complex scenarios also have extensive frequency domain characteristics, and it is difficult to deal with them by simply relying on frequency domain separation.
[0009] Therefore, how to efficiently integrate frequency response and spatial semantic features to achieve a dynamic balance between target preservation and noise suppression is a technical problem that urgently needs to be solved in the field of infrared small target detection. Summary of the Invention
[0010] The purpose of this invention is to provide an infrared small target detection method based on a frequency-space collaborative gated attention network, which can effectively fuse spatial multi-scale contextual features and frequency domain global information to enhance the target spectrum, and reduce computational overhead while achieving high-performance detection. This solves the problems of limited amplification effect of small target signals, insufficient dynamic adjustment and context awareness capabilities, and high model computational complexity in existing technologies.
[0011] To achieve the above objectives, the present invention employs the following technical solution:
[0012] On one hand, this invention provides an infrared small target detection method based on a frequency-space cooperative gated attention network, which includes:
[0013] Acquire the infrared image to be detected, preprocess the image to obtain the initial feature map;
[0014] The initial feature map is input into a pre-trained frequency-space co-gated attention network model, which includes an encoder module, a wavelet prior module, and a decoder module, wherein:
[0015] The encoder module includes a shallow coding layer and a deep coding layer. The shallow coding layer is used to extract the underlying spatial features based on the initial feature map. The deep coding layer is used to perform frequency-space co-gated enhancement based on the underlying spatial features and the frequency domain prior information output by the wavelet prior module to obtain the encoder enhanced feature map.
[0016] The wavelet prior module is used to obtain frequency domain prior information based on the underlying spatial features, and input the frequency domain prior information into the deep coding layer;
[0017] The decoder module includes a shallow decoding layer and a deep decoding layer. The shallow decoding layer is skip-connected to the deep coding layer, and the deep decoding layer is skip-connected to the shallow coding layer. The shallow decoding layer is used to perform frequency-space co-gated enhancement based on the encoder enhanced feature map and the output of the deep coding layer. The deep decoding layer is used to extract spatial detail features based on the enhancement result and the output of the shallow coding layer.
[0018] The detection results of small infrared targets are obtained based on the output of the decoder module.
[0019] The above technical solutions are based on the fusion of global spectral cues and spatial semantic gated attention to achieve dynamic recalibration of key information in dual-domain features, which can obtain more reliable discriminative information in complex situations; the dynamic frequency domain refinement further amplifies the spectral signal of weak targets and suppresses clutter spectral components; the input feature map is decomposed into high- and low-frequency sub-bands through multiple wavelet prior modules, and these sub-bands are input into the corresponding coding layers as explicit spectral conditional cues.
[0020] Optionally, the skip connection transmits the output of each encoding layer to the corresponding decoding layer and fuses it with the upsampled output of the previous decoding layer as the input of the decoding layer. This preserves the spatial detail information in the encoder module, assists the decoder module in recovering the target boundary, and prevents information loss.
[0021] Optionally, a residual pre-activation module is provided in the shallow coding layer and the deep decoding layer. The residual pre-activation module includes a standard residual block and a pre-activation block, wherein:
[0022] The standard residual block includes two cascaded first convolutional blocks. After the input is processed by the two first convolutional blocks, it is added element by element to the input to obtain the standard residual output.
[0023] The pre-activation block includes two cascaded second convolutional blocks. The standard residual output is used as input, and after being processed by the two second convolutional blocks, it is added element by element to the input to obtain the residual pre-activation shallow feature map.
[0024] The first convolutional block includes a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation function; the second convolutional block includes a 3×3 convolutional layer, a group normalization layer, and a GELU activation function.
[0025] By setting standard residual blocks and pre-activation blocks in the shallow coding layer and deep decoding layer, spatial detail information of small targets can be preserved, while enhancing the ability to extract weak target features.
[0026] Optionally, a frequency-space co-gated attention module is provided in the deep coding layer and the shallow decoding layer. The frequency-space co-gated attention module includes an adaptive frequency selection unit, a multi-scale context unit, a dual-domain fusion unit, a dynamic frequency domain refinement unit, and a feature gated fusion unit.
[0027] The adaptive frequency selection unit is used to combine frequency domain prior information to perform frequency domain transformation on the input feature map of the layer to obtain frequency domain cues.
[0028] The multi-scale context unit is used to perform max pooling and convolution on the input feature map of the layer to obtain spatial domain cues.
[0029] The dual-domain fusion unit is used to fuse and enhance the frequency domain clues and spatial domain clues to obtain a fused feature map;
[0030] The dynamic frequency domain refinement unit is used to perform dynamic frequency domain enhancement on the fused feature map to obtain a refined feature map.
[0031] The feature-gated fusion unit is used to multiply and add the refined feature map with the input feature map of the layer element by element, and then process it through a pre-activation block to obtain the output of the layer.
[0032] Optionally, the wavelet prior module uses Haar wavelet transform to decompose the residual pre-activated shallow feature map into a low-frequency sub-band and multiple high-frequency sub-bands;
[0033] The low-frequency sub-band is used as the first frequency domain prior information and input into the adaptive frequency selection unit.
[0034] The high-frequency subband is sequentially compressed using 3×3 depthwise separable convolution and 1×1 convolution to obtain the compressed high-frequency subband; the compressed high-frequency subband is then multiplied element-wise with the low-frequency subband to obtain the second frequency domain prior information, which is then input into the adaptive frequency selection unit.
[0035] The low-frequency subband is fused with the compressed high-frequency subband, and after channel interaction via 1×1 convolution, it is input into the next-level wavelet prior module.
[0036] The above technical solution inputs the low-frequency subband carrying rich structural semantics into the adaptive frequency selection unit to provide it with semantic context reference; the compressed high-frequency subband is multiplied with the low-frequency subband to purify the energy of weak targets, thereby enabling the adaptive frequency selection unit to more effectively distinguish the spectral structure of targets and background.
[0037] Optionally, the adaptive frequency selection unit is used to combine frequency domain prior information to perform frequency domain transformation on the input feature map of the layer to obtain frequency domain cues, including:
[0038] The frequency domain prior information is added element by element to the input feature map of the layer, and the resulting spatial domain feature map is subjected to Fourier transform to obtain the frequency domain feature map.
[0039] The learnable mask is multiplied element-wise with the frequency domain feature map to obtain the masked frequency domain feature map. The learnable mask is a parameter matrix with the same size as the frequency domain feature map.
[0040] The masked frequency domain feature map is transformed back to the spatial domain through inverse Fourier transform to obtain frequency domain clues, which are spatial feature maps carrying frequency domain selective enhancement information.
[0041] The frequency domain clues are processed by 1×1 convolution to exchange information between channels, resulting in frequency domain clues after channel interaction.
[0042] The above technical solutions, by introducing a learnable mask to adaptively select the spectral distribution of feature information, can effectively enhance the target response and increase the spectral difference between the target and the background, thereby providing reliable frequency domain clues.
[0043] It should be noted that the adaptive frequency selection unit extracts frequency domain cues in two ways: by adding the first frequency domain prior information to the input feature map element by element to output the first frequency domain cues, which are used to fuse with the spatial domain cues; and by adding the second frequency domain prior information to the input feature map element by element to output the second frequency domain cues, which are used to add with the fused feature map element by element.
[0044] Optionally, the multi-scale context unit is used to perform max pooling and convolution processing on the input feature map of the layer to obtain spatial domain cues, including:
[0045] The input feature map of the layer is divided into multiple branches along the channel dimension. Each branch is then processed by max pooling of different sizes and convolutional blocks based on large kernel decomposition to obtain the spatial domain feature map corresponding to each branch.
[0046] The spatial domain feature maps of each branch are upsampled to the same size as the input feature map and then fused to obtain spatial domain cues;
[0047] The spatial domain cues are processed through 1×1 convolution to exchange information between channels, resulting in spatial domain cues after channel interaction. This allows for the capture of local context features over a larger range and the suppression of redundancy in the channel dimensions.
[0048] The convolutional block includes a 3×3 depthwise separable convolution, a 7×7 depthwise separable convolution with an inflation rate of 2, a ReLU activation function, a square operation, and layer normalization.
[0049] Optionally, the dual-domain fusion unit is used to fuse and enhance the frequency domain cues and spatial domain cues to obtain a fused feature map, including:
[0050] The frequency and spatial domain cues after channel interaction are activated by Sigmoid to obtain a frequency attention map and a spatial attention map, respectively. The frequency attention map and the spatial attention map are multiplied element-wise to obtain a fused feature map. The fused feature map is added element-wise to the frequency domain cues to obtain an enhanced fused feature map. The enhanced fused feature map is processed by convolutional blocks and input into a dynamic frequency domain refinement unit.
[0051] Optionally, the dynamic frequency domain refinement unit is used to perform dynamic frequency domain enhancement on the fused feature map to obtain a refined feature map, including:
[0052] The fused feature map is transformed back to the frequency domain using a Fourier transform to obtain a frequency domain feature map;
[0053] The channel dimension of the frequency domain feature map is compressed to half of its original value using a 1×1 convolution.
[0054] Each channel of the spatial domain cue is processed by global average pooling and multilayer perceptron, followed by Softmax activation to obtain a dynamic weight vector. Each element in the array corresponds to the weight of a channel.
[0055] The dynamic weight vector The compressed frequency domain feature map is multiplied element-wise and nonlinearly amplified using a ReLU-based Square operation to obtain the amplified frequency domain feature map.
[0056] The magnified frequency domain feature map is then convolved with a 1×1 process to restore the channel dimension, resulting in a frequency domain feature map with restored channels.
[0057] The frequency domain feature map after the channel is restored is transformed back to the spatial domain by inverse Fourier transform to obtain a refined feature map, which further amplifies the target component and suppresses irrelevant components.
[0058] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0059] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0060] This invention performs collaborative modeling from three levels: spatial semantic information, frequency domain structural information, and prior spectrum cues. By using a frequency-space collaborative gated attention module, it performs gated collaborative fusion of spatial and frequency domain information, enabling the network to dynamically determine at the feature level what information should be focused on for the current position and channel. This significantly improves the separability of targets and clutter in complex backgrounds and avoids information redundancy caused by mechanical splicing or coarse-grained fusion.
[0061] Meanwhile, the present invention further refines and reweights the fused feature map through a dynamic frequency domain refinement unit, amplifies the effective spectral components of weak targets, and suppresses clutter spectral components unrelated to the target, thereby enhancing the balance between target preservation and noise filtering from a mechanism perspective.
[0062] Furthermore, this invention introduces a wavelet prior module aligned with the encoder module, which explicitly feeds the potential high and low frequency structures in the input into the network, providing a more stable and constraining hint for frequency domain selection, and avoiding excessive compression and loss of local signals of extremely small targets by deep networks. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 The diagram shown is a schematic representation of the implementation process of the infrared small target detection method based on a frequency-space cooperative gating attention network in an embodiment of the present invention.
[0065] Figure 2 The figure shown is a schematic diagram of the overall architecture of the frequency-space collaborative gating attention network model in an embodiment of the present invention;
[0066] Figure 3 The diagram shown is a schematic diagram of the frequency-space collaborative gating attention network module structure in an embodiment of the present invention;
[0067] Figure 4 The figure shown is a comparison of the ROC curves of the embodiments of the present invention and existing methods on four public datasets;
[0068] Figure 5 The image shown is a visual comparison of the infrared small target detection results between the embodiments of the present invention and existing methods. Detailed Implementation
[0069] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0070] Example 1
[0071] This embodiment introduces an infrared small target detection method based on a frequency-space cooperative gated attention network, referencing... Figure 1 It includes:
[0072] Acquire the infrared image to be detected, preprocess the image to obtain the initial feature map;
[0073] The initial feature map is input into a pre-trained frequency-space co-gated attention network model, which includes an encoder module, a wavelet prior module, and a decoder module, wherein:
[0074] The encoder module includes a shallow coding layer and a deep coding layer. The shallow coding layer is used to extract the underlying spatial features based on the initial feature map. The deep coding layer is used to perform frequency-space co-gated enhancement based on the underlying spatial features and the frequency domain prior information output by the wavelet prior module to obtain the encoder enhanced feature map.
[0075] The wavelet prior module is used to obtain frequency domain prior information based on the underlying spatial features, and input the frequency domain prior information into the deep coding layer;
[0076] The decoder module includes a shallow decoding layer and a deep decoding layer. The shallow decoding layer is skip-connected to the deep coding layer, and the deep decoding layer is skip-connected to the shallow coding layer. The shallow decoding layer is used to perform frequency-space co-gated enhancement based on the encoder enhanced feature map and the output of the deep coding layer. The deep decoding layer is used to extract spatial detail features based on the enhancement result and the output of the shallow coding layer.
[0077] The detection results of small infrared targets are obtained based on the output of the decoder module.
[0078] refer to Figure 2 and Figure 3 The specific implementation of the method in this embodiment mainly involves the following parts:
[0079] I. Image Preprocessing
[0080] For an infrared image with an input size of (3, H, W), a preliminary channel dimension transformation is first performed. Specifically, a 1×1 convolution maps the three channels of the input image to a preset number of channels C. This convolution operation does not change the spatial resolution, so the initial feature map size is (C, H, W), where H and W are the height and width of the feature map, respectively. In this embodiment, the preset number of channels C is set to 16.
[0081] Image preprocessing expands the limited channels of the original infrared image to a higher-dimensional feature space, providing a foundation for the subsequent network to extract richer features. At the same time, using 1×1 convolution does not change the image height and width, avoiding the spatial information loss caused by early downsampling, which is beneficial for the preservation of edges and small targets in the infrared image.
[0082] II. Encoder Module and Decoder Module
[0083] The encoder comprises five coding layers, of which the first and second layers are shallow coding layers, and the third, fourth, and fifth layers are deep coding layers, used to progressively extract multi-scale features, while expanding the receptive field through max pooling downsampling.
[0084] Specifically, the input to the first shallow coding layer is the preprocessed initial feature map, and the number of output channels is C, while the spatial resolution remains unchanged. After max pooling downsampling, its size is halved to H / 2×W / 2, and the number of channels is expanded to 2C, which is then input to the second shallow coding layer. The output of the second shallow coding layer is downsampled to H / 4×W / 4, and the number of channels is expanded to 4C, which is then input to the first deep coding layer. The output of the first deep coding layer is downsampled to H / 8×W / 8, and the number of channels is expanded to 8C, which is then input to the second deep coding layer. The output of the second deep coding layer is downsampled to H / 16×W / 16, and the number of channels remains at 8C without further expansion, which is then input to the third deep coding layer.
[0085] The decoder comprises four decoding layers, where the first and second layers are shallow decoding layers, and the third and fourth layers are deep decoding layers, used to progressively restore spatial resolution and fuse skip connection features from the encoder module. Specifically, deep decoding layer two corresponds to shallow decoding layer one, deep decoding layer one corresponds to shallow decoding layer two, shallow decoding layer two corresponds to deep decoding layer one, and shallow decoding layer one corresponds to deep decoding layer two.
[0086] Specifically, the output of the third deep coding layer is bilinearly interpolated and upsampled, doubling its size to H / 8×W / 8 while maintaining the same number of channels. This is then concatenated with the output of the second deep coding layer along the channel dimension and input into the first shallow decoding layer. The output of the first shallow decoding layer is upsampled to H / 4×W / 4, compressing the number of channels to 4C, and then concatenated with the output of the first deep coding layer, input into the second shallow decoding layer. The output of the second shallow decoding layer is upsampled to H / 2×W / 2, compressing the number of channels to 2C, and then concatenated with the output of the second shallow coding layer, input into the first deep decoding layer. The output of the first deep decoding layer is upsampled to H×W, compressing the number of channels to C, and then concatenated with the output of the first shallow coding layer, input into the second deep decoding layer. The output feature map size of the second deep decoding layer is restored to the original input resolution H×W, with the number of channels being C.
[0087] In some possible embodiments, the encoder-decoder architecture can be replaced with other segmentation or detection backbones with multi-scale feature fusion capabilities, such as lightweight UNet variants, FPN-style structures, deep residual encoder-decoder structures, or combined with Transformer and hybrid CNN-Transformer frameworks.
[0088] In some possible embodiments, a residual pre-activation module is provided in the shallow coding layer and the deep decoding layer. The residual pre-activation module includes a standard residual block and a pre-activation block, wherein:
[0089] The standard residual block includes two cascaded first convolutional blocks. After the input is processed by the two first convolutional blocks, it is added element by element to the input to obtain the standard residual output.
[0090] The pre-activation block includes two cascaded second convolutional blocks. The standard residual output is used as input, and after being processed by the two second convolutional blocks, it is added element by element to the input to obtain the residual pre-activation shallow feature map.
[0091] The first convolutional block includes a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation function, and the second convolutional block includes a 3×3 convolutional layer, a group normalization layer, and a GELU activation function.
[0092] III. Wavelet Prior Module
[0093] By providing explicit spectral cues to the network through multi-scale wavelet decomposition, the frequency domain selection process can be guided to more accurately focus on the differences between the target and the background, avoiding the submersion or loss of small targets in deep features.
[0094] Specifically, the residual pre-activated shallow feature map is decomposed into a low-frequency sub-band and multiple high-frequency sub-bands using Haar wavelet transform;
[0095] The low-frequency sub-band is used as the first frequency domain prior information and input into the adaptive frequency selection unit.
[0096] The high-frequency subband is sequentially compressed using 3×3 depthwise separable convolution and 1×1 convolution to obtain the compressed high-frequency subband; the compressed high-frequency subband is then multiplied element-wise with the low-frequency subband to obtain the second frequency domain prior information, which is then input into the adaptive frequency selection unit.
[0097] The low-frequency subband is fused with the compressed high-frequency subband, and after channel interaction via 1×1 convolution, it is input into the next-level wavelet prior module.
[0098] In some possible implementations, the wavelet prior module may employ other multi-resolution decomposition methods, such as Laplace pyramids, Gabor filter banks, directional filter banks, or different types of wavelet bases, to generate spectral cues aligned with the encoder.
[0099] IV. Frequency-Spatial Cooperative Gated Attention Module
[0100] In some possible embodiments, a frequency-spatial co-gated attention module is provided in the deep coding layer and the shallow decoding layer. The frequency-spatial co-gated attention module includes an adaptive frequency selection unit, a multi-scale context unit, a dual-domain fusion unit, a dynamic frequency domain refinement unit, and a feature-gated fusion unit. It can quickly obtain reliable cues, achieve robust preservation of small infrared targets, and generate more accurate segmentation maps.
[0101] Specifically, the adaptive frequency selection unit is used to combine frequency domain prior information to perform frequency domain transformation on the input feature map of the layer to obtain frequency domain cues;
[0102] The multi-scale context unit is used to perform max pooling and convolution on the input feature map of the layer to obtain spatial domain cues.
[0103] The dual-domain fusion unit is used to fuse and enhance the frequency domain clues and spatial domain clues to obtain a fused feature map;
[0104] The dynamic frequency domain refinement unit is used to perform dynamic frequency domain enhancement on the fused feature map to obtain a refined feature map.
[0105] The feature-gated fusion unit is used to multiply and add the refined feature map with the input feature map of the layer element by element, and then process it through a pre-activation block to obtain the output of the layer.
[0106] V. Adaptive Frequency Selection Unit
[0107] The frequency prior information is combined with the input feature map of the layer. Add the elements one by one, and perform a Fourier transform on the resulting spatial domain feature map to obtain the frequency domain feature map;
[0108] A learnable mask is introduced and multiplied element-wise with the frequency domain feature map to obtain the masked frequency domain feature map. The learnable mask is a trainable parameter matrix with the same size as the frequency domain feature map, and each element in the matrix is mapped to the (0,1) interval. When the element value is close to 1, it indicates that the frequency component corresponding to that position contributes significantly to target detection. When the value is close to 0, it indicates that the frequency component corresponding to that position is related to noise or background clutter. This allows for adaptive differentiation between target-related frequencies and irrelevant frequencies, achieving selective preservation of frequency domain features.
[0109] The masked frequency domain feature map is transformed back to the spatial domain using an inverse Fourier transform to obtain the frequency domain clues. The frequency domain clue is a spatial feature map carrying frequency domain selective enhancement information;
[0110] The frequency domain clue The features from different channels are linearly combined using 1×1 convolution to obtain the frequency domain cues after channel interaction. This enables the network to integrate frequency domain information from each channel, thereby enhancing its feature representation capabilities.
[0111] The adaptive frequency selection unit extracts frequency domain cues in two ways: by combining the first frequency domain prior information with the input feature map. Add elements one by one to output the first frequency domain cue. Used in conjunction with spatial domain clues Fusion; combining prior information from the second frequency domain with the input feature map Add elements one by one to output the second frequency domain cue. Used for fusion feature maps Add elements one by one.
[0112] In some possible embodiments, the Fourier transform can be replaced by the Discrete Cosine Transform (DCT), a variant of the Discrete Fourier Transform, or other invertible frequency domain transforms to achieve similar spectral decomposition and feature selection effects.
[0113] VI. Multi-scale context units
[0114] The input feature map of the layer The input feature map is divided into three branches along the channel dimension, and each branch is processed by max pooling of different sizes and convolutional blocks based on large kernel decomposition to obtain the spatial domain feature map corresponding to each branch. The spatial domain feature maps of each branch are upsampled to the same size as the input feature map and then fused to obtain the spatial domain cues. ;
[0115] The spatial domain clues Information exchange between channels is achieved through 1×1 convolution, resulting in spatial domain cues after channel interaction. This allows for the capture of a larger range of local contextual features and the suppression of redundancy in the channel dimension.
[0116] The convolutional block includes a 3×3 depthwise separable convolution, a 7×7 depthwise separable convolution with an inflation rate of 2, a ReLU activation function, a square operation, and layer normalization.
[0117] In some possible embodiments, the multi-scale pooling and large kernel convolution structure used by the multi-scale context unit can be replaced by structures with multi-scale receptive fields, such as dilated convolution, pyramid pooling, deformable convolution, lightweight self-attention unit, or hybrid convolutional attention unit, in order to express the surrounding context of the target and suppress channel redundancy.
[0118] VII. Dual-Domain Fusion Unit
[0119] The first frequency domain clue and spatial domain clues Sigmoid activation is applied separately to obtain a frequency attention map and a spatial attention map; the frequency attention map and the spatial attention map are then multiplied element-wise to achieve feature-level gating and filtering, resulting in a fused feature map. ,Right now This ensures that only spatial semantic information and spectral information with high discriminative value can be preserved and enhanced, while background clutter, noise response, or redundant features unrelated to the target are suppressed by gating.
[0120] The fused feature map With the second frequency domain clue By adding elements one by one, we obtain the enhanced fused feature map. The enhanced fused feature map Spatial features are refined using convolutional blocks; the refined feature maps are then processed. and spatial domain clues Frequency domain refinement is performed using the input dynamic frequency domain refinement unit;
[0121] The convolutional block includes a 3×3 depthwise separable convolution, a 7×7 depthwise separable convolution with an inflation rate of 2, a ReLU activation function, a square operation, and layer normalization.
[0122] VIII. Dynamic Frequency Domain Refinement Unit
[0123] By employing "channel dimensionality reduction and compression - dynamic weight control - dimensionality restoration", the feature map is... The target spectral components are further enhanced, and complex clutter spectra unrelated to the target are suppressed.
[0124] Specifically, the fused feature map The frequency domain feature map is obtained by converting the data back to the frequency domain using Fourier transform.
[0125] The channel dimension of the frequency domain feature map is compressed to half of its original value using a 1×1 convolution.
[0126] For the spatial domain clues Each channel undergoes global average pooling and multilayer perceptron processing to capture the nonlinear dependencies between channels; then, a dynamic weight vector is obtained through Softmax activation. Each element corresponds to the weight of a channel, which is used to conditionally adjust the subsequent frequency domain refinement process, enabling the network to adaptively control the information flow according to the response strength of different channels and different frequency bands.
[0127] The dynamic weight vector The compressed frequency domain feature map is multiplied element-wise and nonlinearly amplified using a ReLU-based Square operation to obtain the amplified frequency domain feature map.
[0128] The magnified frequency domain feature map is then convolved with a 1×1 process to restore the channel dimension, resulting in a frequency domain feature map with restored channels.
[0129] The frequency domain feature map after the channel recovery is transformed back to the spatial domain using an inverse Fourier transform to obtain a refined feature map. This further amplifies the target component and suppresses irrelevant components;
[0130] In some possible embodiments, the implementation of the channel dimensionality reduction compression-dynamic weight control-dimensionality restoration method can be replaced by gating filtering, attention recalibration, frequency band adaptive enhancement, or spectrum reconstruction based on statistical significance, depending on task requirements and computational resource limitations.
[0131] IX. Feature Gating Fusion Unit
[0132] A residual gating realignment mechanism is used to refine the feature map. With the input feature map of the layer The elements are multiplied and added sequentially, and then processed by a pre-activation block to obtain the output of the layer. This avoids the loss of target details due to over-filtering, thereby achieving a balance between target preservation and noise suppression.
[0133] Example 2
[0134] Based on the same inventive concept as Embodiment 1, the implementation steps of the infrared small target detection method based on frequency-space cooperative gating attention network in this embodiment are as follows:
[0135] Step 1: Perform a 1×1 convolution on the input infrared image to obtain the initial feature map;
[0136] Step 2: Input the initial feature map into the first shallow coding layer, and after processing by the residual pre-activation module, obtain the output of the first shallow coding layer;
[0137] Step 3: Max pool the output of the first shallow coding layer and input it into the second shallow coding layer. After processing by the residual pre-activation module, the residual pre-activated shallow feature map is obtained.
[0138] Step 4: Max pool the residual pre-activated shallow feature map and input it into the deep coding layer 1 and the wavelet prior module respectively. Combine the frequency domain prior information output by the wavelet prior module and process it through the frequency-space collaborative gated attention module to obtain the output of the deep coding layer 1.
[0139] Step 5: Max pool the output of the first deep coding layer and input it into the second deep coding layer. Combine it with the corresponding frequency domain prior information and process it through the frequency-space collaborative gating attention module to obtain the output of the second deep coding layer.
[0140] Step 6: Max pool the output of the second deep coding layer and input it into the third deep coding layer. Combine it with the corresponding frequency domain prior information and process it through the frequency-space collaborative gating attention module to obtain the encoder enhanced feature map.
[0141] Step 7: Upsample the encoder enhancement feature map, and then fuse it with the feature map transmitted by the two-hop connection of the deep coding layer. This fusion serves as the input of the first shallow decoding layer. After processing by the frequency-space collaborative gating attention module, the output of the first shallow decoding layer is obtained.
[0142] Step 8: Upsample the output of the first shallow decoding layer, and then fuse it with the feature map transmitted by the skip connection of the first deep coding layer. This fusion is used as the input of the second shallow decoding layer. After processing by the frequency-space co-gated attention module, the output of the second shallow decoding layer is obtained.
[0143] Step 9: Upsample the output of the second shallow decoding layer, and then fuse it with the feature map transmitted by the skip connection of the second shallow coding layer as the input of the first deep decoding layer. After processing by the residual pre-activation module, the output of the first deep decoding layer is obtained.
[0144] Step 10: Upsample the output of the deep decoding layer 1, and then fuse it with the feature map transmitted by the skip connection of the shallow coding layer 1 as the input of the deep decoding layer 2. After processing by the residual pre-activation module, the output of the deep decoding layer 2 is obtained.
[0145] Step 11: Upsample the output of each layer of the decoder to the size of the initial feature map and fuse them. Then, perform inter-channel information exchange through 1×1 convolution to obtain the final infrared small target detection result.
[0146] Example 3
[0147] Based on the same inventive concept as Embodiments 1 and 2, this embodiment introduces a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the steps of the infrared small target detection method based on a frequency-space cooperative gating attention network as described in Embodiment 1 or 2.
[0148] To verify the actual effect of the method of the present invention, four public datasets (IRSTD-1K, NUAA-SIRST, NUDT-SIRST, and IRSTD-Air) were used to verify the performance improvement of the present invention compared with existing methods.
[0149] The training platform consisted of a single NVIDIA GTX 1080 Ti GPU. Considering the varying sizes of different datasets, the training parameters were specifically set as follows: for IRSTD-1K and NUAA-SIRST, the number of training epochs was set to 1000, and the batch size to 4; for NUDT-SIRST and IRSTD-Air, the number of training epochs was set to 1500, and the batch size to 16. The input size for NUAA-SIRST was scaled to 512×512, while the original resolution of the other datasets remained unchanged. The optimizer was Adam, with a fixed learning rate of 0.00006. Data augmentation was not used to ensure training stability.
[0150] Table 1 shows a performance comparison of this embodiment with existing methods on an infrared small target detection dataset. Existing methods include L2SKNet (based on spatial kernels), PQGNet (based on pyramid graph convolution), HDNet (based on high-pass filtering), MLPNet (based on multilayer perceptrons), DATransNet (based on Transformer), and the recently released MSHNet. The most commonly used evaluation metrics in the field of infrared small target detection are used for evaluation, including Intersection over Union (IoU), normalized IoU (nIoU), detection rate (Pd), false alarm rate (Fa), and receiver operating characteristic (ROC) curve. The model parameter count (Params) and computational cost (FLOPs) are also compared.
[0151] Table 1
[0152]
[0153] Table 1 shows that on the NUAA-SIRST and IRSTD-Air datasets, this invention achieved the best performance across all evaluation metrics. On the NUDT-SIRST and IRSTD-1k datasets, although this invention performed slightly worse than some existing methods on some metrics, its overall performance remained the best. On the most complex IRSTD-1k dataset, compared to HDNet, which achieved the highest Pd value on this dataset, the Pd value of this invention was only 0.33% lower, and the Fa value was also lower, meaning that this invention can achieve more accurate target discrimination under the most complex conditions. In summary, this invention achieves a balance between detection rate and false positive rate while maintaining a low number of model parameters and computational cost.
[0154] Figure 4The figure shows the ROC curve comparison results of this invention and existing methods on four public datasets, reflecting the balance between the true positive rate and the false positive rate under different detection thresholds. The closer the curve is to the upper left corner, the higher the target detection rate the model can achieve at a lower false alarm rate, and the better the overall performance. As can be seen from the figure, this invention exhibits excellent detection performance on all four datasets, with its ROC curve generally above most of the comparison methods; especially in the low false alarm rate region, this invention can achieve a higher true detection rate earlier, indicating that the model can accurately detect real targets while maintaining a low false alarm rate.
[0155] Specifically, on the IRSTD-1k dataset, the ROC curve of this invention consistently leads; on the NUAA-SIRST dataset, the performance of this invention is close to the optimal method, but it still has a significant advantage in low false alarm rate regions, indicating stronger robustness in complex backgrounds; on the NUDT-SIRST dataset, this invention can quickly reach a near-saturation detection rate with a low false alarm rate, demonstrating strong small target perception capabilities; on the IRSTD-Air dataset, this invention exhibits the fastest performance improvement speed, achieving a high detection rate even under extremely low false alarm rate conditions. In summary, this invention achieves a better balance between detection rate and false alarm rate on all four datasets, verifying that the proposed frequency-spatial domain collaborative gated attention network can effectively fuse spatial semantic information and spectral structure information, enhance target feature representation, suppress background clutter interference, and significantly improve the accuracy and robustness of infrared small target detection.
[0156] Figure 5This document provides a visual comparison of the infrared small target detection results between the present invention and existing methods. The GT column represents the manually labeled true target location as the evaluation standard. Red boxes indicate correct detection, blue boxes indicate missed detections, and yellow boxes indicate false detections. The four infrared images selected in this embodiment are highly representative and challenging. In the first two images, the targets are smaller, weaker, and have more blurred outlines, with almost no clear spatial boundary between the target and the background. Even if traditional methods can extract local responses, they are easily submerged during feature propagation due to the weak target signal, ultimately leading to missed detections. The latter two images mainly exhibit complex backgrounds and strong noise interference, such as texture clutter and localized high-brightness interference. These interference regions have a strong similarity to the real target in spatial appearance. Traditional methods, lacking joint judgment of spectral structure and contextual semantics, often misidentify these interference regions as targets, resulting in numerous false detections. In contrast, the present invention, through a frequency-space collaborative gating attention mechanism, achieves accurate detection in the first two images and significantly reduces false detections in the latter two images, thus verifying the robustness and superiority of the present invention in complex scenarios.
[0157] In summary, this invention utilizes a frequency-space collaborative gating attention module to perform gated collaborative fusion of spatial semantic information and frequency domain structural information. This enables the network to establish a dynamic balance between "seeing the target outline" and "distinguishing background clutter": when target features are weak, the adaptive frequency selection unit and multi-scale context unit help the network reactivate the target response from the global spectrum and local semantics, preventing small targets from being suppressed in deep features; when background interference is strong, the gating mechanism can filter out redundant clutter based on frequency domain differences and spatial context, retaining only more discriminative target-related information; furthermore, the dynamic frequency refinement unit performs dynamic frequency domain refinement on the fused features, continuously amplifying the effective spectral components of weak targets while suppressing spurious responses in the background, further widening the difference between the target and noise in the feature space; simultaneously, the wavelet prior module provides wavelet priors that introduce clearer high and low frequency structural cues to the network, helping to retain local sparse information of the target in the early encoding stage, reducing information loss caused by deep downsampling, and possessing stronger robustness and more stable dual-domain discrimination capability.
[0158] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0159] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0160] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement flow in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0161] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0162] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for detecting small infrared targets based on a frequency-space cooperative gated attention network, characterized in that, include: Acquire the infrared image to be detected, preprocess the image to obtain the initial feature map; The initial feature map is input into a pre-trained frequency-space co-gated attention network model, which includes an encoder module, a wavelet prior module, and a decoder module, wherein: The encoder module includes a shallow coding layer and a deep coding layer. The shallow coding layer is used to extract the underlying spatial features based on the initial feature map. The deep coding layer is used to perform frequency-space co-gated enhancement based on the underlying spatial features and the frequency domain prior information output by the wavelet prior module to obtain the encoder enhanced feature map. The wavelet prior module is used to obtain frequency domain prior information based on the underlying spatial features and input the frequency domain prior information into the deep coding layer. The decoder module includes a shallow decoding layer and a deep decoding layer. The shallow decoding layer is skip-connected to the deep coding layer, and the deep decoding layer is skip-connected to the shallow coding layer. The shallow decoding layer is used to perform frequency-space co-gated enhancement based on the encoder enhanced feature map and the output of the deep coding layer. The deep decoding layer is used to extract spatial detail features based on the enhancement result and the output of the shallow coding layer. The detection results of small infrared targets are obtained based on the output of the decoder module.
2. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 1, characterized in that, The skip connection transmits the output of each coding layer to the corresponding decoding layer, and fuses it with the upsampled output of the previous decoding layer as the input of the current decoding layer.
3. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 1, characterized in that, Residual pre-activation modules are provided in the shallow coding layer and the deep decoding layer. These modules include standard residual blocks and pre-activation blocks, wherein: The standard residual block includes two cascaded first convolutional blocks. After the input is processed by the two first convolutional blocks, it is added element by element to the input to obtain the standard residual output. The pre-activation block includes two cascaded second convolutional blocks. The standard residual output is used as input, and after being processed by the two second convolutional blocks, it is added element by element to the input to obtain the residual pre-activation shallow feature map.
4. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 1, characterized in that, A frequency-space collaborative gating attention module is provided in the deep coding layer and the shallow decoding layer. The frequency-space collaborative gating attention module includes an adaptive frequency selection unit, a multi-scale context unit, a dual-domain fusion unit, a dynamic frequency domain refinement unit, and a feature gating fusion unit. The adaptive frequency selection unit is used to combine frequency domain prior information to perform frequency domain transformation on the input feature map of the layer to obtain frequency domain cues. The multi-scale context unit is used to perform max pooling and convolution on the input feature map of the layer to obtain spatial domain cues. The dual-domain fusion unit is used to fuse and enhance the frequency domain clues and spatial domain clues to obtain a fused feature map; The dynamic frequency domain refinement unit is used to perform dynamic frequency domain enhancement on the fused feature map to obtain a refined feature map. The feature-gated fusion unit is used to multiply and add the refined feature map with the input feature map of the layer element by element, and then process it through a pre-activation block to obtain the output of the layer.
5. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 1, characterized in that, The wavelet prior module uses Haar wavelet transform to decompose the residual pre-activated shallow feature map into a low-frequency sub-band and multiple high-frequency sub-bands. The low-frequency sub-band is used as the first frequency domain prior information and input into the adaptive frequency selection unit. The high-frequency subband is sequentially compressed using 3×3 depthwise separable convolution and 1×1 convolution to obtain the compressed high-frequency subband; the compressed high-frequency subband is then multiplied element-wise with the low-frequency subband to obtain the second frequency domain prior information, which is then input into the adaptive frequency selection unit. The low-frequency subband is fused with the compressed high-frequency subband, and after channel interaction via 1×1 convolution, it is input into the next-level wavelet prior module.
6. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 4, characterized in that, The adaptive frequency selection unit is used to combine frequency domain prior information to perform frequency domain transformation on the input feature map of the layer to obtain frequency domain cues, including: The frequency domain prior information is added element by element to the input feature map of the layer, and the resulting spatial domain feature map is subjected to Fourier transform to obtain the frequency domain feature map. The learnable mask is multiplied element-wise with the frequency domain feature map to obtain the masked frequency domain feature map. The learnable mask is a parameter matrix with the same size as the frequency domain feature map. The masked frequency domain feature map is transformed back to the spatial domain through inverse Fourier transform to obtain frequency domain clues, which are spatial feature maps carrying frequency domain selective enhancement information. The frequency domain clues are processed by 1×1 convolution to exchange information between channels, resulting in frequency domain clues after channel interaction.
7. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 4, characterized in that, The multi-scale context unit is used to perform max pooling and convolution on the input feature map of the layer to obtain spatial domain cues, including: The input feature map of the layer is divided into multiple branches along the channel dimension. Each branch is then processed by max pooling of different sizes and convolutional blocks based on large kernel decomposition to obtain the spatial domain feature map corresponding to each branch. The spatial domain feature maps of each branch are upsampled to the same size as the input feature map and then fused to obtain spatial domain cues; The spatial domain cues are processed through 1×1 convolution to exchange information between channels, resulting in spatial domain cues after channel interaction.
8. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 4, characterized in that, The dual-domain fusion unit is used to fuse and enhance the frequency domain cues and spatial domain cues to obtain a fused feature map, including: The frequency domain cues and spatial domain cues after channel interaction are activated by Sigmoid to obtain a frequency attention map and a spatial attention map, respectively. The frequency attention map and the spatial attention map are multiplied element-wise to obtain a fused feature map. The fused feature map is added element-wise to the frequency domain cues to obtain an enhanced fused feature map. The enhanced fused feature map is processed by convolutional blocks and input into a dynamic frequency domain refinement unit.
9. The infrared small target detection method based on a frequency-space cooperative gated attention network according to claim 4, characterized in that, The dynamic frequency domain refinement unit is used to perform dynamic frequency domain enhancement on the fused feature map to obtain a refined feature map, including: The fused feature map is transformed back to the frequency domain using a Fourier transform to obtain a frequency domain feature map; The channel dimension of the frequency domain feature map is compressed to half of its original value using a 1×1 convolution. Each channel of the spatial domain cue is processed by global average pooling and multilayer perceptron, followed by Softmax activation to obtain a dynamic weight vector. Each element in the array corresponds to the weight of a channel. The dynamic weight vector The compressed frequency domain feature map is multiplied element-wise and nonlinearly amplified using a ReLU-based Square operation to obtain the amplified frequency domain feature map. The magnified frequency domain feature map is then convolved with a 1×1 process to restore the channel dimension, resulting in a frequency domain feature map with restored channels. The frequency domain feature map after the channel is restored is transformed back to the spatial domain by inverse Fourier transform to obtain a refined feature map.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-9.