Infrared small target detection method, system, electronic equipment and medium
By constructing a hybrid attention dual-channel feature extraction network model and combining the feature extraction of global and edge information, the false alarm problem in infrared small target detection is solved and the detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411927854.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing infrared small target detection methods are prone to false positives in complex backgrounds, and convolutional neural networks lack the ability to fuse large-scale features, resulting in low detection efficiency.
A hybrid attention dual-channel feature extraction network model based on the encoder and decoder structure is constructed. The global context information is captured through the first channel, and the target edge details are extracted through the second channel. Feature extraction is enhanced through the feature fusion module and the multi-level feature fusion upsampling module, and the model is optimized using the FocalIoU loss function.
The accuracy of infrared small target detection is improved, the false alarm rate is reduced, and the detection performance in complex backgrounds is enhanced.
Smart Images

Figure CN119741480B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of target detection technology, and in particular to a method, system, electronic equipment and medium for detecting small infrared targets. Background Art
[0002] Infrared small target detection technology is widely used in infrared guidance, target tracking, security monitoring, and other fields. Unlike general target detection, infrared imaging requires long range, resulting in very small targets in infrared images. Furthermore, the energy of infrared radiation significantly attenuates with increasing distance, making the target easily lost in complex and changing backgrounds. These interfering factors significantly affect the detection of small infrared targets, resulting in poor performance of existing infrared small target detection methods. Therefore, how to enhance the inherent characteristics of small infrared targets while suppressing background noise to achieve accurate and robust infrared small target detection remains a research hotspot in infrared image processing.
[0003] Existing methods for infrared small target detection can be divided into two categories: model-driven methods and data-driven methods. Traditional infrared small target detection methods are mostly based on model-driven methods, mainly including filtering-based methods, low-rank-based methods, and local contrast-based methods. However, in most cases, these methods are not ideal when dealing with challenging situations, including small target size, lack of texture or shape features, background clutter and noise, and target brightness lower than background brightness. In addition, in rapidly changing complex background scenes, they can easily fail to detect small infrared targets and cannot well preserve target information, resulting in a large number of false positives and low efficiency.
[0004] With the rapid development of deep learning, the performance of infrared small target detection methods based on convolutional neural networks (CNNs) is gradually improving. Unlike traditional methods, CNN-based methods can learn the features of small infrared targets in a data-driven manner. As a result, research on small infrared targets is gradually shifting from a model-driven to a data-driven approach. This is because existing deep learning methods primarily rely on convolutional neural networks (CNNs) for feature learning. However, the convolution operation only focuses on the feature information of the image itself and its boundaries, lacking the fusion of large-scale features, resulting in limited performance in target detection and recognition. The local nature of CNNs weakens their ability to capture large-scale dependencies, which can easily lead to reduced target detection and recognition efficiency. To achieve accurate detection results, the network must accurately distinguish whether pixels in the image correspond to background or target. Due to the low signal-to-noise ratio of infrared images, background clutter can easily be mistaken for target. Learning long-range dependencies between target and background in infrared images is crucial to prevent network models from misclassifying background pixels as target pixels and reducing false positives. Summary of the Invention
[0005] The purpose of the present invention is to provide an infrared small target detection method, system, electronic equipment and medium, which can effectively improve the detection performance of infrared small targets.
[0006] To achieve the above object, the present invention provides a method for detecting small infrared targets, comprising the following steps:
[0007] S1. Obtain an infrared small target image and its true label image and preprocess them to obtain a preprocessed dataset, which is then divided into a training set and a test set.
[0008] S2. Build a hybrid attention dual-channel feature extraction network model based on the encoder and decoder structure, and input the preprocessed images in the training set into the hybrid attention dual-channel feature extraction network model;
[0009] S21, the preprocessed image passes through the first channel and the second channel at the same time, outputting a first feature map and a second feature map respectively, and then fusing the first feature map and the second feature map through a feature fusion module to obtain a fused feature map;
[0010] S22, the convolutional attention fusion module in the first channel also outputs a third feature map;
[0011] S23, the fused feature map enters the multi-level feature fusion upsampling module and is spliced with the third feature map of the same level to obtain a spliced feature map, and finally outputs a predicted image;
[0012] S3. The difference between the pixel values of the predicted image and the pixel values of the true label image is used as the loss function to train and optimize the network model parameters to obtain the optimal model;
[0013] S4. Use the optimal model to predict the test set and obtain the prediction results.
[0014] Preferably, in step S2, the hybrid attention dual-channel feature extraction network model includes a first channel, a second channel, a feature fusion module and a multi-level feature fusion upsampling module;
[0015] The first channel includes a first module, a second module, a third module, and a fourth module connected in sequence. The first module, the second module, the third module, and the fourth module have the same structure and all include a convolutional attention fusion module and a maximum pooling layer connected in sequence.
[0016] The second channel includes a fifth module, a sixth module, a seventh module, and an eighth module connected in sequence. The fifth module, the sixth module, the seventh module, and the eighth module have the same structure and all include a feature compression extraction module and a downsampling layer connected in sequence.
[0017] The multi-level feature fusion upsampling module is set to four layers.
[0018] Preferably, in step S21, the preprocessed image passes through the first channel and the second channel at the same time, and outputs the first feature map and the second feature map respectively. The specific operation is as follows:
[0019] S211, the features of the first channel are input to the first module, and then pass through a convolution layer with a convolution kernel size of 3×3, a BN layer and an activation function ReLU to obtain F conv , then pass through a convolution layer with a convolution kernel size of 3×3, a BN layer, and then input the hybrid attention module to obtain F out , F out After passing through the convolution layer with a convolution kernel size of 1×1 and the BN layer, the result is then passed through the activation function ReLU to obtain the third feature map, and then passed through the maximum pooling layer to output the result Z1, which is the first feature map. The specific calculation process is shown in formula (1):
[0020]
[0021] Among them, F represents the input feature, and its feature size is C×H×W, where C represents the number of channels, H represents the height, and W represents the width; Conv 3×3 Represents a convolution layer with a convolution kernel size of 3×3; Conv 1×1 Indicates a convolution layer with a convolution kernel size of 1×1; BN indicates a batch normalization layer; Maxpool indicates a maximum pooling layer; HAM indicates a hybrid attention module; X1 indicates the third feature map output by the first module;
[0022] S212, input the result output by the previous module into the next module in sequence, until the fourth module outputs the result Z4;
[0023] S213, the features of the second channel are input to the fifth module, first calculated by a 7×7 depth convolution layer, then normalized by layer normalization LN, and then the intermediate features I are calculated by point-by-point convolution and activation function GELU. dw , intermediate feature I dw After passing through the point-by-point convolution layer, Layerscale and Droppath processing are applied, and the feature map Y1 is obtained by summing it with the input features. The feature map Y1 is then downsampled to obtain the output result U1. The specific calculation process is shown in formula (2):
[0024]
[0025] Among them, DW represents the depth convolution layer with a convolution kernel size of 7×7; PW represents point-by-point convolution with a convolution kernel size of 1×1; Downsample represents downsampling;
[0026] S214 , input the result output by the previous module into the next module in sequence, until the eighth module outputs the result U4 , that is, the second feature map.
[0027] Preferably, in step S21, the first feature map and the second feature map are fused by a feature fusion module to obtain a fused feature map. The specific operation is as follows:
[0028] M = Concat(Z4+U4)(3);
[0029] Among them, M represents the fused feature map; Concat represents the concatenation operation.
[0030] Preferably, in step S23, the fused feature map enters the multi-level feature fusion upsampling module and is spliced with the third feature map of the same level to obtain a spliced feature map. The specific operation is as follows:
[0031] The multi-level feature fusion upsampling module performs the fusion of the feature map M j Upsampling, j∈1,2,3,4, so that it is consistent with the third feature map X i They have the same size, i∈1,2,3,4; then they are spliced using the splicing operation, and then the enhanced features are obtained through the convolutional attention mixing module. The specific process is shown in formula (4):
[0032] M j-1 =Conv{Concat[X i ,Up(M j )]} (4);
[0033] Among them, Up means upsampling; Concat means concatenation; Conv means convolutional attention hybrid module; M j-1 is the feature map output after the j-th layer multi-level feature fusion upsampling module; X i is the feature map output by the i-th layer convolutional attention mixing module.
[0034] The present invention also provides an infrared small target detection system, comprising:
[0035] The preprocessing module is used to obtain the infrared small target image and its real label image and perform preprocessing to obtain the preprocessed data set, and divide the preprocessed data set into a training set and a test set;
[0036] The feature extraction module is used to build a hybrid attention dual-channel feature extraction network model based on the encoder and decoder structure, and input the preprocessed images in the training set into the hybrid attention dual-channel feature extraction network model;
[0037] A multi-level feature fusion upsampling module is used to upsample the fused feature map and concatenate it with the third feature map to obtain a concatenated feature map;
[0038] The loss function optimization module is used to optimize the network model parameters by taking the difference between the pixel values of the predicted image and the pixel values of the true label image as the loss function to obtain the optimal model;
[0039] The prediction module is used to use the optimal model to predict the test set and obtain the prediction results.
[0040] Preferably, the feature extraction module includes a first channel unit, a second channel unit, and a feature fusion unit;
[0041] A first channel unit, configured to capture global information and output a first feature map;
[0042] The second channel unit is used to extract target edge details and output a second feature map;
[0043] The feature fusion unit is used to fuse the first feature map and the second feature map to obtain a fused feature map.
[0044] The present invention also provides a computer device, comprising: a memory and a processor; the memory stores a computer program, and the processor implements the steps of the above-mentioned infrared small target detection method when executing the computer program.
[0045] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned infrared small target detection method are implemented.
[0046] Therefore, the present invention adopts the above-mentioned infrared small target detection method, system, electronic device and medium, and has beneficial technical effects: the hybrid attention dual-channel feature extraction network model constructed by the present invention includes a first channel and a second channel distributed in parallel. In the process of training the model and obtaining the infrared small target detection results, the hybrid attention module in the first channel can capture the global context prior information of the infrared small target image to extract the target's feature information, which is helpful to accurately locate the target. The feature compression extraction module in the second channel can obtain target edge information at different levels, which is helpful to retain target details. Experimental results show that the present invention can effectively improve the accuracy of infrared small target detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of a method for detecting small infrared targets according to the present invention;
[0048] Figure 2 This is a schematic diagram of the structure of the hybrid attention dual-channel feature extraction network model constructed by the present invention;
[0049] Figure 3 Schematic diagram of the structure of the convolutional attention fusion module of an embodiment of the present invention;
[0050] Figure 4 Schematic diagram of the structure of a feature compression extraction module according to an embodiment of the present invention;
[0051] Figure 5 Schematic diagram of the structure of a multi-level feature fusion upsampling module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.
[0053] Unless otherwise defined, technical or scientific terms used in the present invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.
[0054] Example 1
[0055] like Figure 1 FIG. 1 is a flow chart of a method for detecting small infrared targets according to the present invention, which specifically includes the following steps:
[0056] S1. Obtain an infrared small target image and its true label image and preprocess them to obtain a preprocessed dataset, which is then divided into a training set and a test set.
[0057] S2, such as Figure 2 As shown in FIG, a hybrid attention dual-channel feature extraction network model based on an encoder and decoder structure is constructed, and the preprocessed images in the training set are input into the hybrid attention dual-channel feature extraction network model.
[0058] The hybrid attention dual-channel feature extraction network model includes the first channel, the second channel, the feature fusion module and the multi-level feature fusion upsampling module;
[0059] The first channel includes a first module, a second module, a third module, and a fourth module connected in sequence. The first module, the second module, the third module, and the fourth module have the same structure and all include a convolutional attention fusion module and a maximum pooling layer connected in sequence.
[0060] The second channel includes a fifth module, a sixth module, a seventh module, and an eighth module connected in sequence. The fifth module, the sixth module, the seventh module, and the eighth module have the same structure and all include a feature compression extraction module and a downsampling layer connected in sequence.
[0061] The multi-level feature fusion upsampling module is set to four layers.
[0062] The specific steps are as follows:
[0063] S21, the preprocessed image passes through the first channel and the second channel at the same time, outputting a first feature map and a second feature map respectively, and then fusing the first feature map and the second feature map through a feature fusion module to obtain a fused feature map;
[0064] S211, such as Figure 3 As shown, the features of the first channel are input to the first module, and then pass through a convolution layer with a convolution kernel size of 3×3, a BN layer and an activation function ReLU to obtain F conv , then pass through a convolution layer with a convolution kernel size of 3×3, a BN layer, and then input the hybrid attention module to obtain F out , F out After passing through the convolution layer with a convolution kernel size of 1×1 and the BN layer, the result is then passed through the activation function ReLU to obtain the third feature map, and then passed through the maximum pooling layer to output the result Z1, which is the first feature map. The specific calculation process is shown in formula (1):
[0065]
[0066] Among them, F represents the input feature, and its feature size is C×H×W, where C represents the number of channels, H represents the height, and W represents the width; Conv 3×3 Represents a convolution layer with a convolution kernel size of 3×3; Conv 1×1 Indicates a convolution layer with a convolution kernel size of 1×1; BN indicates a batch normalization layer; Maxpool indicates a maximum pooling layer; HAM indicates a hybrid attention module; X1 indicates the third feature map output by the first module;
[0067] S212, input the result output by the previous module into the next module in sequence, until the fourth module outputs the result Z4;
[0068] S213, such as Figure 4 As shown, the features of the second channel are input to the fifth module, first calculated through a 7×7 depth convolution layer, then normalized by layer normalization LN, and then the intermediate features I are calculated by point-by-point convolution and activation function GELU. dw , intermediate feature I dw After passing through the point-by-point convolution layer, Layerscale and Droppath processing are applied, and the feature map Y1 is obtained by summing it with the input features. The feature map Y1 is then downsampled to obtain the output result U1. The specific calculation process is shown in formula (2):
[0069]
[0070] Among them, DW represents the depth convolution layer with a convolution kernel size of 7×7; PW represents point-by-point convolution with a convolution kernel size of 1×1; Downsample represents downsampling;
[0071] S214 , input the result output by the previous module into the next module in sequence, until the eighth module outputs the result U4 , that is, the second feature map.
[0072] M = Concat(Z4+U4)(3);
[0073] Among them, M represents the fused feature map; Concat represents the concatenation operation.
[0074] S22, the convolutional attention fusion module in the first channel also outputs a third feature map;
[0075] S23, such as Figure 5 As shown, the fused feature map enters the multi-level feature fusion upsampling module and is spliced with the third feature map of the same level to obtain the spliced feature map, and finally outputs the predicted image. The specific operations are as follows:
[0076] The multi-level feature fusion upsampling module performs the fusion of the feature map M j Upsampling, j∈1,2,3,4, so that it is consistent with the third feature map X i They have the same size, i∈1,2,3,4; then they are spliced using the splicing operation, and then the enhanced features are obtained through the convolutional attention mixing module. The specific process is shown in formula (4):
[0077] M j-1 =Conv{Concat[X i ,Up(M j )]} (4);
[0078] Among them, Up means upsampling; Concat means concatenation; Conv means convolutional attention hybrid module; M j-1 is the feature map output after the j-th layer multi-level feature fusion upsampling module; X i is the feature map output by the i-th layer convolutional attention mixing module.
[0079] S3. The difference between the pixel values of the predicted image and the pixel values of the true label image is used as the loss function to train and optimize the network model parameters to obtain the optimal model;
[0080] The loss function uses FocalIoU Loss as the main loss function. FocalIoU Loss combines the advantages of Focal Loss and SoftIoU Loss to reduce the response of the background area and enhance the focus of small-scale targets. The calculation formula of the FocalIoU loss function is:
[0081]
[0082] Where p represents the probability of each pixel, y represents the label of each pixel in the probability map P, γ is an adjustable factor used to control the focus on difficult samples, and s is a smoothing adjustable factor. Focal and FocalIoU represent Focal loss and FocalIoU loss, respectively. SoftIoU is a convergent IoU with a smoothing adjustable factor to avoid infinity.
[0083] S4. Use the optimal model to predict the test set and obtain the prediction results.
[0084] Pixel-level metrics that focus on target shape evaluation are not suitable for small targets because infrared small targets often lack shape and texture. Instead, locating the entire target is the most important criterion for infrared small target detection. Therefore, PD and FA are used to evaluate localization capabilities. For pixel-level metrics, intersection over union (IoU) is used to evaluate shape description capabilities. They are defined as follows:
[0085] 1) Detection Probability: Detection Probability (PD) is an evaluation metric at the target level. It measures the number of correctly predicted targets P correct and the total number of targets P all The PD is defined as follows:
[0086]
[0087] 2) False Alarm Rate: False Alarm Rate (FA) is another target-level evaluation metric that measures the number of falsely detected target pixels F. false and the total number of target pixels F all The ratio between . FA is defined as follows:
[0088]
[0089] 3) Intersection over Union: Intersection over Union (IoU) is a pixel-level evaluation metric. It evaluates the shape description capability of the algorithm. IoU is obtained by comparing the intersection and union of the target and the true value.
[0090]
[0091] Among them, TG Inter and TG Union They represent the intersection and union of the detected target and the true value respectively.
[0092] The technical effects of the present invention can be further illustrated by the following simulation experiments.
[0093] Simulation conditions and contents:
[0094] The experiments were performed using PyTorch 3.9 on an NVIDIA GTX 1660 GPU. The multi-task learning of the proposed method was performed through end-to-end training and optimized using stochastic gradient descent. Before training, the input images in the dataset were subjected to random image flipping, blurring, and cropping in sequence to enhance the data. These images were then resized to a resolution of 256×256, and all input images were normalized. Finally, they were input into the network. During training, FocalIoU was used as the loss function and Adagrad was used as the optimizer to train the network. The batch size, initial learning rate, and weight decay were set to 4, 0.05, and 1×10, respectively. -4 Experiments were conducted on the NUDT-SIRST, IRSTD-1k, and NUAA-SIRST datasets. NUDT-SIRST contains 427 infrared images, NUAA-SIRST contains 427 infrared images, and IRSTD-1k contains 1000 infrared images. For each dataset, it is divided into a training set and a test set in a 1:1 ratio.
[0095] Example 2
[0096] An infrared small target detection system, comprising:
[0097] The preprocessing module is used to obtain the infrared small target image and its real label image and perform preprocessing to obtain the preprocessed data set, and divide the preprocessed data set into a training set and a test set;
[0098] The feature extraction module is used to build a hybrid attention dual-channel feature extraction network model based on the encoder and decoder structure, and input the preprocessed images in the training set into the hybrid attention dual-channel feature extraction network model;
[0099] A multi-level feature fusion upsampling module is used to upsample the fused feature map and concatenate it with the third feature map to obtain a concatenated feature map;
[0100] The loss function optimization module is used to optimize the network model parameters by taking the difference between the pixel values of the predicted image and the pixel values of the true label image as the loss function to obtain the optimal model;
[0101] The prediction module is used to use the optimal model to predict the test set and obtain the prediction results.
[0102] The feature extraction module includes a first channel unit, a second channel unit, and a feature fusion unit;
[0103] A first channel unit, configured to capture global information and output a first feature map;
[0104] The second channel unit is used to extract target edge details and output a second feature map;
[0105] The feature fusion unit is used to fuse the first feature map and the second feature map to obtain a fused feature map.
[0106] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0107] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0108] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0109] It is worth noting that the contents not elaborated in detail in the present invention are all prior art and are well known to those skilled in the art.
[0110] Therefore, the present invention adopts the above-mentioned infrared small target detection method, system, electronic equipment and medium to effectively improve the detection performance of infrared small targets.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for detecting small infrared targets, characterized in that: The following steps are involved: S1. Obtain an infrared small target image and its true label image and preprocess them to obtain a preprocessed dataset, which is then divided into a training set and a test set. S2. Build a hybrid attention dual-channel feature extraction network model based on the encoder and decoder structure, and input the preprocessed images in the training set into the hybrid attention dual-channel feature extraction network model; S21, the preprocessed image passes through the first channel and the second channel at the same time, outputting a first feature map and a second feature map respectively, and then fusing the first feature map and the second feature map through a feature fusion module to obtain a fused feature map; S22, the convolutional attention fusion module in the first channel also outputs a third feature map; S23, the fused feature map enters the multi-level feature fusion upsampling module and is spliced with the third feature map of the same level to obtain a spliced feature map, and finally outputs a predicted image; S3. The difference between the pixel values of the predicted image and the pixel values of the true label image is used as the loss function to train and optimize the network model parameters to obtain the optimal model; S4. Use the optimal model to predict the test set and obtain the prediction results; The first channel includes a first module, a second module, a third module, and a fourth module connected in sequence, and the second channel includes a fifth module, a sixth module, a seventh module, and an eighth module connected in sequence; In step S21, the preprocessed image passes through the first channel and the second channel at the same time, and outputs the first feature map and the second feature map respectively. The specific operation is as follows: S211, the features of the first channel are input to the first module, and are obtained through a convolution layer with a convolution kernel size of 3×3, a BN layer and an activation function ReLU. , then pass through a convolution layer with a convolution kernel size of 3×3, a BN layer, and then input into the hybrid attention module to obtain , After the convolution kernel size is 1×1, the BN layer, the result is then activated by the ReLU function to obtain the third feature map, and then the output result is obtained after the maximum pooling layer. , that is, the first feature map, the specific calculation process is shown in formula (1): (1); in, Represents the input feature, whose feature size is C×H×W, where C represents the number of channels, H represents the height, and W represents the width; Represents a convolution layer with a convolution kernel size of 3×3; Indicates that the convolution kernel size is 1×1 convolution layer; Represents the batch normalization layer; Maxpool represents the maximum pooling layer; represents the hybrid attention module; A third feature map representing the output of the first module; S212: Input the output of the previous module into the next module in sequence until the fourth module outputs the result. ; S213, the features of the second channel are input to the fifth module, first calculated by a 7×7 depth convolution layer, and then normalized by the layer Normalize, then pass point-by-point convolution and activation function GELU Calculate intermediate features , intermediate features Then pass through the point-by-point convolution layer and then apply Layerscale 、 Droppath Process and sum it with the input features to get the feature map , feature map Then downsample to get the output result , the specific calculation process is shown in formula (2): (2); in, Represents a depth convolution layer with a convolution kernel size of 7×7; Indicates point-by-point convolution, with a convolution kernel size of 1×1; represents downsampling; S214: Input the output of the previous module into the next module in sequence until the eighth module outputs the result. , which is the second feature map.
2. The infrared small target detection method according to claim 1, characterized in that: In step S2, the hybrid attention dual-channel feature extraction network model includes a first channel, a second channel, a feature fusion module and a multi-level feature fusion upsampling module; Among them, the first module, the second module, the third module, and the fourth module have the same structure, and all include a convolutional attention fusion module and a maximum pooling layer connected in sequence; The fifth module, the sixth module, the seventh module, and the eighth module have the same structure, and all include a feature compression extraction module and a downsampling layer connected in sequence; The multi-level feature fusion upsampling module is set to four layers.
3. The infrared small target detection method according to claim 2, characterized in that: In step S21, the first feature map and the second feature map are fused by a feature fusion module to obtain a fused feature map. The specific operations are as follows: (3); in, Represents the fused feature map; Represents a splicing operation.
4. The infrared small target detection method according to claim 3, characterized in that: In step S23, the fused feature map enters the multi-level feature fusion upsampling module and is spliced with the third feature map of the same level to obtain a spliced feature map. The specific operations are as follows: Multi-level feature fusion upsampling module for the fused feature map Upsampling, , so that it is consistent with the third feature map have the same size, ; Then use the splicing operation to splice, and then pass the convolution attention mixing module to obtain enhanced features. The specific process is shown in formula (4): (4); in, represents upsampling; Indicates splicing; represents the convolutional attention hybrid module; For the first The feature map output after the multi-level feature fusion upsampling module; For the first Feature maps output by the layer-wise convolutional attention mixture module.
5. An infrared small target detection system, characterized in that: Used to perform the infrared small target detection method according to any one of claims 1 to 4, comprising: The preprocessing module is used to obtain the infrared small target image and its real label image and perform preprocessing to obtain the preprocessed data set, and divide the preprocessed data set into a training set and a test set; The feature extraction module is used to build a hybrid attention dual-channel feature extraction network model based on the encoder and decoder structure, and input the preprocessed images in the training set into the hybrid attention dual-channel feature extraction network model; A multi-level feature fusion upsampling module is used to upsample the fused feature map and concatenate it with the third feature map to obtain a concatenated feature map; The loss function optimization module is used to optimize the network model parameters by taking the difference between the pixel values of the predicted image and the pixel values of the true label image as the loss function to obtain the optimal model; The prediction module is used to use the optimal model to predict the test set and obtain the prediction results.
6. The infrared small target detection system according to claim 5, characterized in that: The feature extraction module includes a first channel unit, a second channel unit, and a feature fusion unit; A first channel unit, configured to capture global information and output a first feature map; The second channel unit is used to extract target edge details and output a second feature map; The feature fusion unit is used to fuse the first feature map and the second feature map to obtain a fused feature map.
7. A computer device comprising: memory and processor; The memory stores a computer program, wherein the processor implements the steps of the infrared small target detection method according to any one of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the infrared small target detection method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Infrared small target identification method based on distraction mining network
CN117934814A
Detection method using fusion network based on attention mechanism, and terminal device
US11222217B1