Infrared weak and small target detection method based on sparse attention and multi-scale feature fusion

By using a sparse attention and multi-scale feature fusion network in infrared weak and small target detection, the problem of difficult feature extraction and high false alarm rate in complex backgrounds is solved, and more accurate and robust infrared weak and small target detection is achieved.

CN118736364AActive Publication Date: 2024-10-01ZHONGBEI UNIV +1

Patent Information

Application Number
CN202410799468.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-01
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

Infrared weak and small target detection has problems such as difficulty in feature extraction, low detection rate and high false alarm rate in complex backgrounds, mainly due to the small proportion of target pixels, lack of detailed texture features and the influence of background clutter.

Method used

An infrared weak and small target detection network based on sparse attention and multi-scale feature fusion is designed. Through the combination of preprocessing, feature extraction, information enhancement, attention module and fusion module, the long-range relationship between the target and the background is learned and improved. Detection accuracy and robustness.

Benefits of technology

It effectively improves the accuracy and robustness of infrared weak and small target detection, enhances the contour description performance of real targets, provides more prior information for subsequent identification and tracking, and reduces the false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736364A_ABST
    Figure CN118736364A_ABST
Patent Text Reader

Abstract

The invention relates to the field of infrared image weak and small target detection, in particular to a sparse attention and multi-scale feature fused infrared small target detection network framework, which introduces a feature graph group in network downsampling and sensing, enhances the weight of a small target feature graph group, and improves the characterization capability of a small target. A full-connection layer is introduced into jump connection, and backgrounds with similar structures are inhibited from a global receptive field, so that the contrast ratio of a target to the backgrounds is improved; a Biform module is used for learning a remote relationship between a small target and a background, so that the defect that detail texture features are deficient is effectively overcome, and the feature expression capability is improved; a self-adaptive asymmetric fusion module is adopted, shallow spatial features and deep semantic features of an infrared weak and small target are fully mined, and multi-scale context information is fused from high-layer features and low-layer features. And completing pixel classification of a real target and background noise to obtain a real target detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of infrared image dim small target detection, and in particular to an infrared dim small target detection method combining sparse attention and multi-scale feature fusion. Background Art

[0002] Infrared small target detection uses the difference in thermal radiation between the target and the background in infrared imaging to locate the target, and has wide applications in military, security monitoring, early warning systems and other fields. Compared with ordinary visible light targets, infrared small target imaging distance is farther, resulting in a smaller proportion of the target in the image and lack of obvious texture, shape, and structural features. In addition, infrared radiation energy decays with increasing distance, making the target easily submerged by background clutter and noise, and the sparsity of the target leads to a serious imbalance between the target and the background, which brings challenges to detection.

[0003] The methods of infrared dim small target detection are mainly divided into mathematical modeling methods based on model-driven and deep learning methods based on data-driven. Model-driven methods include methods based on filtering, human visual system and low-rank sparse matrix. These methods use prior knowledge for modeling, but have certain limitations when dealing with complex scenes. For example, although the method based on the infrared background consistency assumption is simple in principle, it is prone to a high false alarm rate in complex scenes; the method based on sparse matrix and low-rank matrix recovery is complex in calculation, and it is easy to mistake noise for the target when the noise is severe, increasing the false detection rate; although the method based on the human eye visual system considers the contrast between the target and the neighborhood, it has low computational efficiency and has problems such as the salient image target is not prominent and the background clutter is not completely suppressed in the complex background. These model-driven methods take into account the physical and imaging characteristics of the target when designing the detection algorithm, but inevitably rely on some assumptions and manual features, which may not be robust enough when facing complex backgrounds. Therefore, it is necessary to further explore more effective methods to improve the accuracy and robustness of infrared dim small target detection.

[0004] The data-driven method does not require prior knowledge and manual features, and has a training design framework based on a large amount of accurate data, so it has higher detection accuracy and lower false alarm rate. Therefore, the present invention selects a data-driven method and designs a deep learning network to achieve accurate detection of infrared weak targets under complex background types. Summary of the invention

