An attention-guided hybrid bi-branch spatial decomposition neural network method for infrared weak target detection

By designing an attention-guided hybrid dual-branch spatial decomposition neural network, and utilizing the Gaussian distribution and sparse low-rank characteristics of infrared weak targets, the problems of low detection accuracy and poor real-time performance of infrared weak targets are solved, achieving efficient and fast detection results.

CN118570439BActive Publication Date: 2026-08-04BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2024-04-16
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing infrared weak target detection methods suffer from low detection accuracy and poor real-time performance in complex backgrounds, and lack generalization ability, making it difficult to effectively utilize the characteristics of infrared weak targets and backgrounds.

Method used

An attention-guided hybrid bi-branch spatial decomposition neural network was designed. By adaptively selecting a multi-scale receptive field module, a cross-attention background estimation module, and a foreground-background saliency feature fusion module, the Gaussian distribution features and sparse low-rank features of infrared weak targets are fully extracted. The sparse low-rank characteristics are combined for background estimation and feature fusion, thereby improving detection accuracy and reducing model complexity.

Benefits of technology

It achieves efficient and rapid detection of weak infrared targets in complex backgrounds, improves detection accuracy, and reduces the number of model parameters and running time, adapting to detection tasks under different background conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570439B_ABST
    Figure CN118570439B_ABST
Patent Text Reader

Abstract

This invention proposes an attention-guided hybrid dual-branch spatial decomposition neural network method for detecting weak infrared targets. The specific steps are as follows: Step 1: Construct an adaptive multi-scale receptive field selection module based on Gaussian distribution characteristics to adaptively select the receptive field for multi-scale input information; Step 2: Construct a cross-attention background estimation module based on sparse low-rank characteristics to estimate the background by combining the feature maps after target enhancement and target smearing processing; Step 3: Construct a foreground-background feature fusion module to differiate the feature maps from the above two steps, supplement detailed information, and obtain a pixel-level probability prediction map of the entire image through a segmentation head; Step 4: Connect the two modules from Steps 1 and 2 in parallel and then connect them in series with the foreground-background feature fusion module from Step 3 to complete the neural network, and construct a loss function to train the network; use the prediction results and pixel-level labels to calculate the loss and train the network parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an attention-guided hybrid dual-branch spatial decomposition neural network method for detecting weak infrared targets, belonging to the fields of digital image processing and computer vision. It mainly involves deep learning and target detection technology and has broad application prospects in various image-based application systems. Background Technology

[0002] Currently, infrared target detection plays a crucial role in target early warning, ground monitoring, and precision guidance, making the accuracy and real-time performance of detection algorithms paramount. However, limitations in long-range infrared imaging result in targets occupying small pixel areas (typically less than 1%) and lacking texture features, leading to missed detections and false detections. Furthermore, the infrared radiation from complex background elements such as clouds, waves, and trees can interfere with accurate target detection. General-purpose target detection methods exhibit poor generalization performance in this task, making efficient and rapid detection of infrared targets a challenging endeavor.

[0003] To address the task of detecting small infrared targets, researchers have proposed numerous detection algorithms based on task characteristics, including methods based on local contrast (see references: Chen CLP, Li H, Wei Y, et al. ALocal Contrast Method for Small Infrared Target Detection[J].IEEE Transactions on Geoscience and Remote Sensing, 2013, 52(1):574-581.), Deng H, Sun X, Liu M, et al. Small Infrared Target Detection Based on Weighted Local Difference Measure[J].IEEE Transactions on Geoscience and Remote Sensing, 2016, 54(7):4204-4214.). Sensing, 2016, 54(7):4204-4214.), and filtering-based methods (see references: Su Yuege et al., Max-Mean and Max-Median Filters for Detection of Small-Targets, SPIEConference on Signal and Data Processing of Small Targets, 1999, 3809:74-83. (SDDeshpande, MHEr, R. Venkateswarlu, and P. Chan, Max-Mean and Max-Median Filters for Detection of Small-Targets[C]. SPIEConference on Signal and Data Processing of Small Targets, 1999, 3089(74):73-84.), Bai Xiangzhi et al., Novel Top-Hat Transform Analysis and Its Application in Infrared Weak Target Detection, Pattern Recognition, 2010, 43(6):2145-2156.).(Bai X and Zhou F, Analysis of New Top-hat Transformation and the Application for Infrared Dim Small Target Detection[J], Pattern Recognition, 2010, 43(6): 2145-2156.)) and optimization-based methods (see reference: Dai Y et al., Reweighted Infrared Patch-Tensor Model With Both Non-Local and Local Priors for Single-Frame Small Target Detection[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2017, 10(8): 3752-3767. (Dai Y and Wu Y, Reweighted Infrared Patch-Tensor Model With Both Non-Local and Local Priors for Single-Frame Small Target Detection[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing) Sensing, 2017, 10(8):3752-3767.), Gao Chenqiang et al. Infrared Patch-image Model for Small Target Detection in a Single Image[J]. IEEE Transactions on Image Processing, 2013, 22(12):4996-5009.), However, the detection performance of these methods depends on the matching degree between the algorithm parameters and the data, and the algorithm has poor generalization ability. When the background of the infrared weak target changes, the detection performance drops significantly.

[0004] With the rise of deep learning technology, data-driven infrared weak target detection algorithms have achieved good detection results in practical applications. Dai et al. proposed an asymmetric contextual mechanism, which utilizes top-down global attention modulation and bottom-up local attention modulation to exchange multi-scale contexts to obtain richer semantic information and spatial details (see: Dai Y, Wu Y, Zhou F, et al. Asymmetric Contextual Modulation for Infrared Small Target Detection[C]. Proceedings of the IEEE / CVF WinterConference on Applications of Computer Vision.2021:950-959.); Wang et al. proposed a deep adversarial learning framework to balance the false detection rate and false alarm rate in the process of infrared small target detection (see: Wang Huan et al. Missed Detection and False Alarm: Adversarial Learning for Small Object Segmentation in Infrared Images, IEEE / International Conference on Computer Vision,2019:8508-8517.). Detection vs. False Alarm: Adversarial Learning for Small Object Segmentation in Infrared Images [C]. IEEE / CVF International Conference on Computer Vision. 2019: 8508-8517.)); Li et al. proposed a densely nested attention network to fuse and enhance the multi-level features of weak targets (see reference: Li Boyang et al., Dense Nested Attention Network for Infrared Small Target Detection [J]. IEEE Transactions on Image Processing. 2022, 32: 1745-1758.).The above methods based on convolutional neural networks are not good at capturing long-distance dependencies between targets and backgrounds. With the excellent performance of visual transformers in vision tasks such as classification, detection, and segmentation, people have begun to study infrared weak target detection methods based on visual transformers. Wu et al. proposed a multi-level TransUNet for extracting multi-level features of targets and capturing long-range dependencies (see: Wu Tianhao et al., MTU-Net: Multilevel TransUNet for Space-Based Infrared Tiny Ship Detection[J].IEEE Transactions on Geoscience and Remote Sensing, 2023, 61:1-15.); Lin et al. combined the advantages of convolutional neural networks and visual transformers to study the correlation between targets, neighboring pixels, and the global image (see: Lin Jian et al., IR-TransDet: Infrared Dim and Small Target Detection System Using Infrared Transformers, IEEE Transactions on Geoscience and Remote Sensing, 2023, 61:1-13.). Detection WithIR-Transformer[J].IEEE Transactions on Geoscience and Remote Sensing,2023,61:1-13.)).

