Wavelet multi-frequency-based infrared small target detection method and system
Patent Information
- Application Number
- CN202611410502.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]但是,现有基于深度学习的基于小波多频的红外小目标检测方法多聚焦于空域特征建模,由于红外目标像素占比极低,深层网络的空域池化下采样操作存在较为严重的信息损耗,极易导致弱小目标的语义特征混淆或重叠,甚至造成深层网络的响应丢失;另外,虽然部分方法利用了频域特征信息,但更侧重于搭建复杂的网络结构来增强特征表达能力,轻视了与目标特性相似的噪声易于引发虚警的问题,造成检测准确率下降
[0016]可见,本申请利用包含若干层串联的目标组合的编码器对红外图像进行多层特征提取得到每层的编码特征;其中,所述目标组合依次包括小波残差块和小波感知降采样模块;所述小波感知降采样模块中的空域分支用于处理目标特征得到空域特征,频域分支用于处理目标特征得到目标低频分量特征与目标高频分量特征,并将目标低频分量特征和利用目标低频分量特征对目标高频分量特征进行净化处理得到的净化后分量特征融合,得到频域特征;所述编码特征为对所述空域特征与所述频域特征进行融合后得到的特征;所述目标特征为当前层的小波残差块输出的多尺度空频融合特征;对所述编码特征进行分块嵌入处理,得到每层的嵌入特征;通过小波多频交叉注意力模块,对相邻两层的嵌入特征进行融合,得到适配相邻两层中浅层的融合特征,对每个所述融合特征进行重构处理以得到与所述编码特征的特征尺寸一致的重构特征;利用解码器处理每个所述重构特征,得到每个所述重构特征对应的解码特征,基于所有所述解码特征和最深层的所述编码特征得到最终小目标检测结果。由此可见,本申请采用小波感知降采样模块,支持空频域双分支协同采样,能够在降维同时保持特征细节并强化目标响应,有利于降低池化操作造成的信息损失,并进一步提高检测准确率;本申请同时引入空域特征和频域特征,且频域特征并不是单一特征,而是包括了目标低频分量特征和净化后的目标高频分量特征,其中,净化后的目标高频分量特征减少了噪声的影响,有利于减少虚警,并进一步提高检测准确率;本申请引入了小波多频交叉注意力模块,进行相邻两层的特征融合,实现跨层特征交互融合,有利于提高检测准确率。
Smart Images