[0005] Aiming at the problems that the infrared small target pixels account for a small proportion in complex backgrounds and the lack of detailed texture features leads to difficulty in feature extraction, low detection rate and high false alarm rate, an infrared small target detection network based on sparse attention and multi-scale feature fusion is proposed. It is used to detect small targets in infrared images under complex backgrounds, which can effectively improve the detection accuracy and robustness.

[0006] The present invention adopts the following technical scheme: using an infrared dim target detection network based on sparse attention and multi-scale feature fusion to accurately detect infrared dim targets under different complex backgrounds, including the following steps: first, inputting an input image into a preprocessing module for preprocessing to normalize it, the preprocessed input image enters a first feature extraction module, the feature map extracted by the first feature extraction module is then input into the next feature extraction module, a feature extraction module including segmentation attention is used to extract features of different scales, the feature maps of different scales extracted by the feature extraction module are input into an information enhancement module, the feature map after information enhancement enters an attention module, sparse attention is introduced to learn the long-range relationship between the target and the background, the feature map output by the last attention module is input into the last upsampling module, the high-level features sampled by the last upsampling module and the low-level features output by the penultimate attention module are combined into a single feature map. The features are input into the last fusion module, and the feature map output by the last fusion module is input into the penultimate upsampling module. The high-level features sampled by the penultimate upsampling module and the low-level features output by the penultimate attention module are input into the penultimate fusion module. The feature map output by the penultimate fusion module is input into the penultimate upsampling module. The high-level features sampled by the penultimate upsampling module and the low-level features output by the penultimate attention module are input into the penultimate fusion module. And so on. The feature map output by the second fusion module is input into the first upsampling module. The high-level features sampled by the first upsampling module and the low-level features output by the first attention module are input into the penultimate fusion module. The high-level and low-level features are fused by the fusion module. The feature map output by the first fusion module is finally output as a binary image of the detection result through the output head module. The combination of the above modules constitutes an infrared dim small target detection network based on sparse attention and multi-scale feature fusion. The public data set is used and data enhancement is performed, including rotation, cropping, symmetry, adding random noise and other operations. The network is trained through multiple iterations and the loss function is used to constrain the network output, and finally the network model is obtained for prediction. The input of the network is a single frame of infrared image to be detected, and the output is the detection result containing the real target.

[0007] The preprocessing module is used to standardize the input image. First, the input image is batch normalized to adjust the brightness and contrast of the image to improve the stability and convergence speed of the model, alleviate the gradient vanishing problem during training by reducing the internal covariate shift, and improve the generalization ability of the model. After the batch normalization operation, the single-channel 256×256×1 input image is converted into a richer 256×256×16 image through the convolution layer, introducing richer effective information and context associations, capturing more complex features and structures in the image, thereby improving the overall detection performance; then the output of the convolution layer is normalized through a batch normalization layer to further stabilize the network training and accelerate convergence; finally, a Relu activation function is used to increase nonlinear characteristics and improve the expression ability of the model.

[0008] The feature extraction module uses the Resnest module, which introduces a split attention mechanism based on ResNet. By dividing the channels into multiple subgroups, the network can learn the representation of different features more effectively. First, the feature map is divided into k×r feature map groups by channel using grouped convolution, and then the r feature map groups are average pooled as a group. This makes the channel weights of each feature map group different, increases the weight of the feature map group containing small objects, and thus improves the representation ability of small object features.

[0009] The information enhancement module includes convolutional layer, fully connected layer, normalization layer, and batch normalization layer. The feature map first passes through the convolutional layer to fuse different information; then passes through a fully connected layer to map the input 256×256×C dimensional vector to a 64×C dimensional vector to reduce the number of parameters and computational complexity; through normalization operations, ensure that the data distribution between different layers of the network remains stable; then enter a fully connected layer to map the 64×C dimensional vector back to a 256×256×C dimensional vector for better subsequent use of feature information; further process the features through the convolutional layer; finally pass through the batch normalization layer to enhance the stability and convergence speed of the network. The fully connected layer is introduced in the information enhancement module to enhance the nonlinear expression ability of the model. Each neuron in the fully connected layer is connected to all neurons in the previous layer, which enables the network to learn more complex feature mappings, thereby improving the ability to extract abstract features. At the same time, the fully connected layer has a global receptive field, and each neuron has weights for all positions in the input feature map. By learning the overall features, the fully connected layer can suppress the redundant structure in the background and reduce the false alarm rate. The fully connected layer can also enhance the network's ability to perceive the difference between small targets and backgrounds, allowing the network to focus more on key areas and improve the accuracy of target detection.