[0005] While deep learning methods offer advantages in accuracy, current methods based on convolutional neural networks and visual transformers focus on extracting rich target features, neglecting the unique characteristics of infrared weak targets and the utilization of background information. Furthermore, their complex network structures lead to poor real-time performance, limiting their effectiveness in weak target detection tasks. To achieve fast and efficient weak target detection, this invention designs a deep learning network model based on the grayscale distribution characteristics of weak targets and the background, proposing an attention-guided hybrid dual-branch spatial decomposition neural network method for infrared weak target detection. Summary of the Invention

[0006] 1. Objective: To address the issues of low accuracy and poor real-time performance in infrared weak target detection under complex backgrounds, this invention proposes an attention-guided hybrid dual-branch spatial decomposition neural network method for infrared weak target detection. The model fully extracts the hybrid receptive field features of infrared weak targets with Gaussian distribution characteristics, utilizes the sparse low-rank characteristics of images for cross-attention background estimation, and designs the network based on the idea of ​​fusing foreground and background saliency features. This method significantly improves detection accuracy and reduces the number of model parameters and running time.

[0007] 2. Technical Solution: To achieve the above objectives, the overall approach of this invention is based on the sparse target and low-rank background characteristics in infrared weak target images. From three perspectives—mixed receptive field target enhancement, cross-attention background estimation, and foreground-background feature fusion—it designs an adaptive multi-scale receptive field selection module based on Gaussian distribution characteristics, a cross-attention module based on sparse low-rank characteristics, and a foreground-background saliency feature fusion module. This constructs a lightweight neural network for infrared weak target detection, ensuring both fast detection speed and high target detection accuracy. The algorithmic approach of this invention is mainly reflected in the following three aspects:

[0008] 1) Based on the statistical characteristics of the two-dimensional Gaussian distribution of the shape of weak targets at long distances in the image, an adaptive multi-scale receptive field selection module based on the Gaussian distribution characteristics was designed. By connecting several convolutional units with different expansion coefficients, it can fully extract the features of weak targets and adaptively select multi-scale receptive fields to achieve the effect of enhancing the target.

[0009] 2) Based on the statistical characteristics of the sparse distribution of targets and the low-rank distribution of background in weak target images, a cross-attention module based on sparse low-rank was designed to calculate the local similarity between the feature map of the target enhancement process and the feature map of the target submersion process, so as to achieve the effect of estimating the background.

[0010] 3) In order to highlight the target and suppress the background, while preventing the loss of details of weak targets, a foreground and background saliency feature fusion module was designed. The two feature maps after the target enhancement and background estimation are differentially processed, and lower-level details are supplemented to achieve better segmentation and detection results.

[0011] This invention relates to an attention-guided hybrid dual-branch spatial decomposition neural network method for detecting weak infrared targets. The specific steps of this method are as follows:

[0012] Step 1: Construct an adaptive multi-scale receptive field selection module based on Gaussian distribution characteristics, use learnable Gaussian convolutional units with different expansion coefficients to extract features in series, and adaptively select the receptive field for multi-scale input information to achieve target feature enhancement.

[0013] Step 2: Construct a cross-attention background estimation module based on sparse low-rank characteristics, and estimate the background by cross-attention using the feature maps after target enhancement and target submersion processing;

[0014] Step 3: Construct a foreground and background feature fusion module, perform difference on the feature maps from the above two steps, supplement detailed information, and obtain a pixel-level probability prediction map of the entire image through the segmentation head;

[0015] Step 4: Connect the two modules from Steps 1 and 2 in parallel, then connect them in series with the module from Step 3 to complete the neural network. Construct a loss function to train the network. Use the prediction results and pixel-level labels to calculate the loss, thereby training the network parameters.

[0016] Output: The infrared image is processed using the trained neural network; after sufficient iterative training of the attention-guided hybrid bi-branch spatial decomposition neural network using the training data, the trained network is used to detect target pixels.

[0017] Specifically, step one is as follows:

[0018] 1.1: The network first uses a convolutional unit to extract shallow features F. stem This convolutional unit consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function operation. The convolutional kernel in the convolutional layer has a size of 3×3, a spread factor of 1, a stride of 1, and one layer of padding on each side of the image, generating a shallow feature F with 16 channels. stem ;