Figure CN122990428A_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 and system based on wavelet multi-frequency. Background Technology
[0002] Infrared small target detection technology has played a crucial role in traffic management and drone surveillance. Segmenting targets of interest from images acquired by infrared imaging systems to obtain their spatial location and motion status has significant application value. However, in long-range imaging scenarios, infrared small targets typically appear as blurry, point-like spots without clear outlines, resulting in low signal-to-noise ratios and difficulties in localization and identification in complex dynamic scenes.
[0003] In recent years, data-driven deep learning methods have become a research focus for scholars. This paper presents a deep learning-based wavelet multi-frequency infrared small target detection method that constructs a brain-like deep neural network architecture. It employs a gradient-driven backpropagation strategy to drive the model to learn target representations, thereby achieving robust detection across multiple scene types.
[0004] However, existing deep learning-based wavelet multi-frequency infrared small target detection methods mostly focus on spatial domain feature modeling. Since infrared targets account for a very small percentage of pixels, the spatial pooling downsampling operation of deep networks suffers from significant information loss, which can easily lead to semantic feature confusion or overlap of weak targets, or even cause the loss of response of deep networks. In addition, although some methods utilize frequency domain feature information, they focus more on building complex network structures to enhance feature representation capabilities, neglecting the problem that noise similar to the target characteristics can easily cause false alarms, resulting in a decrease in detection accuracy.
[0005] In summary, how to reduce information loss and improve detection accuracy is an urgent problem to be solved. Summary of the Invention
[0006] In view of this, the purpose of this invention is to provide a method, system, device, and storage medium for infrared small target detection based on wavelet multi-frequency, which can reduce information loss and improve detection accuracy. The specific solution is as follows: In a first aspect, this application discloses an infrared small target detection method based on wavelet multi-frequency, comprising: An encoder comprising several cascaded target combinations is used to extract multi-layer features from an infrared image to obtain coded features for each layer. The target combination sequentially includes a wavelet residual block and a wavelet sensing downsampling module. The spatial branch of the wavelet sensing downsampling module processes target features to obtain spatial features, while the frequency branch processes target features to obtain low-frequency and high-frequency component features. The low-frequency component features and the cleaned component features obtained by cleaning the high-frequency component features using the low-frequency component features are then fused to obtain frequency domain features. The coded features are obtained by fusing the spatial and frequency domain features. The target features are the multi-scale spatial-frequency fusion features output by the wavelet residual block of the current layer. The encoded features are segmented and embedded to obtain the embedded features of each layer; By using a wavelet multi-frequency cross-attention module, the embedded features of two adjacent layers are fused to obtain fused features that are adapted to the shallow layers of the two adjacent layers. Each fused feature is then reconstructed to obtain a reconstructed feature with the same feature size as the encoded feature. Each reconstructed feature is processed using a decoder to obtain a corresponding decoded feature. The final small target detection result is obtained based on all the decoded features and the deepest encoded feature.
[0007] Optionally, the step of fusing the embedded features of two adjacent layers using a wavelet multi-frequency cross-attention module to obtain fused features adapted to the shallower layers of the two adjacent layers includes: The embedded features of two adjacent layers are input into the same wavelet multi-frequency cross-attention module; The wavelet multi-frequency cross-attention module performs discrete wavelet transform on the shallow embedding features of two adjacent layers to decompose the shallow embedding features of two adjacent layers into several reference frequency component features. Based on the reference frequency component features, a query corresponding to each reference frequency component feature is generated. A key is generated based on the reference low-frequency component features in the reference frequency component features. A value is generated based on the deep embedding features of two adjacent layers and the reference low-frequency component features in the reference frequency component features. The wavelet multi-frequency cross-attention module is used to perform self-attention calculation based on several triples to obtain the features to be fused that are suitable for the shallow layers of the two adjacent layers. The features to be fused and the embedded features of the shallow layers of the two adjacent layers are fused to obtain the fused features that are suitable for the shallow layers of the two adjacent layers. The triples include a key, a value and a query corresponding to the reference frequency component feature.
[0008] Optionally, the step of performing self-attention computation based on several triples to obtain the features to be fused that are adapted to the shallower layers in two adjacent layers includes: Calculate the correlation degree between the query and the key in each triplet, and process the correlation degree through the SoftMax activation function to obtain the multi-frequency self-attention weight map corresponding to each triplet; Using a multilayer perceptron with residual connections, the multi-frequency self-attention weight map and value corresponding to each triplet are processed to obtain the global feature corresponding to each triplet, and all the global features are concatenated to obtain the first concatenated feature. Determine the target space-frequency fusion features corresponding to several reference frequency component features respectively, and stitch all the target space-frequency fusion features together to obtain a second stitched feature; The first spliced feature and the second spliced feature are processed sequentially by inverse discrete wavelet transform and dilated convolution module respectively to obtain the first feature to be aggregated and the second feature to be aggregated. The first feature to be aggregated and the second feature to be aggregated are fused, added and aggregated to obtain the feature to be fused that is adapted to the shallow layer of the two adjacent layers.
[0009] Optionally, each of the reconstructed features is processed using a decoder to obtain the decoded features corresponding to each of the reconstructed features, including: The decoder upsamples the target deep feature corresponding to each reconstructed feature to obtain the upsampled feature. Then, the upsampled feature and the corresponding reconstructed feature are processed by channel cross-attention to obtain the attention-enhanced feature. Wherein, if the reconstructed feature is the deepest reconstructed feature, then the target deep feature is the deepest encoded feature; if the reconstructed feature is not the deepest reconstructed feature, then the target deep feature is the decoded feature corresponding to the reconstructed feature of the previous layer. The upsampled features and the attention-enhanced features are concatenated along the channel dimension and then fused and decoded to obtain the decoded features corresponding to each reconstructed feature.
[0010] Optionally, obtaining the final small target detection result based on all the decoded features and the deepest encoded features includes: Pointwise convolutions are performed on all the decoded features and the deepest encoded features to obtain aggregated features with 1 channel. Each aggregated feature is then processed by the Sigmoid activation function to obtain the initial detection result. Each initial detection result is upsampled to obtain a reference detection result; the spatial resolution of the reference detection result is consistent with the spatial resolution of the infrared image. By splicing and aggregating all the aforementioned reference detection results, the final small target detection result is obtained.
[0011] Optionally, the infrared small target detection method based on wavelet multi-frequency further includes: The initial loss value between each of the reference detection results and the preset result, and between the final small target detection result and the preset result, are calculated using a composite loss function; the composite loss function is the DiceTopK loss function. The sum of all the initial loss values is calculated to obtain a comprehensive loss value, and backpropagation is performed based on the comprehensive loss value to update the learning parameters of the encoder, wavelet multi-frequency cross-attention module, and decoder.
[0012] Optionally, the spatial branch in the wavelet sensing downsampling module is used to process the target features through convolutional blocks to obtain convolutional features, and to generate channel attention based on the convolutional features, and to obtain spatial features based on the channel attention and the convolutional features; the frequency branch in the wavelet sensing downsampling module is used to process the target features through discrete wavelet transform to obtain target low-frequency component features and target high-frequency component features, and to generate spatial attention using the target low-frequency component features to weight the target high-frequency component features, to perform gated Gaussian filtering on the weighted target high-frequency component features to obtain purified component features, to fuse the target low-frequency component features and purified component features, and to use the channel attention to weight the fused component features to obtain frequency features; Accordingly, in the first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the infrared image; in the non-first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the encoded feature output by the wavelet sensing downsampling module of the previous layer.
[0013] Secondly, this application discloses an infrared small target detection system based on wavelet multi-frequency, comprising: An encoding module is used to extract multi-layer features from an infrared image using an encoder comprising several layers of cascaded target combinations to obtain encoded features for each layer. The target combinations sequentially include a wavelet residual block and a wavelet sensing downsampling module. The spatial branch of the wavelet sensing downsampling module processes target features to obtain spatial features, and the frequency branch processes target features to obtain low-frequency and high-frequency component features. The low-frequency component features are then fused with the purified component features obtained by purifying the high-frequency component features using the low-frequency component features to obtain frequency domain features. The encoded features are obtained by fusing the spatial and frequency domain features. The target features are the multi-scale spatial-frequency fusion features output by the wavelet residual block of the current layer. An embedding processing module is used to perform block embedding processing on the encoded features to obtain the embedding features of each layer; The fusion and reconstruction module is used to fuse the embedded features of two adjacent layers through the wavelet multi-frequency cross-attention module to obtain fused features that are adapted to the shallow layers of the two adjacent layers, and to reconstruct each fused feature to obtain a reconstructed feature with the same feature size as the encoded feature. The decoding module is used to process each of the reconstructed features using the decoder to obtain the decoded features corresponding to each of the reconstructed features, and to obtain the final small target detection result based on all the decoded features and the deepest encoded features.
[0014] Optionally, the spatial branch in the wavelet sensing downsampling module is used to process the target features through convolutional blocks to obtain convolutional features, and to generate channel attention based on the convolutional features, and to obtain spatial features based on the channel attention and the convolutional features; the frequency branch in the wavelet sensing downsampling module is used to process the target features through discrete wavelet transform to obtain target low-frequency component features and target high-frequency component features, and to generate spatial attention using the target low-frequency component features to weight the target high-frequency component features, to perform gated Gaussian filtering on the weighted target high-frequency component features to obtain purified component features, to fuse the target low-frequency component features and purified component features, and to use the channel attention to weight the fused component features to obtain frequency features; Accordingly, in the first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the infrared image; in the non-first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the encoded feature output by the wavelet sensing downsampling module of the previous layer.
[0015] Optionally, the fusion and reconstruction module includes: The embedded feature input module is used to input the embedded features of two adjacent layers into the same wavelet multi-frequency cross-attention module; The wavelet transform module is used to perform discrete wavelet transform on the shallow embedding features of two adjacent layers through the wavelet multi-frequency cross-attention module, so as to decompose the shallow embedding features of two adjacent layers into several reference frequency component features, generate a query corresponding to each reference frequency component feature based on the reference frequency component features, generate a key based on the reference low-frequency component features in the reference frequency component features, and generate a value based on the deep embedding features of two adjacent layers and the reference low-frequency component features in the reference frequency component features. The self-attention calculation module is used to perform self-attention calculation based on several triples through the wavelet multi-frequency cross-attention module to obtain the feature to be fused that is adapted to the shallow layer of the two adjacent layers. The feature to be fused and the embedded features of the shallow layer of the two adjacent layers are fused to obtain the fused feature adapted to the shallow layer of the two adjacent layers. The triple includes a key, a value and a query corresponding to the reference frequency component feature.
[0016] As can be seen, this application utilizes an encoder comprising several cascaded target combinations to perform multi-layer feature extraction on infrared images to obtain coded features for each layer; wherein, the target combination sequentially includes a wavelet residual block and a wavelet sensing downsampling module; the spatial branch of the wavelet sensing downsampling module is used to process target features to obtain spatial features, and the frequency domain branch is used to process target features to obtain target low-frequency component features and target high-frequency component features, and the target low-frequency component features and the purified component features obtained by purifying the target high-frequency component features using the target low-frequency component features are fused to obtain frequency domain features; the coded features are obtained by combining the spatial features and the frequency domain features. The features obtained after fusion are: the target feature is the multi-scale spatial-frequency fusion feature output by the wavelet residual block of the current layer; the encoded feature is subjected to block embedding processing to obtain the embedding feature of each layer; the embedding features of adjacent two layers are fused through the wavelet multi-frequency cross-attention module to obtain the fusion feature adapted to the shallow layer of the adjacent two layers; each fusion feature is reconstructed to obtain a reconstructed feature with the same feature size as the encoded feature; each reconstructed feature is processed by the decoder to obtain the decoded feature corresponding to each reconstructed feature; the final small target detection result is obtained based on all the decoded features and the deepest encoded feature. Therefore, this application employs a wavelet-based perceptual downsampling module that supports dual-branch collaborative sampling in both the spatial and frequency domains. This allows for the preservation of feature details and enhancement of target response during dimensionality reduction, which helps reduce information loss caused by pooling operations and further improves detection accuracy. This application also introduces both spatial and frequency domain features. The frequency domain features are not a single feature but include both low-frequency target component features and purified high-frequency target component features. The purified high-frequency target component features reduce the impact of noise, which helps reduce false alarms and further improves detection accuracy. Furthermore, this application introduces a wavelet multi-frequency cross-attention module to fuse features from adjacent layers, achieving cross-layer feature interaction and fusion, which helps improve detection accuracy. Attached Figure Description
[0017] 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, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 This is a flowchart of an infrared small target detection method based on wavelet multi-frequency disclosed in this application; Figure 2 This is a schematic diagram of an infrared small target detection network structure and detection process disclosed in this application; Figure 3 This is a schematic diagram of a wavelet sensing downsampling process disclosed in this application; Figure 4 This is a flowchart of a specific infrared small target detection method based on wavelet multi-frequency disclosed in this application; Figure 5 This is a schematic diagram of the wavelet multi-frequency cross-attention module processing flow disclosed in this application; Figure 6 This is a schematic diagram of the structure of an infrared small target detection system based on wavelet multi-frequency disclosed in this application; Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0019] 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.
[0020] Existing deep learning-based wavelet multi-frequency infrared small target detection methods mostly focus on spatial domain feature modeling. Since infrared targets account for a very small percentage of pixels, the spatial pooling downsampling operation of deep networks suffers from significant information loss, which can easily lead to semantic feature confusion or overlap of weak targets, and even cause the loss of response of deep networks. In addition, although some methods utilize frequency domain feature information, they focus more on building complex network structures to enhance feature representation capabilities, but neglect the problem that noise similar to the target characteristics can easily cause false alarms, resulting in a decrease in detection accuracy.
[0021] Therefore, this application proposes an infrared small target detection scheme that can reduce information loss and improve detection accuracy.
[0022] This application discloses an infrared small target detection method based on wavelet multi-frequency, see [link to relevant documentation]. Figure 1 As shown, the method includes: Step S11: The infrared image is subjected to multi-layer feature extraction using an encoder containing several layers of cascaded target combinations to obtain the coded features of each layer; wherein, the target combination sequentially includes a wavelet residual block and a wavelet sensing downsampling module; the spatial branch in the wavelet sensing downsampling module is used to process the target features to obtain spatial features, and the frequency branch is used to process the target features to obtain target low-frequency component features and target high-frequency component features, and the target low-frequency component features and the purified component features obtained by purifying the target high-frequency component features using the target low-frequency component features are fused to obtain frequency domain features; the coded features are the features obtained by fusing the spatial features and the frequency domain features; the target features are the multi-scale spatial-frequency fusion features output by the wavelet residual block of the current layer.
[0023] It should be noted that the Discrete Wavelet Transform (DWT) is a multi-resolution analysis tool capable of decomposing a signal into subbands of different frequencies. For a two-dimensional image, the DWT decomposes it into one low-frequency component (approximate subband LL) and three high-frequency components (horizontal detail subband LH, vertical detail subband HL, and diagonal detail subband HH). The low-frequency component contains global structural information such as the overall contour and gray-level distribution of the image, while the high-frequency components contain detailed information such as edges and textures. The decomposition method of the DWT has complete theoretical interpretability, the entire decomposition process can achieve lossless information preservation, and the inverse transform can complete the feature recovery. Furthermore, its multi-scale characteristics enable a natural dimensionality reduction of the feature space after decomposition.
[0024] See Figure 2 The diagram illustrates a network structure and detection process for infrared small target detection. In the diagram, CCA (Channel Cross Attention) represents channel cross attention; CBL represents cascaded convolutions (including convolution, batch normalization, and ReLU); up represents upsampling; PW represents pointwise convolution; and S represents the Sigmoid activation function. The simplified process is as follows: First, an infrared image is input, which is then passed through an encoder composed of wavelet residual blocks and a wavelet perceptual downsampling module to extract multi-scale features of different granularities. The wavelet residual blocks play a role in extracting multi-scale spatial-frequency fusion features, while the wavelet perceptual downsampling module effectively maintains the target's detailed features while reducing dimensionality. Subsequently, the encoded features are fed into a block embedding module for compression. Features from adjacent layers are input into a wavelet multi-frequency cross attention module to obtain the global structure and perform feature fusion. Finally, the features are reconstructed and fed into a decoder for gradual fusion to restore resolution. The pixel-level prediction mask generated by threshold segmentation is then clustered and output. Specific details will be introduced later.
[0025] In this embodiment, the infrared image needs to be preprocessed before input. The preprocessing stage first performs data augmentation operations such as normalization, scaling, and flipping on all input images. Then, the image is sent to the encoder to extract multi-scale features. Specifically, obtaining the target infrared image includes: obtaining an initial infrared image, and performing data augmentation operations on the initial infrared image to obtain the target infrared image; the data augmentation operations include normalization, scaling, and flipping.
[0026] In this embodiment, the encoder uses an 18-layer ResNet with embedded wavelet residuals as the backbone network, and the wavelet-aware downsampling module proposed in this application is used in the downsampling stage; the deep coding features of different sizes extracted by the backbone network... Where H and W are the height and width of the input image, respectively; This represents the number of channels for each layer of encoded features extracted; the number of channels is set to... .
[0027] It should be noted that the encoder's fifth layer acquires 128 encoded feature channels. This setting balances computational efficiency and feature extraction requirements. On the one hand, it avoids the problem of a surge in network parameters due to an excessive number of channels; on the other hand, it provides sufficient support for effectively extracting deep features.
[0028] It should be noted that the target feature is a multi-scale spatial-frequency fusion feature obtained by processing the infrared image with wavelet residual blocks, which belongs to intermediate coding features.
[0029] In this embodiment, the spatial branch of the wavelet sensing downsampling module is used to process the target features through convolutional blocks to obtain convolutional features, and to generate channel attention based on the convolutional features. Spatial features are then obtained based on the channel attention and the convolutional features. The frequency branch of the wavelet sensing downsampling module is used to process the target features through discrete wavelet transform to obtain target low-frequency component features and target high-frequency component features. Spatial attention is generated using the target low-frequency component features to weight the target high-frequency component features. The weighted target high-frequency component features are then subjected to gated Gaussian filtering to obtain purified component features. The target low-frequency component features and purified component features are then fused to obtain frequency domain features. Correspondingly, in the first-layer target combination, the target feature is the multi-scale spatial-frequency fusion feature obtained after processing the infrared image by the wavelet residual block of the current layer. In non-first-layer target combinations, the target feature is the multi-scale spatial-frequency fusion feature obtained after processing the encoded features output by the wavelet sensing downsampling module of the previous layer by the wavelet residual block of the current layer.
[0030] It should be noted that in order to separate small targets from complex backgrounds, the network needs to fully mine and utilize the comprehensive information contained in semantic features. Existing detection methods based on convolutional neural networks typically employ pooling operations during the extraction process to obtain a larger receptive field to perceive a wider range of contextual information. Since infrared targets are small in size and exhibit sparse spatial features, numerous pooling operations can easily lead to information loss, or even region loss, negatively impacting the detection rate. Traditional max-pooling downsampling methods are prone to semantic feature confusion and overlap between spatially adjacent targets, and also have the adverse effects of weakening response intensity and losing detailed information about small targets. To address these issues, this application designs a wavelet-sensory downsampling method.
[0031] It should be noted that the wavelet sensing downsampling method, relying on the multi-scale analysis characteristics of wavelet transform, introduces frequency domain information modeling into the spatial sampling process, achieving deep fusion of spatial and frequency domain dual-branch feature sampling. This method, while completing feature scale dimensionality reduction, can accurately capture and retain discriminative key detail features. See also Figure 3 The diagram shows a wavelet sensing downsampling process; the wavelet sensing downsampling module consists of two parts: a spatial branch and a frequency branch.
[0032] It should be noted that, see Figure 3 As shown, in the spatial branch, a convolutional block is first used for sampling. This convolutional block consists of a cascaded convolution, batch normalization, and ReLU activation function, with a kernel size of 2 and a stride of 2. The spatial branch achieves feature space dimensionality reduction through image block segmentation, which can effectively preserve local contrast and spatial complementarity. Specifically, the spatial branch first processes the encoded features... Convolutional blocks are processed, and then spatial branch features are generated through channel attention. The final output feature of the spatial branch is the product of the spatial branch convolution output and the channel attention. The mathematical representation of this branch is as follows: ; ;in, Indicates channel attention. Indicates spatial characteristics, This indicates the channel attention calculation operation. Represents a convolution block. Indicates multiplication.
[0033] It should be noted that, see Figure 3As shown, in the frequency domain branch, the encoded features are first decomposed into low-frequency and high-frequency components through discrete wavelet transform. The low-frequency components correspond to approximate subbands (LL), while the high-frequency components include horizontal detail subbands (LH), vertical detail subbands (HL), and diagonal detail subbands (HH). High-frequency components play a crucial role in infrared small target detection, but they are prone to introducing false alarms. While low-frequency components may reduce target localization accuracy, they can help suppress noise interference in high-frequency information, thus reducing the probability of false alarms. Based on this, the frequency domain branch design fully leverages the inherent advantages of different frequency components. The specific operation process is as follows: First, spatial attention is generated using low-frequency components, and this attention is used to weight high-frequency components. The low-frequency components provide location information of potential targets, thereby guiding the enhancement of target-related features in the high-frequency components while suppressing irrelevant interference information (a brief explanation of the weighting: the three high-frequency sub-bands LH, HL, and HH are multiplied pixel-by-pixel by the spatial weight map corresponding to the spatial attention; the pixel position corresponding to the infrared target has a weight close to 1, enhancing the high-frequency features at that position; cloud, clutter, and noise background pixels have a weight close to 0, suppressing high-frequency interference at that position). Then, the weighted high-frequency components are refined using gated Gaussian filtering, further suppressing and filtering out noise features to achieve high-frequency feature purification. Next, the purified high-frequency and low-frequency components are concatenated, and the two components are fused using residual blocks. Finally, the fused features are weighted by the channel attention generated by the spatial domain branch, thereby strengthening the focus on key feature channels. The mathematical representation of the frequency domain branch is as follows: ; ;in, Representing the discrete wavelet transform, this application employs the Haar wavelet, which balances intuitive local contrast characteristics with computational efficiency. Indicates low-frequency components. Represents high-frequency components. Represents frequency domain characteristics, Represents the residual block. This indicates a gated Gaussian filter. This represents spatial attention.
[0034] It should be noted that the decomposition method of discrete wavelet transform has complete theoretical interpretability. The entire decomposition process can achieve lossless information preservation, and the inverse transform can complete the full recovery of features. At the same time, its multi-scale characteristics enable the natural dimensionality reduction of the feature space after decomposition.
[0035] It should be noted that, see Figure 3 As shown, the spatial and frequency branches are strictly channel aligned. To leverage the complementary features of the spatial and frequency branches, they are interacted through addition, and their outputs are then deeply fused using residual convolutional blocks to obtain the final encoded features (sampled features). The mathematical formula is as follows: ; This represents the final encoded features (sampled features).
[0036] Beneficial Effects: This application designs a wavelet-sensory downsampling module to replace traditional pooling. Through collaborative sampling in both the spatial and frequency domains, it preserves feature details and enhances the target response while reducing dimensionality. The spatial branch achieves feature space dimensionality reduction through convolutional blocks, preserving local contrast and spatial complementarity. The frequency branch leverages the multi-scale analysis characteristics of wavelet transform to introduce frequency domain information modeling into the spatial sampling process, using low-frequency components to guide high-frequency component enhancement, and simultaneously suppressing noise through gated Gaussian filtering, achieving deep fusion of spatial and frequency domain feature sampling. This module effectively alleviates the information loss and semantic aliasing problems caused by pooling operations, maintaining the target feature response strength in deep networks.
[0037] Step S12: Perform block embedding processing on the encoded features to obtain the embedding features of each layer.
[0038] In this embodiment, see Figure 2 As shown, the encoded features of each layer are processed by the corresponding layer's block embedding module to obtain the embedded features. It should be noted that this application performs image block embedding processing on the encoded features through a convolution operation with a stride equal to the convolution kernel. This processing helps reduce computational load and improve training speed. Specifically, this application compresses the encoded features by a factor of 8 to generate image block embeddings.
[0039] Step S13: The embedded features of two adjacent layers are fused using the wavelet multi-frequency cross-attention module to obtain fused features that fit the shallow layer of the two adjacent layers. Each fused feature is reconstructed to obtain a reconstructed feature with the same feature size as the encoded feature.
[0040] It should be noted that, see Figure 2 As shown, the last layer does not have a corresponding multi-frequency cross-attention module. Each layer's multi-frequency cross-attention module processes the embedded features of the current layer (shallow layer) and the next layer (deep layer), i.e., the embedded features of adjacent layers. These embedded features are then processed by the wavelet multi-frequency cross-attention module to obtain the fused features. and embedded features at the same layer as the fusion features Maintain consistency in feature dimensions and size.
[0041] It should be noted that the embedded features are input into the wavelet multi-frequency cross-attention module to achieve layer-by-layer global spatial frequency information perception and fine-grained feature fusion. The embedded features from deep and shallow layers in adjacent layers are simultaneously fed into the wavelet multi-frequency cross-attention module, using wavelet transform to generate self-attention for multiple frequency components, strengthening the false alarm suppression of low-frequency information and enhancing the target response of high-frequency information. Skip connections are added at this stage to ensure that the features to be fused and the embedded features in the same layer are added to obtain the fused features, thus maintaining multi-granular semantic information; the specific process is as follows: ; This represents the wavelet multi-frequency cross-attention module.
[0042] Beneficial effects: This application proposes a wavelet multi-frequency cross-attention module to promote the interaction and enhancement of hierarchical features. This module constructs a physically meaningful self-attention mechanism based on multi-frequency components, fully utilizing complementary information from high and low frequency features to achieve cross-layer feature interaction and noise suppression.
[0043] In this embodiment, the step of reconstructing each fused feature to obtain a reconstructed feature with the same feature size as the encoded feature includes: reconstructing each fused feature to obtain a temporary feature with the same feature size as the encoded feature, and fusing the temporary feature with the encoded feature based on skip connections to obtain a reconstructed feature.
[0044] It should be noted that, see Figure 2 As shown, after the fused features are obtained through the wavelet multi-frequency cross-attention module, the fused features in each layer are reconstructed by the reconstruction module to restore them to the same size as the encoded features. It should be noted that the reconstruction module uses a bilinear upsampling operation. Furthermore, convolutional blocks are used to obtain the decoded features. Skip connections are again used to fuse features between the encoder and decoder, playing a role in stabilizing training. This process is represented as follows: ; This indicates a refactoring operation (processing).
[0045] Step S14: Use the decoder to process each of the reconstructed features to obtain the decoded features corresponding to each of the reconstructed features, and obtain the final small target detection result based on all the decoded features and the deepest encoded features.
[0046] In this embodiment, the step of processing each reconstructed feature using a decoder to obtain the decoded feature corresponding to each reconstructed feature includes: upsampling the target deep feature corresponding to each reconstructed feature using the decoder to obtain the upsampled feature, and then processing the upsampled feature and the corresponding reconstructed feature through channel cross-attention to obtain the attention-enhanced feature; wherein, if the reconstructed feature is the deepest reconstructed feature, then the target deep feature is the deepest encoded feature, and if the reconstructed feature is not the deepest reconstructed feature, then the target deep feature is the decoded feature corresponding to the reconstructed feature of the previous layer; and then concatenating and decoding the upsampled feature and the attention-enhanced feature along the channel dimension to obtain the decoded feature corresponding to each reconstructed feature.
[0047] It should be noted that, see Figure 2 As shown, after the reconstruction module, there is a decoder including CCA and CBL. Here, the decoder follows the classic UNet structure. This application uses Channel Cross Attention (CCA) to assist in aggregating deep and shallow features. Then, the upsampled features and the attention-enhanced features are concatenated along the channel dimension and then fused and decoded by two convolutional blocks. This process can be mathematically represented as: ;in, Represents the decoding features of the i-th layer. This indicates a channel dimension splicing operation; The diagram represents cascaded convolutions, batch normalization, and ReLU activation functions; it should be noted that, in the figure, .
[0048] In this embodiment, obtaining the final small target detection result based on all the decoded features and the deepest encoded feature includes: performing pointwise convolution on all the decoded features and the deepest encoded feature respectively to obtain aggregated features with 1 channel, and processing each aggregated feature with a Sigmoid activation function to obtain an initial detection result; upsampling each initial detection result to obtain a reference detection result; the spatial resolution of the reference detection result is consistent with the spatial resolution of the infrared image; and stitching and aggregating all the reference detection results to obtain the final small target detection result.
[0049] It should be noted that, see Figure 2 As shown, the decoder output The data is aggregated using pointwise convolution (PW) to reduce the number of channels to 1; then, a sigmoid activation function is used to generate the prediction result (initial detection result). This process is mathematically represented as follows: The multi-scale prediction results (initial detection results) are upsampled to the same spatial resolution as the original image to obtain reference detection results. These reference detection results are then concatenated and processed by pointwise convolution aggregation and the Sigmoid activation function to obtain the joint prediction result (the final small object detection result). Mathematically represented as: ; In this embodiment, a composite loss function is used to calculate the initial loss value between each of the reference detection results and the preset result, as well as between the final small target detection result and the preset result. The composite loss function is the DiceTopK loss function. The sum of all the initial loss values is calculated to obtain a comprehensive loss value, and backpropagation is performed based on the comprehensive loss value to update the learnable parameters of the encoder, wavelet multi-frequency cross-attention module, and decoder. It should be noted that the learnable parameters include all weights, biases, and normalized learnable coefficients that can be updated through backpropagation, such as wavelet residual blocks, spatial branches, frequency branches, weights and biases in the wavelet multi-frequency cross-attention module and decoder, etc., which will not be specifically illustrated here.
[0050] It should be noted that, see Figure 2 As shown, loss functions are calculated for all prediction results (final small object detection results) and ground truth labels (preset results). The comprehensive loss used for network training is the sum of all calculated loss values, mathematically represented as follows: ; ; ; ;in, G represents the loss function, and G represents the true value of the label (preset result). It should be noted that the loss function used in this application is the DiceTopK loss, which combines the Dice loss and TopK loss. The former describes the degree of region overlap and focuses on the target region and contour; the latter is a variant of the cross-entropy loss, which only uses the worst k% of predicted pixels to calculate the loss value, focusing on hard samples. Therefore, the composite loss function DiceTopK combines the advantages of both losses, has shape and position sensitivity, and is suitable for small target detection tasks.
[0051] As can be seen, this application utilizes an encoder comprising several cascaded target combinations to perform multi-layer feature extraction on infrared images to obtain coded features for each layer; wherein, the target combination sequentially includes a wavelet residual block and a wavelet sensing downsampling module; the spatial branch of the wavelet sensing downsampling module is used to process target features to obtain spatial features, and the frequency domain branch is used to process target features to obtain target low-frequency component features and target high-frequency component features, and the target low-frequency component features and the purified component features obtained by purifying the target high-frequency component features using the target low-frequency component features are fused to obtain frequency domain features; the coded features are obtained by combining the spatial features and the frequency domain features. The features obtained after fusion are: the target feature is the multi-scale spatial-frequency fusion feature output by the wavelet residual block of the current layer; the encoded feature is subjected to block embedding processing to obtain the embedding feature of each layer; the embedding features of adjacent two layers are fused through the wavelet multi-frequency cross-attention module to obtain the fusion feature adapted to the shallow layer of the adjacent two layers; each fusion feature is reconstructed to obtain a reconstructed feature with the same feature size as the encoded feature; each reconstructed feature is processed by the decoder to obtain the decoded feature corresponding to each reconstructed feature; the final small target detection result is obtained based on all the decoded features and the deepest encoded feature. Therefore, this application employs a wavelet-based perceptual downsampling module that supports dual-branch collaborative sampling in both the spatial and frequency domains. This allows for the preservation of feature details and enhancement of target response during dimensionality reduction, which helps reduce information loss caused by pooling operations and further improves detection accuracy. This application also introduces both spatial and frequency domain features. The frequency domain features are not a single feature but include both low-frequency target component features and purified high-frequency target component features. The purified high-frequency target component features reduce the impact of noise, which helps reduce false alarms and further improves detection accuracy. Furthermore, this application introduces a wavelet multi-frequency cross-attention module to fuse features from adjacent layers, achieving cross-layer feature interaction and fusion, which helps improve detection accuracy.
[0052] This application discloses a specific method for detecting small infrared targets based on wavelet multi-frequency. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. See also... Figure 4 As shown, it specifically includes: Step S21: Input the embedded features of two adjacent layers into the same wavelet multi-frequency cross-attention module.
[0053] Step S22: Using the wavelet multi-frequency cross-attention module, perform discrete wavelet transform on the shallow embedding features of the two adjacent layers to decompose the shallow embedding features of the two adjacent layers into several reference frequency component features. Generate a query corresponding to each reference frequency component feature based on the reference frequency component features. Generate a key based on the reference low-frequency component features in the reference frequency component features. Generate a value based on the deep embedding features of the two adjacent layers and the reference low-frequency component features in the reference frequency component features.
[0054] It should be noted that this application selects the frequency domain component of shallow features as the query feature for localization, uses global spatial structure features as the index key, and uses the feature after fusing deep features with spatial structure information as the specific content value to complete attention enhancement fusion across levels and frequency domains.
[0055] See Figure 5 The diagram illustrates a processing flow of a wavelet multi-frequency cross-attention module. In the diagram, shallow features are decomposed into different frequency subbands LL, LH, HL, and HH using discrete wavelet transform. This operation also aligns the shallow features with the deep features in spatial dimension. Subsequent calculations include query, key, and value. After constructing the query, key, and value triples under the wavelet multi-frequency cross-attention mechanism, the MFCA module (wavelet perceptual downsampling module) uses the classic self-attention computation paradigm to complete feature computation, achieving interaction and deep fusion of multi-frequency information between shallow and deep features. In the final stage, the wavelet multi-frequency cross-attention module extracts and fuses the multi-scale frequency domain semantic information of the shallow features, while also fusing the global feature information extracted by the above multi-frequency attention, and then semantically aggregates the shallow and deep features.
[0056] In this embodiment, generating a query corresponding to each reference frequency component feature based on the reference frequency component features includes: performing layer normalization processing on each reference frequency component feature to obtain a first-layer normalized component feature, and processing each first-layer normalized component feature through a multilayer perceptron to obtain a query corresponding to each reference frequency component feature.
[0057] It should be noted that, see Figure 5 As shown, the calculation for the query is as follows: After obtaining the frequency features through discrete wavelet transform, they are directly subjected to layer normalization processing, and then input into a multilayer perceptron to generate a query with frequency domain characteristics. This process is represented as follows: ; ;in, These represent approximate subbands, horizontal detail subbands, vertical detail subbands, and diagonal detail subbands, respectively. Presentation layer normalization; for convenience, subscripts are used. , This indicates a query corresponding to different frequency components. This represents a multilayer perceptron.
[0058] In this embodiment, generating a key based on the reference low-frequency component features in the reference frequency component features includes: performing layer normalization processing on the reference low-frequency component features in the reference frequency component features to obtain a second layer normalized component feature, and processing the second layer normalized component feature through a multilayer perceptron to obtain the key.
[0059] It should be noted that, see Figure 5 As shown, regarding the calculation of the key: the approximate subband LL belongs to the low-frequency part and contains global structural features such as the overall contour and gray-level distribution. In order to use the overall spatial features as the key of the attention mechanism, the approximate subband is directly subjected to layer normalization, and then input into a multilayer perceptron to generate a key with spatial structural information. This process is represented as: .
[0060] In this embodiment, the step of generating a value based on the deep embedding features of two adjacent layers and the reference low-frequency component features in the reference frequency component features includes: sequentially processing the deep embedding features of two adjacent layers through a residual block and a multilayer perceptron to obtain processed features; adding and fusing the processed features with the reference low-frequency component in the reference frequency component features to obtain transition features; performing layer normalization processing on the transition features to obtain third-layer normalized component features; and processing the third-layer normalized component features through a multilayer perceptron to obtain a value.
[0061] It should be noted that, see Figure 5 As shown, regarding value calculation: To ensure that the value contains complete detailed information about both shallow and deep features, this application constructs an aggregated value representation that integrates the low-frequency component of shallow features with deep features. First, residual blocks are used to perform preliminary processing on the deep features, simultaneously completing channel alignment to match the dimensions of the shallow features. Then, a multilayer perceptron is used to complete the refined semantic feature modeling. Subsequently, the optimized deep features are added element-wise with the shallow low-frequency component LL, and the deep features are fused using residual blocks. Finally, the fused features are directly subjected to layer normalization processing and input into the multilayer perceptron to generate values carrying rich feature information. The mathematical formula is as follows: .
[0062] Step S23: Through the wavelet multi-frequency cross-attention module, and based on several triples, perform self-attention calculation to obtain the feature to be fused that is adapted to the shallow layer of the two adjacent layers. Based on the feature to be fused and the embedded features of the shallow layer of the two adjacent layers, fuse to obtain the fused feature adapted to the shallow layer of the two adjacent layers. The triple includes a key, a value and a query corresponding to the reference frequency component feature.
[0063] In this embodiment, the step of performing self-attention computation based on several triples to obtain the features to be fused that are suitable for the shallow layers of two adjacent layers includes: calculating the correlation degree between the query and the key in each triple, and processing the correlation degree through the SoftMax activation function to obtain the multi-frequency self-attention weight map corresponding to each triple; using a multilayer perceptron with residual connections to process the multi-frequency self-attention weight map and value corresponding to each triple to obtain the global features corresponding to each triple, and concatenating all the global features to obtain the first concatenated feature; determining the target space-frequency fusion features corresponding to several reference frequency component features respectively, and concatenating all the target space-frequency fusion features to obtain the second concatenated feature; processing the first concatenated feature and the second concatenated feature sequentially through inverse discrete wavelet transform and dilated convolution modules to obtain the first feature to be aggregated and the second feature to be aggregated, and fusing and aggregating the first feature to be aggregated and the second feature to be aggregated to obtain the features to be fused that are suitable for the shallow layers of two adjacent layers.
[0064] See Figure 5 As shown, after constructing the query, key, and value triple under the wavelet multi-frequency cross-attention mechanism, the MFCA module follows the classic self-attention computation paradigm to complete feature computation. The specific process of realizing the interaction and deep fusion of multi-frequency information between shallow and deep features is as follows: First, the correlation degree between the multi-frequency query and the spatial key is calculated to effectively perceive the intrinsic correlation features between various frequency components and the global spatial structure. Then, the multi-frequency attention weight map is obtained through the SoftMax activation function. The mathematical representation of this process is: The high-frequency component attention focuses on enhancing the effective response region of the target, while the low-frequency component attention accurately represents the target's spatial location information and has good noise suppression capabilities. Then, the multi-frequency component attention maps are multiplied by the values, guiding the deep and shallow features to achieve target enhancement and false alarm suppression. Finally, the multiplied features are processed by two multilayer perceptrons with residual connections to obtain the fused low-frequency and high-frequency features, i.e., the global features. The mathematical representation of this process is as follows: ;in, This represents the multi-frequency features (global features) extracted by the attention map.
[0065] See Figure 5As shown, the wavelet multi-frequency cross-attention module extracts and fuses multi-scale frequency domain semantic information of shallow features, and simultaneously fuses the global feature information extracted by the above multi-frequency attention. The specific process of semantic aggregation of deep and shallow features is as follows: In the first part, the multi-frequency features (global features) are concatenated and then fused with the inverse discrete wavelet transform and dilated convolution module to obtain the first concatenated feature, giving full play to the purification effect of low-frequency features on high-frequency features. The first concatenated feature is then fused with the inverse discrete wavelet transform and dilated convolution module to obtain the first feature to be aggregated. The specific formula is as follows: In the second part, the multi-frequency components of the shallow feature decomposition are processed by a linear layer and a sigmoid function to mine target spatial-frequency fusion features. All the mined target spatial-frequency fusion features are concatenated to obtain the second concatenated feature. The second concatenated feature is then fused with an inverse discrete wavelet transform and a dilated convolution module to obtain the second feature to be aggregated. The specific formula is as follows: The features to be aggregated from the two branches are added together and then aggregated by the residual block to obtain the features to be fused; the specific mathematical formula is as follows: ;in, Represents the inverse discrete wavelet transform. Indicates a dilated convolution module. This represents the fusion characteristics of the deep branch output. This represents the features to be fused from the output of the shallow branch.
[0066] It should be noted that by fusing inverse discrete wavelet transform with dilated convolution module, the semantic differences between target and background in shallow features can be fully perceived.
[0067] As can be seen, this application inputs the embedding features of two adjacent layers into the same wavelet multi-frequency cross-attention module; through the wavelet multi-frequency cross-attention module, discrete wavelet transform is performed on the embedding features of the shallow layer in the two adjacent layers to decompose the embedding features of the shallow layer in the two adjacent layers into several reference frequency component features, and a query corresponding to each reference frequency component feature is generated based on the reference frequency component features, a key is generated based on the reference low-frequency component features in the reference frequency component features, and a value is generated based on the embedding features of the deep layer in the two adjacent layers and the reference low-frequency component features in the reference frequency component features; through the wavelet multi-frequency cross-attention module, self-attention calculation is performed based on several triples to obtain the feature to be fused that is adapted to the shallow layer in the two adjacent layers, and the feature to be fused and the embedding features of the shallow layer in the two adjacent layers are fused to obtain the fused feature adapted to the shallow layer in the two adjacent layers; the triple includes a key, a value, and a query corresponding to a reference frequency component feature. Therefore, this application proposes a wavelet multi-frequency cross-attention module to promote the interaction and fusion of hierarchical features. It constructs a self-attention mechanism with physical meaning based on multi-frequency components, makes full use of complementary information of high and low frequency features, and realizes cross-layer feature interaction and fusion and noise suppression. Furthermore, by using shallow frequency domain components as queries, global spatial structure as keys, and deep and shallow fusion features as values, this application can capture global contextual associations to model and remove background interference, accurately distinguish target and background semantics, and effectively suppress false alarms.
[0068] In one specific embodiment, an 18-layer ResNet with embedded wavelet residual blocks is used as the backbone network. The specific implementation of the wavelet multi-frequency attention-based infrared small target detection method proposed in this application is described in detail below. Figure 2As shown, in the network encoder, the first layer uses one wavelet residual block, outputting a feature dimension of 16×256×256, which is then passed through one wavelet-aware downsampling module, resulting in an output feature dimension of 16×128×128. The second layer uses two wavelet residual blocks, outputting a feature dimension of 32×128×128, which is then passed through one wavelet-aware downsampling module, resulting in an output feature dimension of 32×64×64. The third layer uses two wavelet residual blocks, outputting a feature dimension of 64×64×64, which is then passed through one wavelet-aware downsampling module, resulting in an output feature dimension of 64×32×32. The fourth layer uses two wavelet residual blocks, outputting a feature dimension of 128×16×16, which is then passed through one wavelet-aware downsampling module, resulting in an output feature dimension of 128×8×8. The fifth layer uses two wavelet residual blocks, outputting a feature dimension of 128×8×8. Then, the encoded features are compressed by the block embedding module. Features from every two neighboring layers are fused using the wavelet multi-frequency cross-attention module. The fused features are then reconstructed to restore the same feature dimension as the encoded features. The output features are then aggregated and have their resolution restored by the decoder. The fused output features from each layer are aggregated with deep and shallow features via channel cross-attention, concatenated along the channel dimension, and then fused and decoded by two convolutional blocks. Finally, a multi-level deep supervision strategy calculates the DiceTopK loss on the multi-scale prediction results and the ground truth labels, prompting the network to focus on small targets with varying sizes and shapes.
[0069] It should be noted that this application achieves excellent detection performance on three real-world datasets: IRSTD-1k, SIRST, and SIRST-UAVB. On the IRSTD-1k dataset, compared to SCTransNet, the proposed method improves the intersection-over-union ratio by 4.2% and the detection rate by 1.34%. On the SIRST dataset, compared to UIUNet, the proposed method improves the intersection-over-union ratio by 2.46% and the detection rate by 4.56%. On the SIRST-UAVB dataset, compared to SCTransNet, the proposed method improves the intersection-over-union ratio by 0.14%, the detection rate by 0.61%, and reduces the false alarm rate by 3.2 × 10⁻⁷. Experimental results show that this application possesses robust detection capabilities in complex real-world scenarios, balancing high detection accuracy and strong target localization capabilities, while maintaining low model complexity (10.44M parameters and 17.02G floating-point operations). Experimental results show that the wavelet multi-frequency-based infrared small target detection method proposed in this application can effectively mine multi-frequency domain feature information and achieve accurate localization and fine contour segmentation of infrared small targets in real-world scenarios such as complex backgrounds, multi-scale, and multi-illumination conditions.
[0070] Accordingly, this application also discloses an infrared small target detection system based on wavelet multi-frequency, see [link to relevant documentation]. Figure 6 As shown, the system includes: Encoding module 11 is used to extract multi-layer features from an infrared image using an encoder comprising several layers of cascaded target combinations to obtain coded features for each layer. The target combination sequentially includes a wavelet residual block and a wavelet sensing downsampling module. The spatial branch of the wavelet sensing downsampling module processes target features to obtain spatial features, and the frequency branch processes target features to obtain low-frequency and high-frequency component features. The low-frequency component features are then fused with the purified component features obtained by purifying the high-frequency component features using the low-frequency component features to obtain frequency domain features. The coded features are obtained by fusing the spatial and frequency domain features. The target features are the multi-scale spatial-frequency fusion features output by the wavelet residual block of the current layer. Embedding processing module 12 is used to perform block embedding processing on the encoded features to obtain the embedding features of each layer; The fusion and reconstruction module 13 is used to fuse the embedded features of two adjacent layers through the wavelet multi-frequency cross attention module to obtain fused features that are adapted to the shallow layers of the two adjacent layers, and to reconstruct each fused feature to obtain a reconstructed feature with the same feature size as the encoded feature. The decoding module 14 is used to process each of the reconstructed features using the decoder to obtain the decoded features corresponding to each of the reconstructed features, and to obtain the final small target detection result based on all the decoded features and the deepest encoded features.
[0071] In one embodiment, the spatial branch of the wavelet sensing downsampling module is used to process the target features through convolutional blocks to obtain convolutional features, and to generate channel attention based on the convolutional features, and to obtain spatial features based on the channel attention and the convolutional features; the frequency branch of the wavelet sensing downsampling module is used to process the target features through discrete wavelet transform to obtain target low-frequency component features and target high-frequency component features, and to generate spatial attention using the target low-frequency component features to weight the target high-frequency component features, to perform gated Gaussian filtering on the weighted target high-frequency component features to obtain purified component features, to fuse the target low-frequency component features and purified component features, and to use the channel attention to weight the fused component features to obtain frequency features; Accordingly, in the first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the infrared image; in the non-first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the encoded feature output by the wavelet sensing downsampling module of the previous layer.
[0072] In one embodiment, the fusion and reconstruction module 13 includes: The embedded feature input module is used to input the embedded features of two adjacent layers into the same wavelet multi-frequency cross-attention module; The wavelet transform module is used to perform discrete wavelet transform on the shallow embedding features of two adjacent layers through the wavelet multi-frequency cross-attention module, so as to decompose the shallow embedding features of two adjacent layers into several reference frequency component features, generate a query corresponding to each reference frequency component feature based on the reference frequency component features, generate a key based on the reference low-frequency component features in the reference frequency component features, and generate a value based on the deep embedding features of two adjacent layers and the reference low-frequency component features in the reference frequency component features. The self-attention calculation module is used to perform self-attention calculation based on several triples through the wavelet multi-frequency cross-attention module to obtain the feature to be fused that is adapted to the shallow layer of the two adjacent layers. The feature to be fused and the embedded features of the shallow layer of the two adjacent layers are fused to obtain the fused feature adapted to the shallow layer of the two adjacent layers. The triple includes a key, a value and a query corresponding to the reference frequency component feature.
[0073] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0074] Furthermore, embodiments of this application also provide an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0075] Figure 7 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the wavelet multi-frequency infrared small target detection method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0076] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0077] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. In addition to including a computer program capable of performing the wavelet multi-frequency infrared small target detection method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 221 may further include computer programs capable of performing other specific tasks.
[0078] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed wavelet multi-frequency infrared small target detection method.
[0079] For the specific steps of this method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0080] The various embodiments in this application are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple. For relevant parts, please refer to the description in the method section.
[0081] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0082] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0083] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0084] The above provides a detailed description of the infrared small target detection method and system based on wavelet multi-frequency provided in this application. Specific examples have been used to illustrate the principle and implementation of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for detecting small infrared targets based on wavelet multi-frequency, characterized in that, include: An encoder comprising several cascaded target combinations is used to extract multi-layer features from an infrared image to obtain coded features for each layer. The target combination sequentially includes a wavelet residual block and a wavelet sensing downsampling module. The spatial branch of the wavelet sensing downsampling module processes target features to obtain spatial features, while the frequency branch processes target features to obtain low-frequency and high-frequency component features. The low-frequency component features and the cleaned component features obtained by cleaning the high-frequency component features using the low-frequency component features are then fused to obtain frequency domain features. The coded features are obtained by fusing the spatial and frequency domain features. The target features are the multi-scale spatial-frequency fusion features output by the wavelet residual block of the current layer. The encoded features are segmented and embedded to obtain the embedded features of each layer; By using a wavelet multi-frequency cross-attention module, the embedded features of two adjacent layers are fused to obtain fused features that are adapted to the shallow layers of the two adjacent layers. Each fused feature is then reconstructed to obtain a reconstructed feature with the same feature size as the encoded feature. Each reconstructed feature is processed using a decoder to obtain a corresponding decoded feature. The final small target detection result is obtained based on all the decoded features and the deepest encoded feature.
2. The infrared small target detection method based on wavelet multi-frequency as described in claim 1, characterized in that, The process of fusing the embedded features of two adjacent layers using a wavelet multi-frequency cross-attention module to obtain fused features adapted to the shallowest layers in the two adjacent layers includes: The embedded features of two adjacent layers are input into the same wavelet multi-frequency cross-attention module; The wavelet multi-frequency cross-attention module performs discrete wavelet transform on the shallow embedding features of two adjacent layers to decompose the shallow embedding features of two adjacent layers into several reference frequency component features. Based on the reference frequency component features, a query corresponding to each reference frequency component feature is generated. A key is generated based on the reference low-frequency component features in the reference frequency component features. A value is generated based on the deep embedding features of two adjacent layers and the reference low-frequency component features in the reference frequency component features. The wavelet multi-frequency cross-attention module is used to perform self-attention calculation based on several triples to obtain the feature to be fused that is adapted to the shallow layer of the two adjacent layers. The feature to be fused and the embedded features of the shallow layer of the two adjacent layers are fused to obtain the fused feature adapted to the shallow layer of the two adjacent layers. The triple includes a key, a value and a query corresponding to the reference frequency component feature.
3. The infrared small target detection method based on wavelet multi-frequency as described in claim 2, characterized in that, The process of performing self-attention computation based on several triples to obtain the features to be fused that are adapted to the shallower layers in two adjacent layers includes: Calculate the correlation degree between the query and the key in each triplet, and process the correlation degree through the SoftMax activation function to obtain the multi-frequency self-attention weight map corresponding to each triplet; Using a multilayer perceptron with residual connections, the multi-frequency self-attention weight map and value corresponding to each triplet are processed to obtain the global feature corresponding to each triplet, and all the global features are concatenated to obtain the first concatenated feature. Determine the target space-frequency fusion features corresponding to several reference frequency component features respectively, and stitch all the target space-frequency fusion features together to obtain a second stitched feature; The first spliced feature and the second spliced feature are processed sequentially by inverse discrete wavelet transform and dilated convolution module respectively to obtain the first feature to be aggregated and the second feature to be aggregated. The first feature to be aggregated and the second feature to be aggregated are fused, added and aggregated to obtain the feature to be fused that is adapted to the shallow layer of the two adjacent layers.
4. The infrared small target detection method based on wavelet multi-frequency as described in claim 1, characterized in that, The decoder processes each of the reconstructed features to obtain the decoded features corresponding to each of the reconstructed features, including: The decoder upsamples the target deep feature corresponding to each reconstructed feature to obtain the upsampled feature. Then, the upsampled feature and the corresponding reconstructed feature are processed by channel cross-attention to obtain the attention-enhanced feature. Wherein, if the reconstructed feature is the deepest reconstructed feature, then the target deep feature is the deepest encoded feature; if the reconstructed feature is not the deepest reconstructed feature, then the target deep feature is the decoded feature corresponding to the reconstructed feature of the previous layer. The upsampled features and the attention-enhanced features are concatenated along the channel dimension and then fused and decoded to obtain the decoded features corresponding to each reconstructed feature.
5. The infrared small target detection method based on wavelet multi-frequency as described in claim 1, characterized in that, The final small target detection result is obtained based on all the decoded features and the deepest encoded features, including: Pointwise convolutions are performed on all the decoded features and the deepest encoded features to obtain aggregated features with 1 channel. Each aggregated feature is then processed by the Sigmoid activation function to obtain the initial detection result. Each initial detection result is upsampled to obtain a reference detection result; the spatial resolution of the reference detection result is consistent with the spatial resolution of the infrared image. By splicing and aggregating all the aforementioned reference detection results, the final small target detection result is obtained.
6. The infrared small target detection method based on wavelet multi-frequency as described in claim 5, characterized in that, Also includes: The initial loss value between each of the reference detection results and the preset result, and between the final small target detection result and the preset result, are calculated using a composite loss function. The composite loss function is the DiceTopK loss function; The sum of all the initial loss values is calculated to obtain a comprehensive loss value, and backpropagation is performed based on the comprehensive loss value to update the learning parameters of the encoder, wavelet multi-frequency cross-attention module, and decoder.
7. The infrared small target detection method based on wavelet multi-frequency according to any one of claims 1 to 6, characterized in that, The spatial branch in the wavelet sensing downsampling module is used to process the target features through convolutional blocks to obtain convolutional features, generate channel attention based on the convolutional features, and obtain spatial features based on the channel attention and the convolutional features. The frequency domain branch in the wavelet sensing downsampling module is used to process the target features through discrete wavelet transform to obtain the target low-frequency component features and the target high-frequency component features. The target low-frequency component features are used to generate spatial attention to weight the target high-frequency component features. The weighted target high-frequency component features are then subjected to gated Gaussian filtering to obtain purified component features. The target low-frequency component features and purified component features are then fused, and the channel attention is used to weight the fused component features to obtain frequency domain features. Accordingly, in the first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the infrared image; in the non-first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the encoded feature output by the wavelet sensing downsampling module of the previous layer.
8. A wavelet multi-frequency infrared small target detection system, characterized in that, include: An encoding module is used to extract multi-layer features from an infrared image using an encoder comprising several layers of cascaded target combinations to obtain encoded features for each layer. The target combinations sequentially include a wavelet residual block and a wavelet sensing downsampling module. The spatial branch of the wavelet sensing downsampling module processes target features to obtain spatial features, and the frequency branch processes target features to obtain low-frequency and high-frequency component features. The low-frequency component features are then fused with the purified component features obtained by purifying the high-frequency component features using the low-frequency component features to obtain frequency domain features. The encoded features are obtained by fusing the spatial and frequency domain features. The target features are the multi-scale spatial-frequency fusion features output by the wavelet residual block of the current layer. An embedding processing module is used to perform block embedding processing on the encoded features to obtain the embedding features of each layer; The fusion and reconstruction module is used to fuse the embedded features of two adjacent layers through the wavelet multi-frequency cross-attention module to obtain fused features that are adapted to the shallow layers of the two adjacent layers, and to reconstruct each fused feature to obtain a reconstructed feature with the same feature size as the encoded feature. The decoding module is used to process each of the reconstructed features using the decoder to obtain the decoded features corresponding to each of the reconstructed features, and to obtain the final small target detection result based on all the decoded features and the deepest encoded features.
9. The infrared small target detection system based on wavelet multi-frequency as described in claim 8, characterized in that, The spatial branch in the wavelet sensing downsampling module is used to process the target features through convolutional blocks to obtain convolutional features, generate channel attention based on the convolutional features, and obtain spatial features based on the channel attention and the convolutional features. The frequency domain branch in the wavelet sensing downsampling module is used to process the target features through discrete wavelet transform to obtain the target low-frequency component features and the target high-frequency component features. The target low-frequency component features are used to generate spatial attention to weight the target high-frequency component features. The weighted target high-frequency component features are then subjected to gated Gaussian filtering to obtain purified component features. The target low-frequency component features and purified component features are then fused, and the channel attention is used to weight the fused component features to obtain frequency domain features. Accordingly, in the first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the infrared image; in the non-first layer target combination, the target feature is the multi-scale space-frequency fusion feature obtained after the wavelet residual block of the current layer processes the encoded feature output by the wavelet sensing downsampling module of the previous layer.
10. The infrared small target detection system based on wavelet multi-frequency as described in claim 8, characterized in that, The fusion and reconstruction module includes: The embedded feature input module is used to input the embedded features of two adjacent layers into the same wavelet multi-frequency cross-attention module; The wavelet transform module is used to perform discrete wavelet transform on the shallow embedding features of two adjacent layers through the wavelet multi-frequency cross-attention module, so as to decompose the shallow embedding features of two adjacent layers into several reference frequency component features, generate a query corresponding to each reference frequency component feature based on the reference frequency component features, generate a key based on the reference low-frequency component features in the reference frequency component features, and generate a value based on the deep embedding features of two adjacent layers and the reference low-frequency component features in the reference frequency component features. The self-attention calculation module is used to perform self-attention calculation based on several triples through the wavelet multi-frequency cross-attention module to obtain the feature to be fused that is adapted to the shallow layer of the two adjacent layers. The feature to be fused and the embedded features of the shallow layer of the two adjacent layers are fused to obtain the fused feature adapted to the shallow layer of the two adjacent layers. The triple includes a key, a value and a query corresponding to the reference frequency component feature.