[0010] The attention module uses the Biformer mechanism, which is a sparse attention mechanism that can calculate the correlation between inputs in the feature sequence and ensure that the model handles the importance of global context information in complex backgrounds for locating targets. Therefore, the multi-layer features obtained from ResNest are passed through the Biformer module to calculate self-attention to make full use of global features and establish long-range dependencies of the target. This block-based approach can reduce computational complexity and improve the efficiency of the model. At the same time, the Biformer attention mechanism can better capture long-range dependencies, thereby improving the performance of the model.

[0011] Traditional fusion modules usually adopt top-down or bottom-up mechanisms to integrate low-level and high-level features in deep learning frameworks. Top-down modulation methods can embed more accurate semantic information from high-level features, but they are prone to losing small infrared targets in complex backgrounds when the network depth increases. Bottom-up modulation can enrich high-level features with spatial details of low-level features and highlight deep infrared small targets, but it may weaken the semantic information of the target, thereby reducing detection accuracy. In order to combine top-down global attention and bottom-up local attention, an adaptive asymmetric fusion module is proposed to exchange multi-scale contextual information between low-level and high-level layers.

[0012] The upsampling module uses nearest neighbor upsampling to expand the deep feature map from W×H×2C to 2W×2H×C, and then fuses and merges it into the shallow feature map point by point, and finally outputs a feature map of size 2W×2H×C.

[0013] The output head module first uses the convolution layer to extract spatial features from the feature map to capture local features in the image and further enhance the network's perception capabilities. Subsequently, the normalization layer is introduced to normalize the feature map, accelerate network convergence and improve stability, and adjust the numerical range of the feature map to enhance generalization performance. Next, the ReLU activation function is applied for nonlinear transformation to clip the negative value part, thereby prompting the network to learn more complex feature representations and improve nonlinear expression capabilities. After ReLU activation, the convolution layer is used again for deeper feature extraction, further optimizing the network's abstract expression of the target and enhancing its sensitivity to complex targets. Finally, the output head module converts the feature map into a binary map of the target through the Sigmoid activation function, maps the value of each pixel to a range of 0 to 1, and outputs the probability of the target's existence.

[0014] In the above-mentioned infrared dim target detection network design method based on sparse attention and multi-scale feature fusion, in order to reduce the amount of parameters, the feature map output by the first information enhancement module directly enters the first fusion module without passing through the attention module, that is, there is no first attention module in the network, and the input feature map is used as the low-level feature input into the first fusion module.

[0015] The above-mentioned infrared dim target detection network design method based on sparse attention and multi-scale feature fusion, the input source image and label image are obtained by the following process: IRSTD-1K (1000 images) and NUDT-SIRST (1327 images) data sets are used as basic data sets, which contain targets of different categories and sizes, as well as different complex backgrounds such as sky, ocean, buildings, and fields, which are difficult to detect. Due to the small number of data sets, it is easy to cause problems such as unstable network training, insufficient generalization ability, and overfitting. In order to solve these problems, the data is enhanced, including rotation, left-right flipping, random flipping, and cropping. The expanded data has a total of 6328 images. The input image size is adjusted to 256×256, and the data set is divided into training set, validation set, and test set according to 7:2:1.

[0016] In order to solve the problems that the proportion of infrared small target pixels is small under complex background and the lack of detailed texture features leads to difficulty in feature extraction, low detection rate and high false alarm rate, the present invention proposes a U-shaped infrared small target detection network based on sparse attention and multi-scale feature fusion. By designing an end-to-end infrared small target segmentation network, the robust detection of real targets is achieved, the long-range relationship between small targets and background is learned, the deficiency of the lack of detailed texture features is effectively compensated, the contour description performance of the real target is improved, and more prior information is provided for subsequent recognition and tracking operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a structural diagram of the network model of the present invention.