[0019] 1.2: Secondly, the network constructs three learnable Gaussian convolutional units (LGCUnit1, LGCUnit2, and LGCUnit3) with different expansion coefficients, which are then concatenated to extract features. Each learnable Gaussian convolutional unit is operated in parallel by three branches. The first branch in the first learnable Gaussian convolutional unit, LGCUnit1... It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a kernel size of 3×3, a spread factor of 1, a stride of 1, and one padding layer on each side of the image, generating features with 16 channels. The second branch road It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding on the edges of the image, generating features with 16 channels. and To achieve residual connections; based on the statistical characteristics that weak targets exhibit a two-dimensional isotropic Gaussian distribution in images, using a Gaussian-distributed convolution kernel can extract richer target features, therefore the third branch... It consists of a learnable Gaussian convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 1, a stride of 1, and one padding layer on each side of the image, generating features with 16 channels. In learnable Gaussian convolutional layers, the standard deviation of a two-dimensional Gaussian distribution is set as a learnable parameter of the network. To ensure that the standard deviation remains positive during parameter updates, the parameter log_sigma is first initialized to 0 in the network, and its exponential form e is used. log_sigma As the standard deviation σ of the two-dimensional Gaussian distribution, in the process of generating a two-dimensional Gaussian convolution kernel using σ, the first step is to follow the formula... A one-dimensional Gaussian distribution vector is generated, and then a two-dimensional Gaussian convolution kernel is generated by the outer product of two one-dimensional vectors; after obtaining the feature maps of the three branches, they are summed and then subjected to the ReLU activation function to obtain F. LGCUnit1 The first branch in the second learnable Gaussian convolution unit, LGCUnit2. It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a kernel size of 3×3, a spread factor of 2, a stride of 1, and two layers of padding on each side of the image, generating features with 16 channels. The second branch road It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding on the edges of the image, generating features with 16 channels. and Implement residual connections; third branch It consists of a learnable Gaussian convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 2, a stride of 1, and two layers of padding on each side of the image, generating features with 16 channels. The process of generating learnable Gaussian convolutional layers is consistent with LGCUnit1; after obtaining the feature maps of the three branches, they are summed and then subjected to the ReLU activation function to obtain F. LGCUnit2 The first branch in the third learnable Gaussian convolution unit (LGCUnit3). It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a kernel size of 3×3, a spread factor of 3, a stride of 1, and 3 layers of padding on each side of the image, generating features with 16 channels. The second branch road It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding on the edges of the image, generating features with 16 channels. and Implement residual connections; third branch It consists of a learnable Gaussian convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 3, a stride of 1, and 3 layers of padding on each side of the image, generating features with 16 channels. The process of generating learnable Gaussian convolutional layers is consistent with LGCUnit1; after obtaining the feature maps of the three branches, they are summed and then subjected to the ReLU activation function to obtain F. LGCUnit3 Next, F LGCUnit1 F LGCUnit2 and F LGCUnit3 The summation yields a feature map F with 16 channels. LGCUnit .

[0020] 1.3: The network then adaptively selects the receptive field for multi-scale input information. For feature map F... LGCUnit Global average pooling is performed along the channel dimension to obtain the feature map F. avg Using fully connected unit FCUnit1 to support F avg Perform the operation to generate a feature map F with 32 channels. fc1 This fully connected unit consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel size, a spread factor of 1, a stride of 1, and no padding on the edges of the image. Then, a fully connected unit FCUnit2 is used to process the feature map F. fc1 Perform the operation to generate a receptive field selection weighted feature map F with 48 channels. att The feature map F′ is obtained by splitting its channel dimension into two dimensions: the number of branches and the output channel, and then performing a Softmax activation function operation. att The number of branches is 3, and the number of output channels is 16; then F′ att Divide into 3 blocks F′ along the branch number dimension. att1 F′ att2 F′ att3 The above three feature maps are respectively compared with F LGCUnit1 F LGCUnit2 F LGCUnit3 Multiplication yields the feature map F after adaptive selection of receptive field size. select .

[0021] 1.4: The network performs channel attention operations on the feature map obtained in the previous step. First, the feature map F...select The process involves performing a Sigmoid activation function, followed by global max pooling in the spatial dimension. A one-dimensional convolutional layer with a kernel of 3, a spread factor of 1, a stride of 1, and no padding on the edges of the image is then used for the next step. Finally, the feature map obtained after the one-dimensional convolution is subjected to the Sigmoid activation function again and compared with F... select Multiplication yields the enhanced feature map F of the target. target .

[0022] Step two is as follows:

[0023] 2.1: Constructing a cross-attention background estimation module based on sparse low-rank characteristics. First, a convolutional unit consisting of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function is used to operate on the original image I input to the network. The convolutional kernel size in the convolutional layer is 1×1, the expansion coefficient is 1, the stride is 1, and the edges of the image are not padded, generating a feature F′ with 16 channels. stem Secondly, for feature F target F′ stem Divide into blocks separately, where for feature F target A convolutional layer with an 8×8 kernel, a spread factor of 1, a stride of 8, and no padding on the edges of the image is used to generate an image patch with 16 channels and a block size of 64×64. The height and width dimensions of the image patch are merged, and layer normalization is applied to obtain the image patch P. target For feature F′ stem The image is directly re-deformed into a 64×64 image block. Given that weak targets are sparsely distributed in the image, accounting for less than 1% of the image block, and considering that weak targets can be modeled as unusual bright spots with high contrast to the background, the 1% of pixels with the highest grayscale value in each channel of the image block are replaced with the average of the remaining pixel values ​​to effectively "submerge" the weak targets. The image block is then linearly projected onto 16 channels and simultaneously normalized to obtain image block P. background Then, a learnable embedding vector cls is set. token respectively with P target P background The image is then stitched into the 0th dimension of the original image patch, added to the set learnable location code, and processed through a dropout layer with a 0.1 probability of deactivating each neuron to obtain the target-enhanced image patch P′. target and the image patch P′ after the target is submerged background Given that the background portion of a weak target image exhibits high similarity across different locations, displaying low-rank characteristics, therefore P′ target 、P′ backgroundThese two image patches have low similarity between their corresponding patches containing weak targets and high similarity between their corresponding patches containing the background. Therefore, these two image patches are input into a single-head cross-attention layer for P′. target Linear projection yields the Q1 matrix, and P′ background Linear projection yields the K2 and V2 matrices, which are obtained using the formula... Get P att After being processed by a dropout layer where each neuron has a 0.1 probability of inactivation, and then compared with P... att Add them together and obtain P′ through layer normalization. att Then P′ att After processing by a multilayer perceptron unit, which consists of a linear projection layer mapped to 1024 dimensions, a GeLU activation function, a dropout layer with a 0.1 probability of inactivation, a linear projection layer mapped to 16 dimensions, and another dropout layer with a 0.1 probability of inactivation, sequentially concatenated, the processed result is compared with P′. att Add them together and then normalize them to get P″. att Then P″ att Backprojection and restoration of the feature map F of the image patch to its original size background .

