Infrared image target detection method and system
Patent Information
- Application Number
- CN202610988703.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-08-07
AI Technical Summary
然而,现有深度学习模型在应对红外小目标检测时仍存在显著瓶颈:首先,网络感受野固定,难以同时有效捕获尺度变化范围大的目标;其次,在特征提取过程中,随着下采样进行,高层级特征虽语义信息丰富但空间细节丢失严重,而低层级特征虽细节保留完好但语义表征能力弱,不同层级特征间缺乏有效的信息互补与协同
本发明提出的红外图像目标检测方法,构建的神经网络模型,在编码部分,通过多尺度动态感知模块并行提取不同尺度的特征上下文,使网络具备了多尺度动态感知能力,能够自适应地捕捉不同尺寸的目标特征,有效避免了小目标在下采样过程中的信息丢失,显著提升了模型对尺度变化的鲁棒性。通过跨级别注意力增强模块提前将与当前层级相邻层级(浅、中、深)的特征进行对齐与拼接,并通过双注意力机制进行加权增强,使得在特征进入解码部分之前,能够实现深层语义与浅层细节的有效互补,大幅抑制了复杂背景杂波的干扰,显著增强了弱小目标的特征响应与显著性。在解码部分,通过拼接引入编码部分生成的对应层级的原始高分辨率细节特征,再利用多尺度动态感知模块对拼接后的丰富信息进行提纯与融合。这种先补充后提炼的机制,确保了在逐步恢复空间分辨率的同时,最大程度地保留了小目标的轮廓完整性和定位精度,使得模型在复杂背景、低信噪比条件下,能够精确锁定微小目标、大幅降低虚警率和漏检率、清晰还原目标轮廓,实现了高精度、高鲁棒性的红外小目标检测。
Smart Images