[0018] Figure 2 It is a structural diagram of different modules of the present invention.

[0019] Figure 3 This is a module structure diagram of the feature fusion module of the present invention.

[0020] Figure 4 (a) is the original infrared input image of the ocean background in an embodiment of the present invention.

[0021] Figure 4 (b) is the label image corresponding to the ocean background source image in an embodiment of the present invention.

[0022] Figure 4 (c) is the output image of the ocean background detection network in an embodiment of the present invention.

[0023] Figure 5 (a) is the original infrared input image of the field background in an embodiment of the present invention.

[0024] Figure 5 (b) is the label image corresponding to the field background source image in an embodiment of the present invention.

[0025] Figure 5 (c) is the output image of the field background detection network in an embodiment of the present invention.

[0026] Figure 6 (a) is the original infrared input image of the cloud background in an embodiment of the present invention.

[0027] Figure 6 (b) is the label image corresponding to the cloud background source image in an embodiment of the present invention.

[0028] Figure 6 (c) is the output image of the cloud background detection network in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments:

[0030] Reference Figure 1 In this embodiment, a sparse attention and multi-scale feature fusion infrared dim small target detection network design method includes the following steps:

[0031] Step 1: Input an infrared image to be detected X∈R H×W×1 ;

[0032] Step 2: Send the infrared image X to be detected into the preprocessing module to convert the single-channel 256×256×1 input image into a richer 256×256×16 image.

[0033] X'=σ(BN(Conv(BN(X)))) (1)

[0034] X, X' represent the infrared image to be detected and the output image respectively; BN(g) represents the data normalization operation; Conv(g) represents the convolution operation; σ represents the ReLU activation function.

[0035] Step 3: After preprocessing, the image enters the feature extraction module. After passing through feature extraction module 1, the size of the image feature map remains unchanged, only the number of channels changes, becoming 256×256×32; after passing through feature extraction module 2, feature extraction module 3, and feature extraction module 4, feature maps of three scales of 128×128×64, 64×64×128, and 32×32×256 are extracted respectively.

[0036] Step 4: Enhance the information of the extracted feature maps of different scales, learn the overall features, suppress the redundant structures in the background, reduce the false alarm rate, and improve the ability to perceive the difference between small targets and the background, focusing more on the key areas.

[0037] Step 5: The feature map after information enhancement is dynamically queried through the attention mechanism to filter out irrelevant KV pairs at a coarse region level, retain a small number of relevant regions, and apply fine-grained token-to-token attention to these regions. To reduce the number of parameters, attention is only calculated for the feature maps after information enhancement 2, 3, and 4. First, region division and input mapping. Given the input feature X″∈R H×W×C , first divide it into S×S different regions, each of which contains feature vectors. That is, X″ is transformed into Then, Q, K, and V are obtained through linear mapping.

[0038] Q=X r W q (2)

[0039] K=X r W k (3)

[0040] V=X r W v (4)

[0041] Among them, W q ,W k ,W v ∈R C×C They are the projection weights of query, key, and value respectively.

[0042] By constructing a directed graph, we find the region that each given region should participate in; first, we calculate the average values ​​of Q and K in each region, and get Then calculate Q R , K R The adjacency matrix of the inter-region correlation is:

[0043] A r =Q r (K r ) T (5)

[0044] Then only the top k connections of each region are retained to prune the dependency graph. There is a routing index matrix Save the indexes of the top k connections row by row.

[0045] I r =topkIndexA r (6)

[0046] I r The i-th row of contains the indices of the top k most relevant regions of the i-th region.

[0047] Using the region-to-region routing index matrix I r , computes fine-grained token-to-token attention. For each Q in region i, it will focus on the aggregated K and V of k routing regions.

[0048] K g =gather(K,I r ),V g =gather(V,I r ) (7)

[0049] Among them, K g , V g It is the tensor of the clustered key and value, and then the attention operation is applied to the clustered KV pairs:

[0050] O=Attention(Q,K g ,V g )+LCE(V) (8)