[0024] Step three is as follows:

[0025] 3.1: Constructing a foreground / background saliency feature fusion module. Typically, an infrared image of a small target is considered to consist of three parts: the target, the background, and noise, i.e., I = B + T + N, where I represents the original image matrix, B represents the background matrix, T represents the target matrix, and N represents the noise and other error matrices. Based on the feature maps obtained in steps one and two, F... target The target information is more prominent in the middle, F background Background and noise information are prominent, so the two feature maps can be subtracted to highlight the target and suppress the background. Then, the subtracted result is processed by a Gaussian-weighted deformable convolutional unit. This unit first uses a convolutional layer with a kernel size of 3×3, a spread factor of 1, a stride of 1, and one padding layer on each side of the image to generate a pixel-shifted feature map F with 18 channels. offset Secondly, a pixel weight mask feature map F with 9 channels is generated using a learnable Gaussian convolutional unit consisting of a learnable Gaussian convolutional layer, a batch normalization layer, and a Leaky ReLU activation function operation. maskThe learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 1, a stride of 1, and one layer of padding on each side of the image. The generation process of the learnable Gaussian convolutional layer is the same as LGCUnit1 in step 1.2. Then, a convolutional layer with a kernel size of 3×3, a spread factor of 1, a stride of 1, and one layer of padding on each side of the image is used to generate a convolutional kernel weight F with 32 channels. weight Finally, using formula F deform =(F weight +F offset )×F mask Constructing a Gaussian-weighted deformable convolutional layer to operate on the difference results yields the feature map F. deform .

[0026] 3.2: The network supplements detailed information, obtaining a pixel-level probability prediction map of the entire image after passing through the segmentation head. First, a residual convolutional unit, consisting of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function, is used to perform F... target The operation generates a feature map F′ with 32 channels. target The convolutional layer has a kernel size of 1×1, a spread factor of 1, a stride of 1, and no padding on the edges of the image; then F′ target With F deform The feature map F is obtained by summing and then applying the ReLU activation function. fusion Finally, the feature map is input into the fully convolutional network segmentation head to obtain the full-image pixel-level probability prediction map F. out This segmentation head consists of a convolutional layer, a batch normalization layer, a ReLU activation function, a dropout layer with a 0.1 probability of inactivation, and a second convolutional layer, sequentially connected in series. The first convolutional layer has a 3×3 kernel, a spread factor of 1, a stride of 1, and padding of each edge of the image by 1 layer, generating a feature map with 4 channels. The second convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding of each edge of the image, generating a probability prediction map F with 1 channel. out .

[0027] Step four is as follows:

[0028] 4.1: Connect the modules from Step 1 and Step 2 in parallel, and then connect them in series with the modules from Step 3 to build a hybrid dual-branch neural network, such as... Figure 1 As shown. The loss function consists of the Soft IoU loss, L = L SoftIoUThe intersection-union ratio (IU) refers to the overlap rate between the predicted and actual target regions; it's the ratio of their intersection to their union. Smoothed IU smooths the IU to better optimize the training process and can handle class imbalance. In practice, the smoothed IU value is always between 0 and 1, and a higher value indicates more accurate detection by the network. Therefore, the IU loss is defined as... Where area(predict) is the target region predicted by the method of this invention, area(trut) is the area of ​​the real target region, ∩ is the intersection operation of sets, and ∪ is the union operation of sets. After giving the above definition of the loss function, the infrared image is input into the convolutional neural network to obtain the probability prediction map and perform a pixel-by-pixel multiplication with the labeled real result map to obtain the overlap result between the predicted target region and the real target region, i.e., area(predict)∩area(trut); based on this, the number of pixels in the real target region, the predicted target region, and the overlapping area of ​​the two are summed to calculate the smooth cross-union ratio loss.

[0029] 4.2: This invention uses the AdaGrad optimizer for optimization. The initial learning rate of the network is 0.005, and the weight decay coefficient is 10. -4 During training, a decay coefficient of 0.9 is used to adjust the learning rate, and the network parameters are adjusted through gradient backpropagation to reduce the corresponding loss function.

[0030] 3. Advantages and effects:

[0031] This invention proposes an attention-guided hybrid dual-branch spatial decomposition neural network method for detecting small infrared targets. Starting from the statistical characteristics of small infrared targets exhibiting a two-dimensional Gaussian distribution in images, an adaptive multi-scale receptive field selection module based on Gaussian properties is designed to fully extract target features and select the most relevant spatial context information. Based on the sparse and low-rank characteristics of small target images, a cross-attention background estimation module is designed to extract background information. Simultaneously, a foreground-background saliency feature fusion module is constructed to fuse information from both branches, better preserving small target features and reducing interference from complex background information. The model design, based on the characteristics of small infrared targets, demonstrates good interpretability and performance, and has broad application prospects. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating the principle of the attention-guided hybrid bi-branch spatial decomposition neural network infrared weak target detection method proposed in this invention.

[0033] Figure 2 A schematic diagram of adaptive selection of multi-scale receptive field modules based on Gaussian properties.

[0034] Figure 3This is a schematic diagram of a cross-attention background estimation module based on sparse low-rank characteristics.

[0035] Figure 4 This is a schematic diagram of the foreground and background saliency feature fusion module.

[0036] Figures 5a-5h The detection results of this invention in a real-world scenario are demonstrated; wherein, Figure 5a , 5b 5e and 5f are the original infrared images, with small targets marked by white squares. Figure 5c , 5d 5g and 5h are the detection results of the method of this invention. Detailed Implementation

[0037] To better understand the technical solution of the present invention, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0038] This invention relates to an attention-guided hybrid dual-branch spatial decomposition neural network method for detecting weak infrared targets, such as... Figure 1 As shown, the specific steps of this method are as follows:

[0039] Step 1: Construct an adaptive multi-scale receptive field selection module based on Gaussian distribution characteristics, use learnable Gaussian convolutional units with different expansion coefficients to extract features in series, and adaptively select the receptive field for multi-scale input information to achieve target feature enhancement.