Figure CN122530199A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to an infrared image target detection method and system. Background Technology
[0002] Infrared imaging technology, with its all-weather operation, passive detection, and strong anti-jamming capabilities, plays an irreplaceable role in military reconnaissance, security monitoring, aerospace, and maritime rescue. Infrared small target detection aims to identify tiny targets that occupy only a very small number of pixels (e.g., 3×3 to 9×9 pixels) and lack shape and texture features from infrared images, making it a key technology for early warning and precision guidance. However, due to the long detection distance, the targets appear in images as point-like or patchy structures with low signal-to-noise ratios, small size, and weak contrast. Furthermore, the complex and variable background environment (such as clouds, waves, and building clutter) makes the detection task extremely challenging.
[0003] Existing infrared small target detection methods can be mainly divided into two categories: model-driven methods and data-driven methods. Model-driven methods are based on physical priors or statistical properties, such as maximum median filtering, top-hat transform, local contrast measurement, and low-rank sparse decomposition. These methods separate the target from the background by designing specific filters or constructing optimized models. Although they perform reasonably well in simple scenarios, their performance heavily relies on manually designed parameters and model assumptions. When faced with complex and dynamically changing backgrounds, they exhibit poor robustness and are prone to high false alarm and false negative rates.
[0004] With the development of artificial intelligence, data-driven methods based on deep learning, especially convolutional neural networks, have demonstrated powerful feature learning capabilities. A series of networks based on encoder-decoder structures such as U-Net have been proposed, extracting deep features of targets from massive amounts of data through end-to-end learning. However, existing deep learning models still face significant bottlenecks in dealing with infrared small target detection: First, the network's receptive field is fixed, making it difficult to effectively capture targets with a wide range of scale variations simultaneously; second, during feature extraction, as downsampling proceeds, high-level features, while rich in semantic information, suffer from severe loss of spatial details, while low-level features, while retaining good details, have weak semantic representation capabilities, resulting in a lack of effective information complementarity and synergy between different feature levels.
[0005] In summary, existing technologies have poor ability to represent the features of small targets and cannot accurately perceive small infrared targets. Summary of the Invention
[0006] To address the problems existing in the above-mentioned fields, this invention proposes an infrared image target detection method and system. The constructed neural network model can adaptively capture target features ranging from small to large, thereby effectively improving the model's robustness in detecting small infrared targets of different sizes.
[0007] To address the aforementioned technical problems, this invention discloses an infrared image target detection method, comprising the following steps: Acquire image data of the small infrared target to be tested; Infrared small target image data is input into a pre-trained neural network model for target detection, and the infrared small target detection results are output. The neural network model adopts a U-shaped encoding and decoding part. Multiple cascaded multi-scale dynamic perception modules are used in the encoding and decoding parts respectively. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding parts, and a classifier is integrated at the output of the decoding part. In the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate multi-scale feature maps. The cross-level attention enhancement module fuses and enhances the feature maps of adjacent levels in the multi-scale feature map through a dual attention mechanism, which serves as the enhanced feature map for the current level. In the decoding section, the multi-scale dynamic perception module extracts and fuses features from the spliced feature map generated by the enhanced feature map of the current level to generate a fused feature map for the current level, which serves as the input feature map for the next level. After the fused feature map of the last level is processed by a classifier, the infrared small target detection result is output. The concatenated feature map is generated by using the enhanced feature map of the current level as the input feature map of the current level of the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding level of the encoding part.
[0008] Preferably, in the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate a multi-scale feature map, specifically including: In the encoding part, each of the multi-scale dynamic perception modules is followed by a convolutional layer or a pooling layer; the convolutional layer or pooling layer downsamples the multi-scale feature map output by the multi-scale dynamic perception module at the current level and uses it as the input of the multi-scale dynamic perception module at the next level. Through this process, multi-scale feature maps from low-level details to high-level semantics are extracted layer by layer.
[0009] Preferably, the concatenated feature map is generated by using the enhanced feature map of the current layer as the input feature map of the current layer of the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding layer of the encoding part. Specifically, it includes: In the decoding section, each of the multi-scale dynamic perception modules is connected to a transposed convolutional layer; The input feature map of the current layer is upsampled through a transposed convolutional layer to restore the spatial resolution and generate upsampled features. By using skip connections, the upsampled features are concatenated with the multi-scale feature maps of the corresponding levels in the encoding part to generate a concatenated feature map.
[0010] Preferably, the cross-level attention enhancement module fuses and enhances feature maps from adjacent levels in the multi-scale feature map using a dual attention mechanism, resulting in an enhanced feature map for the current level. Specifically, this includes: The cross-level attention enhancement module uses a dual attention mechanism to perform spatial and channel dimension alignment, feature stitching, and channel compression on the feature maps of the multi-scale feature maps that are adjacent to the current level, thereby obtaining fused features. The dual attention mechanism includes a channel attention mechanism and a spatial attention mechanism, wherein: The channel attention mechanism aggregates and fuses global spatial information of features, learns the importance of different channel features, and obtains features after channel attention fusion. The spatial attention focuses on the spatial location of the features after channel attention fusion, and obtains an enhanced feature map that fuses deep semantics and shallow details, which serves as the enhanced feature map for the current level.
[0011] Preferably, each of the multi-scale dynamic perception modules includes a first convolutional layer, a multi-branch parallel convolutional layer, a channel attention weighted layer, and a residual connection layer; The first convolutional layer performs channel information interaction and dimension adjustment on the input feature map; The multi-branch parallel convolutional layer uniformly divides the adjusted feature map into multiple sub-feature maps along the channel dimension, and uses convolutional kernels of different sizes to extract feature maps of different scales corresponding to each branch simultaneously. The channel attention weighting layer performs global average pooling on the feature maps of different scales output by each branch to generate channel attention weights, and then uses the channel attention weights to adaptively reweight the feature maps of different scales output by each branch and then concatenate them along the channel dimension. The residual connection layer is used to add the weighted and concatenated multi-scale features to the input feature map of the first convolutional layer, and output the output feature map of the multi-scale dynamic perception module.
[0012] Preferably, the classifier is a softmax classifier. The fused feature map of the last layer is input into the softmax classifier, and the probability map of infrared small target detection is output by prediction.
[0013] Preferably, a total loss function is constructed based on the probability map and the true binary label map of the infrared small target image predicted by the neural network model to train the neural network model, thereby obtaining a pre-trained neural network model.
[0014] Preferably, it further includes an infrared image target detection system, comprising: The data acquisition module is used to acquire the infrared small target image data to be tested; The target detection module is used to input infrared small target image data into a pre-trained neural network model for target detection and output the infrared small target detection results. A neural network model construction module is used to construct a neural network model. The neural network model employs a U-shaped encoding and decoding section. Multiple cascaded multi-scale dynamic perception modules are used in both the encoding and decoding sections. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding sections, and a classifier is integrated at the output of the decoding section. Specifically, in the encoding section, the multiple multi-scale dynamic perception modules progressively extract and downsample the input feature map, gradually generating multi-scale feature maps. The cross-level attention enhancement modules use a dual attention mechanism to focus on features in the multi-scale feature maps that are related to the current layer. The feature maps of adjacent layers are fused and enhanced to form the enhanced feature map of the current layer. In the decoding part, the multi-scale dynamic perception module extracts and fuses features from the stitched feature map generated by the enhanced feature map of the current layer to generate the fused feature map of the current layer, which serves as the input feature map for the next layer. The fused feature map of the last layer is processed by a classifier to output the infrared small target detection result. The stitched feature map is generated by using the enhanced feature map of the current layer as the input feature map of the current layer in the decoding part, upsampling the input feature map, and then stitching it with the multi-scale feature map of the corresponding layer in the encoding part.
[0015] Preferably, the device further includes a computer apparatus, the computer apparatus comprising a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the following steps: Acquire image data of the small infrared target to be tested; Infrared small target image data is input into a pre-trained neural network model for target detection, and the infrared small target detection results are output. The neural network model adopts a U-shaped encoding and decoding part. Multiple cascaded multi-scale dynamic perception modules are used in the encoding and decoding parts respectively. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding parts, and a classifier is integrated at the output of the decoding part. In the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate multi-scale feature maps. The cross-level attention enhancement module fuses and enhances the feature maps of adjacent levels in the multi-scale feature map through a dual attention mechanism, which serves as the enhanced feature map for the current level. In the decoding section, the multi-scale dynamic perception module extracts and fuses features from the spliced feature map generated by the enhanced feature map of the current level to generate a fused feature map for the current level, which serves as the input feature map for the next level. After the fused feature map of the last level is processed by a classifier, the infrared small target detection result is output. The concatenated feature map is generated by using the enhanced feature map of the current level as the input feature map of the current level of the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding level of the encoding part.
[0016] Preferably, the system further includes a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following steps: Acquire image data of the small infrared target to be tested; Infrared small target image data is input into a pre-trained neural network model for target detection, and the infrared small target detection results are output. The neural network model adopts a U-shaped encoding and decoding part. Multiple cascaded multi-scale dynamic perception modules are used in the encoding and decoding parts respectively. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding parts, and a classifier is integrated at the output of the decoding part. In the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate multi-scale feature maps. The cross-level attention enhancement module fuses and enhances the feature maps of adjacent levels in the multi-scale feature map through a dual attention mechanism, which serves as the enhanced feature map for the current level. In the decoding section, the multi-scale dynamic perception module extracts and fuses features from the spliced feature map generated by the enhanced feature map of the current level to generate a fused feature map for the current level, which serves as the input feature map for the next level. After the fused feature map of the last level is processed by a classifier, the infrared small target detection result is output. The concatenated feature map is generated by using the enhanced feature map of the current level as the input feature map of the current level of the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding level of the encoding part.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The infrared image target detection method proposed in this invention constructs a neural network model. In the encoding part, a multi-scale dynamic perception module extracts feature context at different scales in parallel, enabling the network to possess multi-scale dynamic perception capabilities. This allows the network to adaptively capture target features of different sizes, effectively avoiding information loss during downsampling of small targets and significantly improving the model's robustness to scale changes. A cross-level attention enhancement module pre-aligns and stitches features from adjacent layers (shallow, medium, and deep) and uses a dual attention mechanism for weighted enhancement. This allows for effective complementarity between deep semantics and shallow details before features enter the decoding part, significantly suppressing interference from complex background clutter and significantly enhancing the feature response and saliency of small targets. In the decoding part, the original high-resolution detail features of the corresponding layer generated in the encoding part are introduced through stitching, and the multi-scale dynamic perception module is then used to refine and fuse the rich information after stitching. This mechanism of supplementing first and then refining ensures that while gradually restoring spatial resolution, the integrity of the outline and the positioning accuracy of small targets are preserved to the greatest extent. This enables the model to accurately lock onto small targets, significantly reduce false alarm rate and false negative rate, and clearly restore the target outline under complex background and low signal-to-noise ratio conditions, thus achieving high-precision and high-robust infrared small target detection. Attached Figure Description
[0018] Figure 1 This is a flowchart of the infrared image target detection method proposed in this invention; Figure 2 This is a diagram showing the overall network architecture of the CA-MDPNet network constructed in this invention. Figure 3 This is a network architecture diagram of the multi-scale dynamic sensing module provided by the present invention; Figure 4 This is a network architecture diagram of the cross-level attention enhancement module provided by the present invention; Figure 5 This is a comparison chart of example detection results on the test set provided in an embodiment of the present invention. Detailed Implementation
[0019] The following will refer to the appendices in the embodiments of the present invention. Figures 1-5 The technical solutions in the embodiments of the present invention will be clearly and completely described. It should be understood that the terminology used in the present invention is only for describing particular implementation methods and is not intended to limit the present invention.
[0020] like Figure 1 As shown, this invention proposes an infrared image target detection method, which includes the following steps: S1: Acquire the infrared small target image data to be tested; S2: Input the infrared small target image data into the pre-trained neural network model for target detection and output the infrared small target detection results; The neural network model adopts a U-shaped encoding and decoding part. Multiple cascaded multi-scale dynamic perception modules are used in the encoding and decoding parts respectively. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding parts, and a classifier is integrated at the output of the decoding part. In the encoding section, multiple multi-scale dynamic perception modules progressively extract and downsample the input feature maps layer by layer, generating multi-scale feature maps step by step. The cross-level attention enhancement module uses a dual attention mechanism to fuse and enhance the feature maps of adjacent levels in the multi-scale feature maps, using them as the enhanced feature maps of the current level. In the decoding section, the multi-scale dynamic perception module extracts and fuses features from the spliced feature map generated by the enhanced feature maps of the current level, generating a fused feature map of the current level, which serves as the input feature map for the next level. The fused feature map of the last level is then processed by a classifier to output the infrared small target detection result. The concatenated feature map is generated by using the enhanced feature map of the current layer as the input feature map of the current layer in the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding layer in the encoding part.
[0021] Specifically, in step S1, an infrared small target image dataset containing complex backgrounds is obtained, and the images are standardized preprocessed, including uniformly cropping or scaling the image size to a fixed size (e.g., 256×256 pixels) and normalizing the pixel values to accelerate network convergence and improve training stability.
[0022] In step S2, the normalized infrared small target image data is input into a pre-trained neural network model for target detection, and the infrared small target detection result is output, specifically including: like Figure 2 As shown, the constructed neural network model (Cross-level Attention-Multi-scale Dynamic Perception Network, CA-MDPNet) adopts a U-shaped encoding and decoding part; a cross-level attention enhancement module (CAE module) is embedded between the encoding and decoding parts; multiple cascaded multi-scale dynamic perception modules (MDP modules) are used in both the encoding and decoding parts; and a classifier is integrated at the output of the decoding part. 1) In the encoding part, a convolutional layer or pooling layer of length 2 is connected after each MDP module.
[0023] Multiple cascaded MDP modules, through a parallel multi-branch structure, use convolutional kernels of different sizes to simultaneously extract feature context information at different scales, progressively extracting multi-scale feature maps from low-level details to high-level semantics. After each MDP module, convolutional or pooling layers are used to downsample the multi-scale feature maps, compressing the spatial size of the feature maps and increasing the number of channels to extract high-level semantic features from the multi-scale feature maps, which serve as inputs for the next level of MDP modules. Through this process, multi-scale feature maps from low-level details to high-level semantics are extracted layer by layer.
[0024] Each MDP module includes a first convolutional layer, a multi-branch parallel convolutional layer, a channel attention weighted layer, and a residual connection layer; The first convolutional layer performs channel information interaction and dimension adjustment on the input feature map; The multi-branch parallel convolutional layer uniformly divides the adjusted feature map into multiple sub-feature maps along the channel dimension, and uses convolutional kernels of different sizes to extract feature maps of different scales corresponding to each branch simultaneously. The channel attention weighting layer performs global average pooling on the feature maps of different scales output by each branch to generate channel attention weights, and then uses the channel attention weights to adaptively reweight the feature maps of different scales output by each branch before concatenating them along the channel dimension. The residual connection layer is used to add the weighted concatenated multi-scale features to the input feature map of the first convolutional layer, and output the output feature map of the MDP module.
[0025] Specifically, such as Figure 3 The diagram shown is a network architecture diagram of the MDP module provided by this invention. The first convolutional layer performs a 1×1 convolution operation on the feature map of the infrared small target image. By performing channel information exchange and dimension adjustment, the adjusted feature map is obtained: in, This represents a convolutional block consisting of a 1×1 convolutional layer, a batch normalization layer, and a ReLU activation function. The multi-branch parallel convolutional layer uniformly divides the adjusted feature map into four sub-maps along the channel dimension, and feeds them into branches with different convolutional kernel sizes: Will Segmented into four sub-feature maps along the channel dimension , , and They are respectively: Different convolutional kernels of different sizes are used to perform convolutional operations at different scales on the four sub-feature maps in parallel to capture feature maps of different scales corresponding to each branch: In the channel attention weighted layer, a channel attention mechanism is introduced, which performs global average pooling on the feature maps of different scales output by each branch, and generates channel attention weights through a shared 1×1 convolutional layer: Based on the generated channel attention weights, the feature maps of different scales output by each branch are adaptively reweighted and then concatenated along the channel dimension to obtain the weighted concatenated multi-scale features. : The weighted, concatenated multi-scale features are combined with the adjusted feature map output from the first convolutional layer via residual connections. Adding them together, we obtain the output feature map of the multi-scale dynamic perception module as follows: .
[0026] Because infrared small targets occupy a very small pixel area in images, and their scale varies greatly depending on the detection distance, traditional networks have a fixed receptive field, making it difficult to handle both small and slightly larger targets. By using the MDP module to extract feature context at different scales in parallel, the network acquires multi-scale dynamic perception capabilities, enabling it to adaptively capture target features of different sizes. This effectively avoids information loss during downsampling of small targets and significantly improves the model's robustness to scale changes.
[0027] 2) In the decoding part, the MDP module extracts and fuses features from the spliced feature map generated by the enhanced feature map of the current level to generate the fused feature map of the current level, which is used as the input feature map of the next level.
[0028] Each MDP module is preceded by a transposed convolutional layer, which performs upsampling on the input feature map of the current layer to gradually restore the spatial resolution of the feature map and generate upsampled features. By using skip connections, the upsampled features are concatenated with the multi-scale feature maps of the corresponding levels in the encoding part to generate the concatenated feature map of the current level. The MDP module extracts and fuses features from the concatenated feature map of the current level to generate the fused feature map of the current level, which serves as the input feature map for the next level. This process supplements the spatial detail information lost in the encoding part during the decoding process, ensuring the integrity of the small target contour.
[0029] 3) Embed a cross-level attention enhancement module between the encoding and decoding parts.
[0030] The cross-level attention enhancement module uses a dual attention mechanism to perform spatial and channel dimension alignment, feature concatenation, and channel compression on feature maps of adjacent levels in the multi-scale feature maps to obtain fused features. The dual attention mechanism includes channel attention and spatial attention. Channel attention aggregates and fuses global spatial information of features, learns the importance of features from different channels, and obtains the features after channel attention fusion. Spatial attention focuses on the spatial location of the features after channel attention fusion, and obtains an enhanced feature map that fuses deep semantics and shallow details, which serves as the enhanced feature map for the current layer.
[0031] Specifically, obtain the feature maps of adjacent layers in the multi-scale feature map. , and ; like Figure 4 The diagram shown is a network architecture diagram of the cross-level attention enhancement module provided by the present invention, focusing on the feature map. , and Correspondingly, by using dilated convolution downsampling, 1×1 convolution channel adjustment, and upsampling operations, the spatial dimensions and number of channels of the feature maps in the multi-scale feature maps are aligned with those of the adjacent layers in terms of spatial and channel dimensions. After concatenating the aligned feature maps, channel compression is performed using a 1×1 convolution to obtain the fused features. : in, This represents a dilated convolution with a stride of 2 and a dilation rate of 2.
[0032] Features are aggregated and fused through channel attention. By analyzing global spatial information, we learn the importance of features from different channels and obtain the features after channel attention fusion. ; The calculation process of channel attention: Features after spatial attention focus channel attention fusion Based on the spatial location, an enhanced feature map that integrates deep semantics and shallow details is obtained. ; The computational process of spatial attention: in, This indicates the average pooling operation. This indicates a max pooling operation. This represents the projection of a multilayer sensor. This represents the Sigmoid activation function. This represents the element-wise multiplication operation; This represents the channel attention weight matrix; This represents the average pooling operation along the channel dimension; This represents the max pooling operation along the channel dimension; This represents the spatial attention weight matrix.
[0033] 5) Input the fused feature map of the last layer into the softmax classifier, and output the probability map of infrared small target detection by prediction.
[0034] This project achieves effective complementarity and fusion of shallow high-resolution details, mid-level transitional information, and deep rich semantics, significantly improving the saliency of the target region.
[0035] 4) Training and optimization process of neural network model: Based on the probability map and real binary label map of infrared small target image predicted by neural network model, the total loss function is constructed by binary cross-entropy loss and cross-union ratio loss, and the constructed neural network model is trained under supervision.
[0036] The binary cross-entropy loss is: The crossover and union ratio loss is: The total loss function is: in, This is the probability map of the i-th pixel in an infrared small target image predicted by a neural network model. The true binary label image of the i-th pixel in an infrared small target image. This represents the total number of pixels in the infrared small target image.
[0037] The network parameters are iteratively optimized using an optimizer (such as the Adam optimizer), and the loss function is minimized through backpropagation. During training, performance is monitored on the validation set, and the optimal model parameters are saved to obtain the trained neural network model.
[0038] Finally, the test set images are input into the trained neural network model. Within the model, a classifier (a lightweight convolutional prediction head, typically a 1x1 convolution with a sigmoid activation function) performs binary classification on the cross-level attention enhancement features, generating a probability map of the same size as the input feature map. Each pixel value on the probability map represents the probability that the corresponding location contains a small object. A set threshold (e.g., 0.5) is used to classify the probabilities. Figure 2Values are assigned as follows: when the value is greater than or equal to the threshold, it indicates that there is a target, and the value is 1; when the value is less than the threshold, it indicates that there is no target, and the value is 0.
[0039] This invention also proposes an infrared image target detection system, comprising: The data acquisition module is used to acquire the infrared small target image data to be tested; The target detection module is used to input infrared small target image data into a pre-trained neural network model for target detection and output the infrared small target detection results. The neural network model building module is used to construct the neural network model. The neural network model employs a U-shaped encoding and decoding section. Multiple cascaded multi-scale dynamic perception modules are used in both the encoding and decoding sections. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding sections, and a classifier is integrated at the output of the decoding section. Specifically, in the encoding section, multiple multi-scale dynamic perception modules progressively extract and downsample the input feature map, gradually generating multi-scale feature maps. The cross-level attention enhancement module uses a dual attention mechanism to focus on the multi-scale feature maps of adjacent layers. The feature maps are fused and enhanced to serve as the enhanced feature map for the current level. In the decoding part, the multi-scale dynamic perception module extracts and fuses features from the stitched feature map generated by the enhanced feature map of the current level to generate the fused feature map of the current level, which serves as the input feature map for the next level. The fused feature map of the last level is processed by a classifier to output the infrared small target detection result. The stitched feature map of the current level is generated by using the enhanced feature map of the current level as the input feature map of the current level in the decoding part, upsampling the input feature map, and stitching it with the multi-scale feature map of the corresponding level in the encoding part.
[0040] The target detection method proposed in this invention constructs a neural network model that can adaptively capture and fuse target features at different scales, effectively improving the model's robustness in detecting small infrared targets of different sizes. The designed multi-scale dynamic perception module and cross-level attention enhancement module deeply fuse shallow details, mid-level information, and deep semantics through a dual attention mechanism, compensating for details lost during the encoding process and enhancing the distinction between the target and the background.
[0041] Example This embodiment uses three publicly available infrared small target image datasets—NUAA-SIRST, MDFA, and IRSTD-1k—as examples to verify the specific implementation process of the method proposed in this invention.
[0042] Infrared images and their corresponding pixel-level annotated ground truth maps were obtained from the dataset described above. All images were uniformly scaled to a resolution of 256×256 pixels. Image pixel values were normalized to the range [0, 1]. The dataset was randomly divided into three groups: 70% (training set), 10% (validation set), and 20% (test set).
[0043] In this embodiment, the constructed CA-MDPNet network model contains four layers in both the encoding and decoding parts. In the encoding part, each layer consists of an MDP module and a 2×2 max-pooling layer (or convolutional downsampling) with a stride of 2, progressively downsampling the feature map size from 256×256 to 16×16, with the number of channels doubling progressively from the initial 64. In the decoding part, each layer consists of a nearest-neighbor upsampling operation (or transposed convolution) and an MDP module, progressively restoring the feature map size to 256×256, with the number of channels halved accordingly. Skip connections are used to concatenate the output of each layer in the encoding part with the input of the corresponding layer in the decoding part. The CAE module is embedded between the output of the encoding part and the beginning of the decoding part, processing feature maps from different layers (shallow, medium, and deep) adjacent to the current layer.
[0044] Network Training and Optimization. The network was implemented using the PyTorch deep learning framework. During training, the batch size was set to 8, the Adam optimizer was used, the initial learning rate was set to 1e-4, and cosine annealing was employed for adjustment. The hybrid loss function was defined as described in the previous formula. Training was performed on a server equipped with NVIDIA GPUs for a total of 200 epochs, with evaluation on the validation set every 10 epochs, and the best-performing model was saved.
[0045] Load the saved optimal model parameters and input the test set into the trained model for object detection. Binarize the probability map output by the model with a threshold of 0.5 to obtain the final object segmentation map.
[0046] The model performance is quantitatively evaluated using commonly used evaluation metrics in the field of target detection, such as detection rate (Pd), false alarm rate (Fa), intersection-over-union ratio (IoU), and their mean (mIoU).
[0047] like Figure 5The image shows some detection results of the method of this invention on the test set. From left to right, the columns are: the original infrared image (Image), the ground truth (GT) image, the detection results of AGPCNet, ALCNet, HCFNet, LSPM, SCTransNet, UIUNet, and the detection results of the CA-MDPNet network model (Ours) constructed in this invention. It can be seen that under different background complexities, the CA-MDPNet network model constructed by the method of this invention can accurately locate small infrared targets, and the predicted target shape highly matches the ground truth label, with fewer missed detections and false alarms.
[0048] This embodiment demonstrates through extensive experiments on public datasets (such as NUAA-SIRST, MDFA, and IRSTD-1k) that the proposed CA-MDPNet network model outperforms current mainstream methods in key metrics such as detection accuracy and robustness, especially in complex backgrounds and low signal-to-noise ratio scenarios. The entire network structure is simple, supports end-to-end training, and is easy to implement and deploy, providing an effective solution for infrared small target detection in practical applications.
[0049] In this embodiment, quantitative experimental results also confirm the superiority of the present invention. On the NUAA-SIRST, MDFA, and IRSTD-1k datasets, the CA-MDPNet network model constructed by the method proposed in this invention significantly outperforms the comparative methods in key metrics such as mIoU and Pd, while maintaining a low Fa, achieving a leading overall performance level.
[0050] In summary, the CA-MDPNet network model constructed by the method proposed in this invention effectively solves the core difficulties in infrared small target detection through the collaborative design of multi-scale dynamic perception modules and cross-level attention enhancement modules, providing strong technical support for achieving high-precision and high-robust infrared small target detection.
[0051] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
[0052] Furthermore, unless otherwise stated, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. All references to this specification are incorporated by way of citation to disclose and describe methods relating to those references. In the event of any conflict with any incorporated reference, the content of this specification shall prevail.
Claims
1. A method for infrared image target detection, characterized in that, Includes the following steps: Acquire image data of the small infrared target to be tested; Infrared small target image data is input into a pre-trained neural network model for target detection, and the infrared small target detection results are output. The neural network model adopts a U-shaped encoding and decoding part. Multiple cascaded multi-scale dynamic perception modules are used in the encoding and decoding parts respectively. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding parts, and a classifier is integrated at the output of the decoding part. In the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate multi-scale feature maps. The cross-level attention enhancement module fuses and enhances the feature maps of adjacent levels in the multi-scale feature map through a dual attention mechanism, which serves as the enhanced feature map for the current level. In the decoding section, the multi-scale dynamic perception module extracts and fuses features from the spliced feature map generated by the enhanced feature map of the current level to generate a fused feature map for the current level, which serves as the input feature map for the next level. After the fused feature map of the last level is processed by a classifier, the infrared small target detection result is output. The concatenated feature map is generated by using the enhanced feature map of the current level as the input feature map of the current level of the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding level of the encoding part.
2. The infrared image target detection method according to claim 1, characterized in that, In the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate a multi-scale feature map, specifically including: In the encoding part, each of the multi-scale dynamic perception modules is followed by a convolutional layer or a pooling layer; the convolutional layer or pooling layer downsamples the multi-scale feature map output by the multi-scale dynamic perception module at the current level and uses it as the input of the multi-scale dynamic perception module at the next level. Through this process, multi-scale feature maps from low-level details to high-level semantics are extracted layer by layer.
3. The infrared image target detection method according to claim 1, characterized in that, The concatenated feature map is generated by using the enhanced feature map of the current layer as the input feature map of the current layer in the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding layer in the encoding part. Specifically, it includes: In the decoding section, each of the multi-scale dynamic perception modules is connected to a transposed convolutional layer; The input feature map of the current layer is upsampled through a transposed convolutional layer to restore the spatial resolution and generate upsampled features. By using skip connections, the upsampled features are concatenated with the multi-scale feature maps of the corresponding levels in the encoding part to generate a concatenated feature map.
4. The infrared image target detection method according to claim 1, characterized in that, The cross-level attention enhancement module uses a dual attention mechanism to fuse and enhance feature maps from adjacent levels in the multi-scale feature map, using these enhanced feature maps as the current level's enhanced feature map. Specifically, this includes: The cross-level attention enhancement module uses a dual attention mechanism to perform spatial and channel dimension alignment, feature stitching, and channel compression on the feature maps of the multi-scale feature maps that are adjacent to the current level, thereby obtaining fused features. The dual attention mechanism includes a channel attention mechanism and a spatial attention mechanism, wherein: The channel attention mechanism aggregates and fuses global spatial information of features, learns the importance of different channel features, and obtains features after channel attention fusion. The spatial attention focuses on the spatial location of the features after channel attention fusion, and obtains an enhanced feature map that fuses deep semantics and shallow details, which serves as the enhanced feature map for the current level.
5. The infrared image target detection method according to claim 1, characterized in that, Each of the multi-scale dynamic perception modules includes a first convolutional layer, a multi-branch parallel convolutional layer, a channel attention weighted layer, and a residual connection layer; The first convolutional layer performs channel information interaction and dimension adjustment on the input feature map; The multi-branch parallel convolutional layer uniformly divides the adjusted feature map into multiple sub-feature maps along the channel dimension, and uses convolutional kernels of different sizes to extract feature maps of different scales corresponding to each branch simultaneously. The channel attention weighting layer performs global average pooling on the feature maps of different scales output by each branch to generate channel attention weights, and then uses the channel attention weights to adaptively reweight the feature maps of different scales output by each branch and then concatenate them along the channel dimension. The residual connection layer is used to add the weighted and concatenated multi-scale features to the input feature map of the first convolutional layer, and output the output feature map of the multi-scale dynamic perception module.
6. The infrared image target detection method according to claim 1, characterized in that, The classifier is a softmax classifier. The fused feature map of the last layer is input into the softmax classifier, and the probability map of infrared small target detection is output through prediction.
7. The infrared image target detection method according to claim 1, characterized in that, Based on the probability map and true binary label map of the infrared small target image predicted by the neural network model, a total loss function is constructed to train the neural network model, thereby obtaining a pre-trained neural network model.
8. An infrared image target detection system, characterized in that, include: The data acquisition module is used to acquire the infrared small target image data to be tested; The target detection module is used to input infrared small target image data into a pre-trained neural network model for target detection and output the infrared small target detection results. A neural network model construction module is used to construct a neural network model. The neural network model employs a U-shaped encoding and decoding section. Multiple cascaded multi-scale dynamic perception modules are used in both the encoding and decoding sections. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding sections, and a classifier is integrated at the output of the decoding section. Specifically, in the encoding section, the multiple multi-scale dynamic perception modules progressively extract and downsample the input feature map, gradually generating multi-scale feature maps. The cross-level attention enhancement modules use a dual attention mechanism to focus on features in the multi-scale feature maps that are related to the current layer. The feature maps of adjacent layers are fused and enhanced to form the enhanced feature map of the current layer. In the decoding part, the multi-scale dynamic perception module extracts and fuses features from the stitched feature map generated by the enhanced feature map of the current layer to generate the fused feature map of the current layer, which serves as the input feature map for the next layer. The fused feature map of the last layer is processed by a classifier to output the infrared small target detection result. The stitched feature map is generated by using the enhanced feature map of the current layer as the input feature map of the current layer in the decoding part, upsampling the input feature map, and then stitching it with the multi-scale feature map of the corresponding layer in the encoding part.
9. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the following steps: Acquire image data of the small infrared target to be tested; Infrared small target image data is input into a pre-trained neural network model for target detection, and the infrared small target detection results are output. The neural network model adopts a U-shaped encoding and decoding part. Multiple cascaded multi-scale dynamic perception modules are used in the encoding and decoding parts respectively. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding parts, and a classifier is integrated at the output of the decoding part. In the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate multi-scale feature maps. The cross-level attention enhancement module fuses and enhances the feature maps of adjacent levels in the multi-scale feature map through a dual attention mechanism, which serves as the enhanced feature map for the current level. In the decoding section, the multi-scale dynamic perception module extracts and fuses features from the spliced feature map generated by the enhanced feature map of the current level to generate a fused feature map for the current level, which serves as the input feature map for the next level. After the fused feature map of the last level is processed by a classifier, the infrared small target detection result is output. The concatenated feature map is generated by using the enhanced feature map of the current level as the input feature map of the current level of the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding level of the encoding part.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the following steps: Acquire image data of the small infrared target to be tested; Infrared small target image data is input into a pre-trained neural network model for target detection, and the infrared small target detection results are output. The neural network model adopts a U-shaped encoding and decoding part. Multiple cascaded multi-scale dynamic perception modules are used in the encoding and decoding parts respectively. Cross-level attention enhancement modules of corresponding layers are embedded between the encoding and decoding parts, and a classifier is integrated at the output of the decoding part. In the encoding section, multiple multi-scale dynamic perception modules perform multi-layer feature extraction and downsampling on the input feature map layer by layer to gradually generate multi-scale feature maps. The cross-level attention enhancement module fuses and enhances the feature maps of adjacent levels in the multi-scale feature map through a dual attention mechanism, which serves as the enhanced feature map for the current level. In the decoding section, the multi-scale dynamic perception module extracts and fuses features from the spliced feature map generated by the enhanced feature map of the current level to generate a fused feature map for the current level, which serves as the input feature map for the next level. After the fused feature map of the last level is processed by a classifier, the infrared small target detection result is output. The concatenated feature map is generated by using the enhanced feature map of the current level as the input feature map of the current level of the decoding part, upsampling the input feature map, and concatenating it with the multi-scale feature map of the corresponding level of the encoding part.