[0051] Where Attention(g) represents the attention calculation; LCE(g) represents the deep convolution parameterization.

[0052] Step 6: The upsampling module uses nearest neighbor upsampling to expand the deep feature map to twice its original size.

[0053] Step 7: The output of attention module 3 enters upsampling module 3, the high-level features of upsampling module 3 and the low-level features after attention module 2 are input into fusion module (AFM module) 3, the output of fusion module 3 enters upsampling module 2, the high-level features of upsampling module 2 and the low-level features after attention module 1 are input into fusion module 2, the output of fusion module 2 enters upsampling module 1, the high-level features of upsampling module 1 and the low-level features after information enhancement module 1 are input into fusion module 1. High-level features contain a lot of semantic information, and important channels are selected through channel attention; low-level features contain target position information, and point attention mechanism is used to retain the spatial detail information of small infrared targets.

[0054] g pa (X) = δ(W 2 σ(W 1 X)) (9)

[0055] g ca (X) = δ(W 2 σ(W1 P(X))) (10)

[0056] After the features are fused by summing, g pa and g ca Constraints are made to solve the problem of feature mismatch caused by single constraints. and ⊙ are the corresponding unit multiplication and the corresponding vector tensor multiplication respectively, δ is the Sigmoid activation function, and σ is the ReLU activation function.

[0057]

[0058] Step 8: Model training parameter setting: The model training uses a Windows server with an NVIDIA RTX A4000 graphics card with a video memory of 16GB, and the test software is PyCharm2021.1. The number of training sets, validation sets, and test sets are 4429, 1266, and 633 respectively, the image size is 256×256, the total number of training epochs is 100, the learning rate is initialized to 0.01, the optimization function selects the Adam optimizer, and the network framework is pytorch2.1.

[0059] Step 9: Model training process: The infrared small target detection network based on feature compensation proposed in the present invention belongs to an end-to-end network model. Every 16 images are sent to the network model as a batch for iterative training. The softIoU_loss and focal_loss loss functions are used to calculate the loss of the network output and the corresponding label, and then the network parameters are updated by gradient back propagation. After each round of training, the network is verified to avoid overfitting or underfitting. The trained network model is tested using the test set, and the test results are evaluated using evaluation indicators (signal-to-noise ratio gain, background suppression factor, intersection-over-union ratio, precision, recall rate and F measure).

[0060] Step 10: Image detection process: Input the image to be detected into the trained model for detection. The detection results are as follows: Figure 4 (c) Figure 5 (c) Figure 6 (c) as shown.

Claims

1. A sparse attention and multi-scale feature fusion infrared small target detection network design method, characterized by: The following steps are involved: First, the input image is input into the preprocessing module for preprocessing to normalize it. The preprocessed input image enters the first feature extraction module. The feature map extracted by the first feature extraction module is then input into the next feature extraction module. The feature extraction module containing segmentation attention is used to extract features of different scales. The feature maps of different scales extracted by the feature extraction module are respectively input into the information enhancement module. The feature map after information enhancement enters the attention module, and sparse attention is introduced to learn the long-range relationship between the target and the background. The feature map output by the last attention module is input into the last upsampling module. The high-level features sampled by the last upsampling module and the low-level features output by the penultimate attention module are input into the last fusion module. The feature map output by the last fusion module is input into the penultimate upsampling module. The high-level features sampled by the penultimate upsampling module and the low-level features output by the penultimate attention module The feature map outputted from the second-to-last fusion module is inputted into the third-to-last upsampling module. The high-level features sampled by the third-to-last upsampling module and the low-level features outputted by the fourth-to-last attention module are inputted into the third-to-last fusion module. By analogy, the feature map outputted from the second fusion module is inputted into the first upsampling module. The high-level features sampled by the first upsampling module and the low-level features outputted by the first attention module are inputted into the first-to-last fusion module. The high-level and low-level features are fused by the fusion module. The feature map outputted by the first fusion module is finally outputted into a binary image of the detection result by the output head module. The combination of the above modules constitutes an infrared dim small target detection network based on sparse attention and multi-scale feature fusion. Public data sets are used for data enhancement. The network is trained through multiple iterations and the output of the network is constrained by the loss function. Finally, the network model is obtained for prediction.