[0040] Step 2: Construct a cross-attention background estimation module based on sparse low-rank characteristics, and use the cross-attention mechanism to estimate the background of the feature maps after target enhancement and target submersion processing;

[0041] Step 3: Construct a foreground and background feature fusion module, perform difference on the feature maps from the above two steps, supplement detailed information, and obtain a pixel-level probability prediction map of the entire image through the segmentation head;

[0042] Step 4: Connect the two modules from Steps 1 and 2 in parallel, then connect them in series with the module from Step 3 to complete the neural network. Construct a loss function to train the network. Use the prediction results and pixel-level labels to calculate the loss, thereby training the network parameters.

[0043] Output: The infrared image is processed using the trained neural network; after sufficient iterative training of the attention-guided hybrid bi-branch spatial decomposition neural network using the training data, the trained network is used to detect target pixels.

[0044] Specifically, step one is as follows, with details as follows: Figure 2 As shown:

[0045] 1.1: The network first uses a regular convolutional unit to extract shallow features F. stemm This conventional convolutional unit consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 3×3 kernel size, a spread factor of 1, a stride of 1, and one layer of padding on each side of the image, generating a shallow feature F with 16 channels. stemm ;

[0046] 1.2: Secondly, the network constructs three learnable Gaussian convolutional units (LGCUnit1, LGCUnit2, and LGCUnit3) with different expansion coefficients, which are then concatenated to extract features. Each learnable Gaussian convolutional unit is operated in parallel by three branches. The first branch in the first learnable Gaussian convolutional unit, LGCUnit1... It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a kernel size of 3×3, a spread factor of 1, a stride of 1, and one padding layer on each side of the image, generating features with 16 channels. The second branch road It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding on the edges of the image, generating features with 16 channels. and To achieve residual connections; based on the statistical characteristics that weak targets exhibit a two-dimensional isotropic Gaussian distribution in images, using a Gaussian-distributed convolution kernel can extract richer target features, therefore the third branch... It consists of a learnable Gaussian convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 1, a stride of 1, and one padding layer on each side of the image, generating features with 16 channels. In learnable Gaussian convolutional layers, the standard deviation of a two-dimensional Gaussian distribution is set as a learnable parameter of the network. To ensure that the standard deviation remains positive during parameter updates, the parameter log_sigma is first initialized to 0 in the network, and its exponential form e is used. log_sigma As the standard deviation σ of the two-dimensional Gaussian distribution, in the process of generating a two-dimensional Gaussian convolution kernel using σ, the first step is to follow the formula... A one-dimensional Gaussian distribution vector is generated, and then a two-dimensional Gaussian convolution kernel is generated by the outer product of two one-dimensional vectors; after obtaining the feature maps of the three branches, they are summed and then subjected to the ReLU activation function to obtain F. LGCUnit1 The first branch in the second learnable Gaussian convolution unit, LGCUnit2. It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a kernel size of 3×3, a spread factor of 2, a stride of 1, and two layers of padding on each side of the image, generating features with 16 channels. The second branch road It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding on the edges of the image, generating features with 16 channels. and Implement residual connections; third branch It consists of a learnable Gaussian convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 2, a stride of 1, and two layers of padding on each side of the image, generating features with 16 channels. The process of generating learnable Gaussian convolutional layers is consistent with LGCUnit1; after obtaining the feature maps of the three branches, they are summed and then subjected to the ReLU activation function to obtain F. LGCUnit2 The first branch in the third learnable Gaussian convolution unit (LGCUnit3). It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a kernel size of 3×3, a spread factor of 3, a stride of 1, and 3 layers of padding on each side of the image, generating features with 16 channels. The second branch road It consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding on the edges of the image, generating features with 16 channels. and Implement residual connections; third branch It consists of a learnable Gaussian convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 3, a stride of 1, and 3 layers of padding on each side of the image, generating features with 16 channels. The process of generating learnable Gaussian convolutional layers is consistent with LGCUnit1; after obtaining the feature maps of the three branches, they are summed and then subjected to the ReLU activation function to obtain F. LGCUnit3 Next, F LGCUnit1 F LGCUnit2 and F LGCUnit3 The summation yields a feature map F with 16 channels. LGCUnit .

[0047] 1.3: The network then adaptively selects the receptive field for multi-scale input information. For feature map F... LGCUnit Global average pooling is performed along the channel dimension to obtain the feature map F. avg Using fully connected unit FCUnit1 to support F avg Perform the operation to generate a feature map F with 32 channels. fc1 This fully connected unit consists of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional layer has a 1×1 kernel size, a spread factor of 1, a stride of 1, and no padding on the edges of the image. Then, a fully connected unit FCUnit2 is used to process the feature map F. fc1 Perform the operation to generate a receptive field selection weighted feature map F with 48 channels. att The feature map F′ is obtained by splitting its channel dimension into two dimensions: the number of branches and the output channel, and then performing a Softmax activation function operation. att The number of branches is 3, and the number of output channels is 16; then F′ att Divide into 3 blocks F′ along the branch number dimension. att1 F′ att2 F′ att3 The above three feature maps are respectively compared with F LGCUnit1 F LGCUnit2 F LGCUnit3 Multiplication yields the feature map F after adaptive selection of receptive field size. select .

[0048] 1.4: The network performs channel attention operations on the feature map obtained in the previous step. First, the feature map F... select The process involves performing a Sigmoid activation function, followed by global max pooling in the spatial dimension. A one-dimensional convolutional layer with a kernel of 3, a spread factor of 1, a stride of 1, and no padding on the edges of the image is then used for the next step. Finally, the feature map after the one-dimensional convolution is activated again with the Sigmoid activation function and compared with F... select Multiplication yields the enhanced feature map F of the target. target The specific process is as follows: Figure 2 As shown.

[0049] Step two is as follows:

[0050] 2.1: Construct a cross-attention background estimation module based on sparse low-rank characteristics. The specific process is as follows: Figure 3 As shown, the original image I input to the network is first processed by a convolutional unit consisting of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The convolutional kernel size in the convolutional layer is 1×1, the expansion coefficient is 1, the stride is 1, and the edges of the image are not padded, generating a feature F′ with 16 channels.stem Secondly, for feature F target F′ stem Divide into blocks separately, where for feature F targget A convolutional layer with an 8×8 kernel, a spread factor of 1, a stride of 8, and no padding on the edges of the image is used to generate an image patch with 16 channels and a block size of 64×64. The height and width dimensions of the image patch are merged, and layer normalization is applied to obtain the image patch P. targget For feature F′ stemm The image is directly re-deformed into a 64×64 image block. Given that weak targets are sparsely distributed in the image, accounting for less than 1% of the image block, and considering that weak targets can be modeled as unusual bright spots with high contrast to the background, the 1% of pixels with the highest grayscale value in each channel of the image block are replaced with the average of the remaining pixel values ​​to effectively "submerge" the weak targets. The image block is then linearly projected onto 16 channels and simultaneously normalized to obtain image block P. background Then, a learnable embedding vector cls is set. token respectively with P target P background The image is then stitched into the 0th dimension of the original image patch, added to the set learnable location code, and processed through a dropout layer with a 0.1 probability of deactivating each neuron to obtain the target-enhanced image patch P′. target and the image patch P′ after the target is submerged background Given that the background portion of a weak target image exhibits high similarity across different locations, displaying low-rank characteristics, therefore P′ target 、P′ background These two image patches have low similarity between their corresponding patches containing weak targets and high similarity between their corresponding patches containing the background. Therefore, these two image patches are input into a single-head cross-attention layer for P′. target Perform layer normalization and linear projection to obtain the Q1 matrix, and then apply this to P′. background Layer normalization and linear projection are performed to obtain the K2 and V2 matrices, which are then obtained using the formula. Get P att After being processed by a dropout layer where each neuron has a 0.1 probability of inactivation, and then compared with P... att Adding them together gives P′ att Then P′ att Layer normalization is performed, followed by processing through a multilayer perceptron unit. This unit consists of a linear projection layer mapped to 1024 dimensions, a GeLU activation function, a dropout layer with a 0.1 probability of inactivation, a linear projection layer mapped to 16 dimensions, and another dropout layer with a 0.1 probability of inactivation, sequentially concatenated. The processed result is compared with P′.att Adding them together gives P″ att Then P″ att Backprojection and restoration of the feature map F of the image patch to its original size background .

[0051] Specifically, step three is as follows: Figure 4 As shown:

[0052] 3.1: Construct a foreground / background saliency feature fusion module, the specific process is as follows: Figure 4 As shown. Typically, an infrared image of a weak target is considered to consist of three parts: the target, the background, and noise, i.e., I = B + T + N, where I represents the original image matrix, B represents the background matrix, T represents the target matrix, and N represents the noise and other error matrices. Based on the feature maps obtained in steps one and two, F target The target information is more prominent in the middle, F background Background and noise information are prominent, so the two feature maps can be subtracted to highlight the target and suppress the background. Then, the subtracted result is processed by a Gaussian-weighted deformable convolutional unit. This unit first uses a convolutional layer with a kernel size of 3×3, a spread factor of 1, a stride of 1, and one padding layer on each side of the image to generate a pixel-shifted feature map F with 18 channels. offset Secondly, a learnable Gaussian convolutional unit, consisting of a learnable Gaussian convolutional layer, a batch normalization layer, and a Leaky ReLU activation function, is used to generate a pixel Gaussian weighted mask feature map F with 9 channels. mask The learnable Gaussian convolutional layer has a kernel size of 3×3, a spread factor of 1, a stride of 1, and one layer of padding on each side of the image. The generation process of the learnable Gaussian convolutional layer is the same as LGCUnit1 in step 1.2. Then, a convolutional layer with a kernel size of 3×3, a spread factor of 1, a stride of 1, and one layer of padding on each side of the image is used to generate a convolutional kernel weight F with 32 channels. weight Finally, using formula F deform =(F weight +F offset )×F mask Constructing a Gaussian-weighted deformable convolutional layer to operate on the difference results yields the feature map F. deform .

[0053] 3.2: The network supplements detailed information, obtaining a pixel-level probability prediction map of the entire image after passing through the segmentation head. First, a residual convolutional unit, consisting of a convolutional layer, a batch normalization layer, and a LeakyReLU activation function, is used to perform F... target The operation generates a feature map F′ with 32 channels. targetThe convolutional layer has a kernel size of 1×1, a spread factor of 1, a stride of 1, and no padding on the edges of the image; then F′ target With F deform The feature map F is obtained by summing and then applying the ReLU activation function. fusion Finally, the feature map is input into the fully convolutional network segmentation head to obtain the full-image pixel-level probability prediction map F. out This segmentation head consists of a convolutional layer, a batch normalization layer, a ReLU activation function, a dropout layer with a 0.1 probability of inactivation, and a second convolutional layer, sequentially connected in series. The first convolutional layer has a 3×3 kernel, a spread factor of 1, a stride of 1, and padding of each edge of the image by 1 layer, generating a feature map with 4 channels. The second convolutional layer has a 1×1 kernel, a spread factor of 1, a stride of 1, and no padding of each edge of the image, generating a probability prediction map F with 1 channel. out .

[0054] Step four is as follows:

[0055] 4.1: Connect the modules from Step 1 and Step 2 in parallel, and then connect them in series with the module from Step 3 to build a hybrid dual-branch neural network, as shown in Figure x. The loss function consists of the Soft IoU loss, L = L SoftIoU The intersection-union ratio (IU) refers to the overlap rate between the predicted and actual target regions; it's the ratio of their intersection to their union. Smoothed IU smooths the IU to better optimize the training process and can handle class imbalance. In practice, the smoothed IU value is always between 0 and 1, and a higher value indicates more accurate detection by the network. Therefore, the IU loss is defined as... Where area(predict) is the target region predicted by the method of this invention, area(trut) is the area of ​​the real target region, ∩ is the intersection operation of sets, and ∪ is the union operation of sets. After giving the above definition of the loss function, the infrared image is input into the convolutional neural network to obtain the probability prediction map and perform a pixel-by-pixel multiplication with the labeled real result map to obtain the overlap result between the predicted target region and the real target region, i.e., area(predict)∩area(trut); based on this, the number of pixels in the real target region, the predicted target region, and the overlapping area of ​​the two are summed to calculate the smooth cross-union ratio loss.

