Infrared small target detection method and system, electronic equipment and medium
By adopting a hybrid attention dual-channel feature extraction network model in infrared small object detection, combined with a convolutional attention fusion module and feature compression extraction module, the problems of inaccurate and low efficiency of infrared small object detection in the prior art are solved, and a higher detection accuracy and lower false alarm rate are achieved.
Patent Information
- Application Number
- CN202411927854.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing infrared small-object detection methods are not ideal when dealing with challenging situations, including small target size, lack of texture or shape, as well as clutter and noise in the background, and the target brightness is lower than the background brightness, resulting in inaccurate detection and low efficiency.
A hybrid attention dual-channel feature extraction network model based on encoder and decoder structure is adopted. Through the first and second channels distributed in parallel, the convolutional attention fusion module and feature compression extraction module are combined with the global context information of the infrared small target and the target edge detail information, and feature fusion is performed through the multi-level feature fusion upsampling module to finally output the predicted image.
It effectively improves the accuracy of infrared small target detection, can accurately identify small infrared targets in complex backgrounds, reduce false alarms, and improve detection efficiency.
Smart Images

Figure CN119741480A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, 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. Different from general target detection, the target size in the infrared image is very small due to the long infrared imaging distance. In addition, the energy of infrared radiation will obviously attenuate with the increase of distance, and the target can be easily submerged in the complex and changing background. These interference factors will greatly affect the detection results of infrared small targets, resulting in poor performance of existing infrared small target detection methods. Therefore, how to enhance the inherent characteristics of infrared small targets while suppressing background noise to achieve accurate and robust infrared small target detection is still a research hotspot in the field of infrared image processing.
[0003] Existing infrared small target detection methods can be divided into two categories: model-driven methods and data-driven methods. Most traditional infrared small target detection methods are 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 features such as texture or shape, and the presence of clutter and noise in the background, and the target brightness is lower than the background brightness. In addition, in the ever-changing complex background scenes, they can easily fail to detect small infrared targets and cannot retain target information well, so they are prone to a large number of false alarms and have 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, methods based on convolutional neural networks can learn the features of infrared small targets in a data-driven manner. Therefore, the research on infrared small targets has gradually shifted from model-driven to data-driven. Because in existing deep learning methods, feature learning mainly relies on convolutional neural networks (CNNs). However, the convolution operation only focuses on the feature information of itself and its boundaries, lacks the fusion of large-scale features, and therefore has limited performance in target detection and recognition. The locality of CNN weakens its ability to capture large-scale dependencies, which can easily lead to reduced efficiency in target detection and recognition. In order to obtain accurate detection results, the network needs to accurately distinguish whether the pixels in the image correspond to the background or the target. Due to the low signal-to-noise ratio of infrared images, background clutter can easily be mistaken for targets. Learning the long-range dependencies between targets and backgrounds in infrared images is crucial to prevent the network model from misjudging 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 the infrared small target image and its real label image and preprocess them to obtain the preprocessed data set, and divide the preprocessed data set into a training set and a test set;
[0008] S2. Construct 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, outputs the first feature map and the second feature map respectively, and then fuses the first feature map and the second feature map through the 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 to be spliced with the third feature map of the same level to obtain a spliced feature map, and finally outputs a predicted image;
[0012] S3, taking the difference between the pixel value of the predicted image and the pixel value of the real label image as the loss function, training and optimizing 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, and 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 the first feature map and the second feature map are output respectively. The specific operation is as follows:
[0019] S211, the features of the first channel are input to the first module, and F is obtained through a convolution layer with a convolution kernel size of 3×3, a BN layer and an activation function ReLU. conv , and 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 F out , F out After passing through a convolution layer with a convolution kernel size of 1×1 and a 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, that 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 deep convolution layer, then normalized by layer normalization LN, and then calculated by point-by-point convolution and activation function GELU to obtain the intermediate feature I 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 feature. 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, and 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 to be 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 on the feature map M j Upsample, j∈1,2,3,4, so that it is consistent with the third feature map X i Have the same size, i∈1,2,3,4; then use the splicing operation to splice, and then pass the convolutional attention hybrid module to obtain enhanced features. 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 It 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] A preprocessing module is used to obtain infrared small target images and their real label images and perform preprocessing to obtain a 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 construct 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 use the difference between the pixel value of the predicted image and the pixel value of the real label image as the loss function to optimize the network model parameters and 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, used 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 feature information of the target, 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 an infrared small target detection method of the present invention;
[0048] Figure 2 A schematic diagram of the structure of a 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 It is a structural schematic diagram 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 through the accompanying drawings and embodiments.
[0053] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0054] Embodiment 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 the infrared small target image and its real label image and preprocess them to obtain the preprocessed data set, and divide the preprocessed data set into a training set and a test set;
[0057] S2, such as Figure 2 As shown, 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 a first channel, a second channel, a feature fusion module, and a 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, and 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, outputs the first feature map and the second feature map respectively, and then fuses the first feature map and the second feature map through the feature fusion module to obtain a fused feature map;
[0064] S211, such as Figure 3 As shown in the figure, 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 , and 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 F out , F out After passing through a convolution layer with a convolution kernel size of 1×1 and a 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, that 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 in Figure 2, 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 calculated by point-by-point convolution and activation function GELU to obtain the intermediate feature I 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 feature. 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 to be 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 on the feature map M j Upsample, j∈1,2,3,4, so that it is consistent with the third feature map X i Have the same size, i∈1,2,3,4; then use the splicing operation to splice, and then pass the convolutional attention hybrid module to obtain enhanced features. 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 It is the feature map output by the i-th layer convolutional attention mixing module.
[0079] S3, taking the difference between the pixel value of the predicted image and the pixel value of the real label image as the loss function, training and optimizing 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-range 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 attention to difficult samples, and s is a smooth adjustable factor. Focal and FocalIoU represent Focal loss and FocalIoU loss respectively. SoftIoU is a convergent IoU with a smooth 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 usually 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 the positioning ability. For pixel-level metrics, intersection and union (IoU) are used to evaluate the shape description ability. 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 target pixels that are falsely detected. 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 ability of the algorithm. IoU is obtained by detecting the ratio of 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 effect 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. The 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] Embodiment 2
[0096] An infrared small target detection system, comprising:
[0097] A preprocessing module is used to obtain infrared small target images and their real label images and perform preprocessing to obtain a 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 construct 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 use the difference between the pixel value of the predicted image and the pixel value of the real label image as the loss function to optimize the network model parameters and 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, used 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, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0107] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0108] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a 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, if necessary, processing in another suitable manner, 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 device 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 solution of the present invention rather than to limit it. 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 solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for detecting small infrared targets, characterized in that: The following steps are involved: S1, obtain the infrared small target image and its real label image and preprocess them to obtain the preprocessed data set, and divide the preprocessed data set into a training set and a test set; S2. Construct 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, outputs the first feature map and the second feature map respectively, and then fuses the first feature map and the second feature map through the 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 to be spliced with the third feature map of the same level to obtain a spliced feature map, and finally outputs a predicted image; S3, taking the difference between the pixel value of the predicted image and the pixel value of the real label image as the loss function, training and optimizing the network model parameters to obtain the optimal model; S4. Use the optimal model to predict the test set and obtain the prediction results.
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; 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. The second channel includes a fifth module, a sixth module, a seventh module, and an eighth module connected in sequence, and 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 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 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 , and 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 F out , F out After passing through a convolution layer with a convolution kernel size of 1×1 and a 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, that is, the first feature map. The specific calculation process is shown in formula (1): 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; S212, input the result output by the previous module into the next module in sequence, until the fourth module outputs the result Z4; 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 calculated by point-by-point convolution and activation function GELU to obtain the intermediate feature I 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 feature. The feature map Y1 is then downsampled to obtain the output result U1. The specific calculation process is shown in formula (2): 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; 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.
4. The infrared small target detection method according to claim 3, 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 operation is as follows: M = Concat(Z4+U4)(3); Among them, M represents the fused feature map; Concat represents the concatenation operation.
5. The infrared small target detection method according to claim 4, characterized in that: In step S23, the fused feature map enters the multi-level feature fusion upsampling module to be spliced with the third feature map of the same level to obtain a spliced feature map. The specific operation is as follows: The multi-level feature fusion upsampling module performs the fusion on the feature map M j Upsample, j∈1,2,3,4, so that it is consistent with the third feature map X i Have the same size, i∈1,2,3,4; then use the splicing operation to splice, and then pass the convolutional attention hybrid module to obtain enhanced features. The specific process is shown in formula (4): M j-1 =Conv{Concat[X i ,Up(M j )]} (4); 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 It is the feature map output by the i-th layer convolutional attention mixing module.
6. An infrared small target detection system, characterized in that: include: A preprocessing module is used to obtain infrared small target images and their real label images and perform preprocessing to obtain a preprocessed data set, and divide the preprocessed data set into a training set and a test set; The feature extraction module is used to construct 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 use the difference between the pixel value of the predicted image and the pixel value of the real label image as the loss function to optimize the network model parameters and obtain the optimal model; The prediction module is used to use the optimal model to predict the test set and obtain the prediction results.
7. The infrared small target detection system according to claim 6, 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, used 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.
8. 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 5 when executing the computer program.
9. 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 described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Infrared small target detection method based on attention-oriented pyramid fusion
CN116071676A
Infrared small target identification method based on distraction mining network
CN117934814A
Detection method using fusion network based on attention mechanism, and terminal device
US11222217B1
Drone detection method and system based on infrared polarization
US20240378857A1