2. According to claim 1, a sparse attention and multi-scale feature fusion infrared small target detection network design method is characterized by: The preprocessing module converts the single-channel input image into a richer image through a convolutional layer, captures more complex features and structures in the image, introduces more information and context associations, and provides richer input for the subsequent feature extraction module; The feature extraction module uses the Resnest module, which introduces a split attention mechanism based on ResNet. By dividing the channels into multiple subgroups, the network can learn more effective feature representations between different subgroups, thereby improving the network's ability to capture different features. The fully connected layer is introduced in the information enhancement module. The fully connected layer has a global receptive field, and each neuron has a weight for all positions in the input feature map. By learning the overall features, the redundant structure in the background is suppressed, the false alarm rate is reduced, and the difference perception ability between small targets and background is improved, so that the network can better focus on key areas. The attention module uses a sparse attention mechanism, which can calculate the correlation between inputs in the feature sequence, ensuring that the model processes the importance of global context information in complex backgrounds for locating targets; at the same time, it reduces model parameters to meet real-time requirements; The feature fusion module combines the top-down global attention and the bottom-up local attention, and proposes an adaptive asymmetric fusion module to exchange multi-scale contextual information between low-level and high-level layers.

3. The infrared small target detection network design method based on sparse attention and multi-scale feature fusion according to claim 2 is characterized by: The feature extraction module uses grouped convolution to divide the feature map into k×r feature map groups according to the channels, and then performs average pooling on the r feature map groups as a group, so that the weights of the channels of each feature map group are different, increasing the weights of the feature map groups containing small targets and improving the representation ability of small target features.

4. The method for designing an infrared small target detection network based on sparse attention and multi-scale feature fusion according to claim 3 is characterized in that: The attention module adopts the Biformer attention mechanism. By introducing the bidirectional attention mechanism, the Biformer attention mechanism can better capture the dependencies between different positions in the sequence. It divides the sequence into multiple small blocks, performs self-attention calculation within each small block, and then captures the dependencies between different small blocks through cross-attention calculation.

5. The method for designing an infrared small target detection network based on sparse attention and multi-scale feature fusion according to claim 4, characterized in that: The feature fusion module inputs the high-level features of the upsampling module and the low-level features of the attention module into the AFM module. The high-level features contain a lot of semantic information, and important channels are selected through channel attention; the low-level features contain target position information, and the point attention mechanism is used to retain the spatial detail information of small infrared targets, thereby exchanging low-level and high-level multi-scale contextual information.

6. The method for designing an infrared small target detection network with sparse attention and multi-scale feature fusion according to claim 5, characterized in that: Data augmentation includes rotation, cropping, symmetry, and adding random noise operations.

7. A method for designing an infrared small target detection network with sparse attention and multi-scale feature fusion according to claim 1 or 2 or 3 or 4 or 5 or 6, characterized in that: In order to reduce the amount of parameters, the feature map output by the first information enhancement module directly enters the first fusion module, and the input feature map is used as the low-level feature input to the first fusion module.

8. A method for designing an infrared small target detection network with sparse attention and multi-scale feature fusion according to claim 1 or 2 or 3 or 4 or 5 or 6, characterized in that: The IRSTD-1K and NUDT-SIRST datasets are used as basic datasets, which contain targets of different categories and sizes, as well as complex backgrounds such as the sky, ocean, buildings, and fields. The data are enhanced, including rotation, left-right flipping, random flipping, cropping, and adjusting the input image size to 256×256. The dataset is divided into training set, validation set, and test set according to the ratio of 7:2:1.

Citation Information

Patent Citations

  • Infrared small target detection method based on bidirectional attention aggregation mechanism

    CN114882322A

  • Design method of interpretable multi-scale infrared weak and small target detection network

    CN114998566A

  • Contextual visual-based SAR target detection method and apparatus, and storage medium

    US20230184927A1

Cited By

  • Adaptive tiny target detection method based on attention mechanism

    CN119478376A

  • An Adaptive Small Target Detection Method Based on Attention Mechanism

    CN119478376B