[0056] 4.2: This invention uses the AdaGrad optimizer for optimization. The initial learning rate of the network is 0.005, and the weight decay coefficient is 10. -4During training, a decay coefficient of 0.9 is used to adjust the learning rate, and the network parameters are adjusted through gradient backpropagation to reduce the corresponding loss function. In this process, gradient descent is used for backpropagation, and the chain rule is used to update the parameters by taking the partial derivative of the loss function with respect to a specific network parameter. Where θ i The network parameters before backpropagation, θ′ i Here, η represents the network parameters updated after backpropagation, η is the learning rate, and L is the loss function.

[0057] Figures 5a-5h This is an application of the invention in a real infrared scene; the location of weak targets is marked with a white frame. Figure 5c , 5d 5g and 5h represent the corresponding detection results. The images used in the experiment came from different infrared scenes, most of which contained very faint and small targets, making it difficult to extract effective texture information. Furthermore, the background contained complex interference such as clouds, vegetation, and noise. However, the experimental results not only effectively eliminated noise interference and accurately detected the position and shape of the target, but also demonstrated advantages in computation time, achieving rapid and accurate target detection. This fully illustrates the high efficiency of the invention, which can be widely applied to various infrared weak target detection systems, possessing broad market prospects and application value.

Claims

1. A method for detecting weak infrared targets using an attention-guided hybrid dual-branch spatial decomposition neural network, characterized in that, The specific steps of this method are as follows: Step 1: Construct an adaptive multi-scale receptive field selection module based on Gaussian distribution characteristics, use learnable Gaussian convolutional units with different expansion coefficients to extract features in series, and adaptively select the receptive field for multi-scale input information to achieve target feature enhancement. Using formula Constructing a Gaussian-weighted deformable convolutional layer to operate on the difference results yields the feature map. ;in, For convolution kernel weights, This is a pixel offset feature map. For pixel weight mask feature maps; Step 2: Construct a cross-attention background estimation module based on sparse low-rank characteristics, and estimate the background by cross-attention using the feature maps after target enhancement and target submersion processing; Step 3: Construct a foreground and background feature fusion module, perform difference on the feature maps from the above two steps, supplement detailed information, and obtain a pixel-level probability prediction map of the entire image through the segmentation head; Step 4: Connect the two modules from Step 1 and 2 in parallel and then connect them in series with the foreground and background feature fusion module from Step 3 to complete the neural network. Construct a loss function to train the neural network. Use the prediction results and pixel-level labels to calculate the loss and train the neural network parameters. Output: The trained neural network processes the infrared image; after sufficient iterative training of the attention-guided hybrid bi-branch spatial decomposition neural network using the training data, the trained neural network is used to detect target pixels.

2. The infrared weak target detection method using an attention-guided hybrid dual-branch spatial decomposition neural network according to claim 1, characterized in that: In step one, the neural network first uses a convolutional unit to extract shallow features. This convolutional unit consists of a convolutional layer, a batch normalization layer, and... The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... With an expansion factor of 1, a stride of 1, and one layer of padding on each edge of the image, a shallow feature layer with 16 channels is generated. .

3. The infrared weak target detection method using an attention-guided hybrid dual-branch spatial decomposition neural network according to claim 2, characterized in that: In step one, the neural network constructs three learnable Gaussian convolutional units with different expansion coefficients. , , Feature extraction is performed via concatenation, with each learnable Gaussian convolutional unit operating in parallel via three branches; the first learnable Gaussian convolutional unit... The first branch road Consists of a convolutional layer, a batch normalization layer, The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... With an expansion factor of 1, a stride of 1, and one layer of padding on each side of the image, a feature with 16 channels is generated. The second branch road Consists of a convolutional layer, a batch normalization layer, The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... With an expansion factor of 1, a step size of 1, and no padding on the edges of the image, a feature with 16 channels is generated. ,and To achieve residual connections; based on the statistical characteristics that weak targets exhibit a two-dimensional isotropic Gaussian distribution in images, using a Gaussian-distributed convolution kernel can extract richer target features, therefore the third branch... It consists of a learnable Gaussian convolutional layer, a batch normalization layer, The activation function is composed of a combination of operations, which can learn the kernel size in a Gaussian convolutional layer. With an expansion factor of 1, a stride of 1, and one layer of padding on each side of the image, a feature with 16 channels is generated. In a learnable Gaussian convolutional layer, the standard deviation of a two-dimensional Gaussian distribution is set as a learnable parameter of the neural network.

4. The infrared weak target detection method using an attention-guided hybrid dual-branch spatial decomposition neural network according to claim 3, characterized in that: In step one, to ensure that the standard deviation remains positive throughout the parameter update process in the neural network, the parameters are first initialized in the neural network. Set it to 0, and express the parameter in exponential form. As the standard deviation of a two-dimensional Gaussian distribution ,use In the process of generating a two-dimensional Gaussian convolution kernel, firstly according to the formula A one-dimensional Gaussian distribution vector is generated, and then a two-dimensional Gaussian convolution kernel is generated using the outer product of two one-dimensional vectors; the feature maps of the three branches are obtained, and then summed and processed. Activation function operation yields ; The second learnable Gaussian convolution unit The first branch road Consists of a convolutional layer, a batch normalization layer, The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... With an expansion factor of 2, a stride of 1, and two layers of padding on each side of the image, a feature with 16 channels is generated. The second branch road Consists of a convolutional layer, a batch normalization layer, The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... With an expansion factor of 1, a step size of 1, and no padding on the edges of the image, a feature with 16 channels is generated. ,and Implement residual connections; third branch It consists of a learnable Gaussian convolutional layer, a batch normalization layer, The activation function is composed of a combination of operations, which can learn the kernel size in a Gaussian convolutional layer. With an expansion factor of 2, a stride of 1, and two layers of padding on each side of the image, a feature with 16 channels is generated. It can learn the generation process of Gaussian convolutional layers and Consistent; after obtaining the feature maps of the three branches, they are added together and then... Activation function operation yields ; The third learnable Gaussian convolution unit The first branch road Consists of a convolutional layer, a batch normalization layer, The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... With an expansion factor of 3, a stride of 1, and 3 layers of padding on each side of the image, a feature with 16 channels is generated. The second branch road Consists of a convolutional layer, a batch normalization layer, The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... With an expansion factor of 1, a step size of 1, and no padding on the edges of the image, a feature with 16 channels is generated. ,and Implement residual connections; third branch It consists of a learnable Gaussian convolutional layer, a batch normalization layer, The activation function is composed of a combination of operations, which can learn the kernel size in a Gaussian convolutional layer. With an expansion factor of 3, a stride of 1, and 3 layers of padding on each side of the image, a feature with 16 channels is generated. It can learn the generation process of Gaussian convolutional layers and Consistent; after obtaining the feature maps of the three branches, they are added together and then... Activation function operation yields Next, , and The summation yields a feature map with 16 channels. .

5. The infrared weak target detection method using an attention-guided hybrid dual-branch spatial decomposition neural network according to claim 4, characterized in that: In step one, the neural network adaptively selects the receptive field for multi-scale input information; and processes the feature map. Global average pooling is performed along the channel dimension to obtain the feature map. Using fully connected units right Perform the operation to generate a feature map with 32 channels. This fully connected unit consists of a convolutional layer, a batch normalization layer, and The convolutional layer is composed of a combination of activation function operations, and the kernel size in the convolutional layer is... The expansion factor is 1, the stride is 1, and the edges of the image are not padded; then a fully connected unit is used. For feature maps Perform the operation to generate a receptive field selection weighted feature map with 48 channels. The channel dimension is split into two dimensions: the number of branches and the output channels, and then... Activation function operations yield feature maps The number of branches is 3, and the number of output channels is 16; then... Divide into 3 parts according to the number of branches. , , The above three feature maps are respectively compared with , , Multiplication yields a feature map after adaptive selection of receptive field size. .

6. The infrared weak target detection method according to claim 5, characterized in that: In step one, the feature map is processed. conduct The activation function operation involves global max pooling in the spatial dimension, followed by a one-dimensional convolutional layer with a kernel of 3, a spread factor of 1, a stride of 1, and no padding on the edges of the image. The feature map obtained after the one-dimensional convolution operation is then processed again. Activation function operation and Multiplication yields the enhanced feature map of the target. .

7. The infrared weak target detection method according to claim 6, characterized in that: In step two, a convolutional layer, a batch normalization layer, and... Convolutional units, composed of activation function operations, process the original image input into the neural network. To perform the operation, the kernel size in the convolutional layer is... With an expansion factor of 1, a step size of 1, and no padding on the edges of the image, a feature with 16 channels is generated. Secondly, regarding features Divide into blocks separately, where for features Use a convolution kernel size of The convolutional layer with a scaling factor of 1, a stride of 8, and no padding on any side of the image generates 16 channels and a block size of [missing information]. The image patch is obtained by merging its height and width dimensions and then applying layer normalization. For features Directly reshape to block size The image block is processed by replacing the 1% of pixels with the highest grayscale value in each channel of the image block with the average value of the remaining pixels to overwhelm weak targets. The image block is then linearly projected onto 16 channels and layer normalized simultaneously to obtain the final image block. ; Then, a learnable embedding vector is set. respectively with , The image is then stitched into the 0th dimension of the original image patch, and the stitched image patch is added to the set learnable location code. This is followed by a process where each neuron has a 0.1 probability of inactivation. Layer processing yields image patches after target enhancement and image patches after target flooding ;Will , These two image patches are input into a single-head cross-attention layer. Linear projection yields Matrix, pair Linear projection yields , Matrix, through formula get Each neuron has a 0.1 probability of inactivation. After layer processing and Add and obtain by layer normalization After that After processing by a multilayer perceptron unit, which consists of a linear projection layer mapped to 1024 dimensions, Activation function, 0.1 probability of inactivation A layer, a linear projection layer mapped to 16 dimensions, and a 0.1 probability of inactivation. The layers are connected in series sequentially, and the processed result is the same as... Add them together and then normalize them to get the result. Then Backprojection and restoration of feature maps of image patches to their original size .

8. The infrared weak target detection method according to claim 7, characterized in that: In step three, the feature map is processed. and Perform a difference operation; then apply a Gaussian-weighted deformable convolution unit to the differenced result, starting with a convolution kernel of size [size missing]. A convolutional layer with a scaling factor of 1, a stride of 1, and one padding layer on each side of the image generates a pixel offset feature map with 18 channels. Secondly, a learnable Gaussian convolutional layer, a batch normalization layer, and... Learnable Gaussian convolutional units, composed of a combination of activation function operations, generate pixel weight mask feature maps with 9 channels. The kernel size in a learnable Gaussian convolutional layer is... The expansion coefficient is 1, the stride is 1, and each side of the image is padded with 1 layer; then a convolutional kernel with a size of 1 is used. A convolutional layer with a spread factor of 1, a stride of 1, and one padding layer on each side of the image generates a convolutional kernel weight with 32 channels. .

9. The infrared weak target detection method according to claim 8, characterized in that: In step three, the neural network supplements detailed information, and the segmentation head obtains a pixel-level probability prediction map of the entire image; first, a convolutional layer, a batch normalization layer, and... Residual convolutional units composed of activation function operations The operation generates a feature map with 32 channels. The kernel size in the convolutional layer is The expansion factor is 1, the step size is 1, and the edges of the image are not filled; secondly, the expansion factor is 1, the step size is 1, and the edges of the image are not filled. and Add and pass Activation function operations yield feature maps Finally, the feature map is input into the fully convolutional neural network segmentation head to obtain a pixel-level probability prediction map for the entire image. .

10. The infrared weak target detection method according to claim 1, characterized in that: In step four, the crossover ratio loss is defined: ,in, For the predicted target area, This represents the actual area of ​​the target region. For set intersection operation, For set union operations; the infrared image is input into a convolutional neural network to obtain a probability prediction map, which is then multiplied pixel-by-pixel with the labeled ground truth map to obtain the overlap result between the predicted target region and the ground truth target region. Based on this, the number of pixels in the real target region, the predicted target region, and the overlapping region of the two are summed to calculate the smooth cross-union ratio loss.