A Single-Frame Infrared Weak Target Detection Method Based on Multi-Scale Feature Enhancement

By constructing a YOLOv5 network model and introducing a multi-scale feature enhancement module and an adaptive training strategy, the problems of high false alarm rate and high computational resource consumption in infrared weak target detection under complex backgrounds are solved, achieving high-precision and efficient target detection.

CN119540526BActive Publication Date: 2025-10-31HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411588124.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-10-31
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

Infrared detection of small targets is difficult to perform accurately in complex backgrounds. Existing methods suffer from high false alarm rates, high computational resource consumption, and insufficient detection accuracy.

Method used

A single-frame infrared weak target detection method based on multi-scale feature enhancement is adopted. By constructing a YOLOv5 network model, a multi-scale feature enhancement module and an adaptive training strategy are introduced, and bounding box regression is performed by combining Focal-NWD and Focal-αECIoU loss functions.

Benefits of technology

It improves the detection accuracy and recall rate of infrared weak targets, reduces false alarms and missed detections, and enhances the model's perception capability and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540526B_ABST
    Figure CN119540526B_ABST
Patent Text Reader

Abstract

This invention discloses a single-frame infrared weak target detection method based on multi-scale feature enhancement, comprising the following steps: Step 1, acquiring single-frame infrared images to construct a single-frame infrared image dataset, and dividing it into a training set and a test set; Step 2, constructing an infrared weak target detection network model, wherein the infrared weak target detection network uses the YOLOv5 network model as its base network, the YOLOv5 network model including a backbone feature extraction network, a feature fusion network, and a detection head; a multi-scale feature enhancement module is introduced into the backbone feature extraction network, the multi-scale feature enhancement module including a context feature fusion module and a feature detail enhancement module connected in series; Step 3, designing a training strategy, and training the infrared weak target detection network model using the training set as input according to the training strategy; Step 4, after training, inputting the test set to test and evaluate the infrared weak target detection network model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, mainly to the problem of weak target detection and recognition in infrared imaging, and specifically to a single-frame infrared weak target detection method based on multi-scale feature enhancement. Background Technology

[0002] Infrared imaging technology has demonstrated its importance in multiple fields due to its unique advantages. Compared to visible light imaging systems, infrared imaging systems are smaller, lighter, and less affected by harsh environments such as smoke and limited by lighting conditions, allowing them to operate in all weather and around the clock. By passively absorbing the target's thermal radiation, they exhibit high stealth and anti-interference capabilities. Therefore, this technology is widely used in civilian and military fields, such as autonomous driving, early warning systems, maritime monitoring, and precision guidance. However, the detection of weak infrared targets still faces many problems and challenges. First, because targets are usually photographed at high altitudes or at long distances, the image resolution is low, resulting in a lack of detailed information such as texture and shape. Second, detection with a large field of view introduces complex background interference and noise, leading to a low signal-to-noise ratio and making the target easily submerged in complex backgrounds, further increasing the difficulty of detecting weak targets. Therefore, accurate detection of weak infrared targets remains a challenging problem.

[0003] Currently, infrared weak target detection methods are divided into traditional image processing methods and deep learning methods. Common traditional methods include filter-based, visual saliency-based, and image data structure-based methods. Traditional image processing detection methods are affected by manual feature extraction, resulting in low robustness and a high false alarm rate when faced with complex backgrounds and changing target shapes. In recent years, with the rapid development of deep learning in many fields, compared with traditional detection methods, it adopts a data-driven end-to-end learning framework with flexible network structure, capable of adaptively learning target features without manual feature extraction. It is a robust and accurate target detection method, and therefore more suitable for infrared weak target detection in complex backgrounds.

[0004] Deep learning-based infrared weak target detection methods are modeled as two tasks: segmentation and detection. Most current research focuses on segmentation, which provides pixel-level detail and requires significant computational resources. While advantageous for scenarios demanding precise differentiation, the ultimate goal of infrared weak target detection is tracking and localization. Segmentation serves as an intermediate representation as input for tracking and localization, and the completeness of segmentation only approximates detection accuracy, failing to provide a direct evaluation of specific detection performance. Therefore, modeling infrared weak target detection as a target detection task is crucial to reduce computational resource consumption. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention proposes a single-frame infrared weak target detection method based on multi-scale feature enhancement.

[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0007] A single-frame infrared weak target detection method based on multi-scale feature enhancement includes the following steps:

[0008] Step 1: Obtain a single-frame infrared image and construct a single-frame infrared image dataset.

[0009] Step 2: Construct an infrared weak target detection network model. The infrared weak target detection network model is based on the YOLOv5 network model, which includes a backbone feature extraction network, a feature fusion network, and a detection head.

[0010] Step 3: A multi-scale feature enhancement module (MFEB) is introduced into the backbone feature extraction network. This module includes a context fusion module (CFB) and a detail enhancement module (DEB). The context fusion module contains a patch-guided context-aware block (PGCAB) and a sequence convolution module; the detail enhancement module includes a detail enhancement convolution module (DEConv) and a CBAM attention mechanism.

[0011] Step 4: A training strategy was designed. Based on the number of training epochs, Focal-NWD and Focal-αECIoU loss functions were adaptively used as localization loss calculations to achieve coarse-to-fine regression of the bounding boxes.

[0012] Step 5: Input the training samples obtained in Step 1 into the infrared weak target detection model constructed in Steps 2 to 4 for training.

[0013] Step 6: Input the test set to test and evaluate the model.

[0014] Preferably, the multi-scale feature enhancement module MFEB in step 3 specifically includes:

[0015] Contextual Feature Fusion Module (CFB): The Contextual Feature Fusion Module includes a block-guided context-aware module and a sequence convolution module. Given a feature... Average pooling, max pooling, and Conv operations are performed separately to extract the intra-block average pooling feature F for each block. avgIntra-block max pooling feature F max and local features F within the block local Then F avg and F max The Nonlocal module is used to obtain global inter-block features with long-distance interactions. and These two global features effectively capture contextual information from different perspectives. Then, channel concatenation is performed on these two global features to obtain the aggregated global feature F. global F global and F local Element-wise multiplication yields a fused feature F of global and local features. fusion Finally, the original input features F and the fused features F are connected through residual connections. fusion The sums are used to obtain the final feature F′. Different k values ​​can be used to obtain features at different scales.

[0016] Preferably, the block-guided context information awareness module first processes the feature F in blocks of size k×k with a step size of s, and the feature is represented as F. k ′.

[0017] Preferably, the sequence convolution module is the Bottleneck module, which consists of a 1×1 Conv module, a 3×3 Conv module, and residual connections. The feature F obtained after passing through the sequence convolution module is F_i. seq Finally, the block-guided context-aware module outputs feature F. k The output features F of the sequence convolution module are... seq The summation yields the output features of the context feature fusion module.

[0018] As a preferred option, the Feature Detail Enhancement Module (DEB) includes a detail enhancement convolutional module (DEConv) and a CBAM attention mechanism.

[0019] The detail enhancement convolution module DEConv includes standard convolution and differential convolution. Differential convolution explicitly encodes prior knowledge into the model through a pixel-to-pixel difference calculation strategy. Differential convolution includes four convolution operations: center difference convolution (CDC), angular difference convolution (ADC), vertical difference convolution (VDC), and horizontal difference convolution (HDC). The output of the context feature fusion module... The input is processed in parallel through five convolutions. Finally, the outputs of the five branches are summed element-wise to obtain the output of the detail enhancement convolutional module.

[0020] Preferably, the CBAM attention mechanism consists of two parts: spatial attention and channel attention. Given a feature... feature First, channel attention is used, and then global average pooling and global max pooling are performed in the spatial dimension to obtain the global feature description. and Global feature description and The inputs are fed into two fully connected layers with shared parameters to generate channel attention vectors. These two channel attention vectors are then added together and normalized using the sigmoid function to generate the final channel attention weights. Features With channel attention weight M C Multiplying the main channels yields a feature map for channel enhancement. Channel Enhancement Feature Map Then, spatial attention is applied to enhance the feature map of the channel. Global feature descriptions are obtained by performing channel average pooling and channel max pooling along the channel dimension. and Will and After concatenating along the channel dimension, a spatial attention map is obtained by performing a convolution operation using a 7×7 convolution kernel and then normalizing it using sigmoid. Finally, the feature map of channel enhancement is... Spatial attention map M S Element-wise multiplication yields the spatially enhanced feature F″.

[0021] The context feature fusion module and the feature detail enhancement module are sequentially connected in series to obtain the multi-scale feature enhancement module MFEB.

[0022] Preferably, step 4 includes the following steps:

[0023] Define the center coordinates of the predicted bounding box as cx and cy, and the width and height as w and h, respectively; the center coordinates of the ground truth bounding box are defined as cx. gt and cy gt Width and height are w gt and h gt .

[0024] The Focal-αECIoU loss function is constructed as follows:

[0025]

[0026] L αECIoU =1-αECIoU

[0027] L Focal-αECIoU =IoU γ L αECIoU

[0028] Where IoU is the intersection-to-union ratio, which is the ratio of the intersection to the union of the model's predicted bounding boxes and the ground truth bounding boxes. ρ 2 (b,b gt ), ρ 2 (w,w gt ), ρ 2 (h,h gt Calculate the center distance, width distance, and length distance between the predicted bounding box and the ground truth bounding box, respectively. β is the balance parameter, ν is a parameter used to measure aspect ratio consistency, and c is the diagonal length of the two bounding boxes. w and C h α represents the width and height of the minimum bounding rectangles of the predicted and ground truth bounding boxes, respectively. α is a Power parameter used to satisfy different levels of bounding box regression accuracy and reduce sensitivity to the dataset. γ is a parameter controlling the degree of outlier suppression.

[0029] The specific formula for the Focal-NWD loss function is as follows:

[0030]

[0031] L Focal-NWD =NWD γ (1-NWD)

[0032] Where N and N gt This represents the Gaussian distribution of the predicted bounding box and the ground truth bounding box. Represent N and N gt The Wasserstein distance between the Gaussian distributions NWD(N,N) g ) represents the exponentially normalized form of the Wasserstein distance between two Gaussian distributions, where c is a constant.

[0033] Preferably, the new training strategy uses the Focal-NWD loss function for a coarse bounding box regression in the first half of the training epochs, and the Focal-αECIoU loss function for a fine bounding box regression in the second half of the epochs. The localization loss function formula is as follows:

[0034]

[0035] Where nepoch is the number of arguments in the current training iteration, and epoch is the total number of training rounds.

[0036] This invention has the following characteristics and beneficial effects:

[0037] 1. The context feature fusion module employs a multi-branch parallel feature extraction strategy. Multiple branches, consisting of a block-guided context information perception module and a sequence convolution module, extract different features at multiple scales and levels, acquiring both global and local features of the target. This results in features containing richer semantic information. On one hand, this reduces the loss of information about small targets, improving their detection accuracy. On the other hand, since background and target blocks may have similar responses in their local features, global correlation information can be effectively utilized to determine the target region's location, eliminating similar regions and noise interference, thereby reducing false alarms for small targets.

[0038] 2. The feature detail enhancement module can enhance the details of features, making the model pay more attention to key regions, retaining key information while suppressing noise and irrelevant information, enhancing feature representation, improving the model's perception ability, and thus improving the detection accuracy of small targets.

[0039] 3. NWD, as part of the localization loss function, reduces the sensitivity of the IoU metric to weak target positional biases during training. αECIoU introduces a loss factor calculating the aspect ratio between the predicted and ground truth boxes, mitigating the problem of CIoU where the penalty term is always 0 when the aspect ratios of the predicted and ground truth boxes are the same, leading to unfit length and width. Simultaneously, a power parameter α is introduced, and adjusting α focuses on high-quality anchor boxes to achieve higher regression accuracy. Initially, CIoU dominates to accelerate convergence; as the CIoU penalty term gradually becomes less effective, the part calculating the aspect ratio loss begins to take effect, fine-tuning the regression and effectively improving regression accuracy.

[0040] 4. A Focal term was introduced into the two loss functions, which effectively separated high-quality anchor frames from low-quality anchor frames, increased the loss weight of high-quality anchor frames, and thus improved the accuracy of the regression.

[0041] 5. Adaptively adjust the timing of using the Focal-NWD and Focal-αECIoU loss functions according to the number of epochs to achieve a training process that refines the regression accuracy of the bounding box from coarse to fine, thereby accelerating the convergence speed while improving the regression accuracy. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1This is a flowchart of the steps of the single-frame infrared weak target detection method based on multi-scale feature enhancement in the embodiment.

[0044] Figure 2 This is a diagram of the improved YOLOv5 model framework constructed in the embodiment;

[0045] Figure 3 A schematic diagram of the block-guided context information awareness module PGCAB;

[0046] Figure 4 This is a diagram of the Nonlocal module;

[0047] Figure 5 A schematic diagram of feature enhancement convolution DEConv;

[0048] Figure 6 This is a schematic diagram of the CBAM attention module;

[0049] Figure 7 This is a schematic diagram of the multi-scale feature enhancement module MFEB in the embodiment;

[0050] Figure 8 This is a comparison chart of the detection results of various methods in the embodiments. Detailed Implementation

[0051] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0052] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0053] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0054] This invention provides a single-frame infrared weak target detection method based on multi-scale feature enhancement, such as... Figure 1 As shown, it includes the following steps:

[0055] Step 1: Obtain single-frame infrared images to construct a single-frame infrared image dataset, and divide it into training and testing sets.

[0056] Specifically, this embodiment includes the following sub-steps:

[0057] Step 1.1: Obtain the single-frame infrared image datasets SIRSTv2 and IRSTD1K and annotate the target ground truth bounding boxes to ensure that the data format can be correctly read by the network.

[0058] Step 1.2: Construct a single-frame infrared image dataset, a validation set, and a test set. Divide the dataset constructed in Step 1.1 into a 6:2:2 ratio, so that the training set accounts for 60% of the total dataset, and the validation set and test set each account for 20%.

[0059] Step 2: Construct an infrared weak target detection network model. The infrared weak target detection network is based on the YOLOv5 network model, which includes a backbone feature extraction network, a feature fusion network, and a detection head.

[0060] A multi-scale feature enhancement module is introduced into the backbone feature extraction network. The multi-scale feature enhancement module includes a context feature fusion module and a feature detail enhancement module connected in series.

[0061] It should be noted that in this embodiment, the input data needs to be preprocessed, including adaptive anchor box calculation and image scaling.

[0062] Specifically, in this embodiment, the backbone feature extraction network extracts features from the input data. The backbone feature network includes 5 Conv modules, 2 C3 modules, 2 multi-scale feature enhancement modules (MFEB), and 1 SPPF module. Each Conv module comprises a convolutional layer, a BN normalization function, and a SiLU activation function connected in sequence. Each C3 module is divided into two branches: one branch contains one Conv module, and the other branch contains one Conv module and n Bottleneck modules. The Bottleneck module consists of a 1×1 Conv module, a 3×3 Conv module, and residual connections. The two branches are concatenated and fused along the channel. In this embodiment, the C3 modules used in layers P4 and P5 of the original YOLOv5 network are replaced with the multi-scale feature enhancement module (MFEB).

[0063] In a further configuration of this embodiment, the context feature fusion module includes a block-guided context information awareness module (PGCAB) and a sequence convolution module, see [link to example]. Figure 3 As shown. Given a feature The block-guided context information awareness module first performs average pooling, max pooling, and Conv operations on the feature F in k×k window blocks with a stride of s to extract the intra-block average pooling feature F for each block. avg Intra-block max pooling feature F max and local features F within the block local Then F avg and F max The Nonlocal module is used to obtain global inter-block features with long-distance interactions. and These two global features effectively capture contextual information from different perspectives. Then, channel concatenation is performed on these two global features to obtain the aggregated global feature F. global F global and F local Element-wise multiplication yields a fused feature F of global and local features. fusion Finally, the original input features F and the fused features F are connected through residual connections. fusion The summation yields the final feature F′.

[0064] In this embodiment, the block-guided context information perception module first processes the feature F in blocks of size k×k with a step size of s. Therefore, the output feature of the block-guided context information perception module is denoted as F. k ′.

[0065] Understandably, given features It is obtained from the first few layers of the original YOLOv5 network model by inputting single-frame infrared image data.

[0066] Furthermore, such as Figure 4 As shown, the Nonlocal module is described in [reference needed]. Figure 4 As shown, a 1×1 Conv module is first used to generate query (Q), key (K), and value (V) matrices respectively. The similarity between features is evaluated by calculating the dot product between Q and K. The value V matrix is ​​modulated using similarity weights, and a softmax function is used to ensure the sum of the weights is 1. This output is then combined with V through a 3×3 DWConv module to obtain the final features. The formula is as follows:

[0067]

[0068] Where d k This represents the dimension of the key vector.

[0069] The sequence convolution module is the Bottleneck module. The feature F obtained after passing through the sequence convolution module is F. seq Finally, the block-guided context-aware module outputs feature F. k The output features F of the sequence convolution module are... seq The summation yields the output features of the context feature fusion module.

[0070] Understandably, different k values ​​can be used to obtain features at different scales. In this embodiment, k=3 and k=5 are selected to obtain multi-scale features, with block features obtained using a step size of s=1, while padding is performed to keep the feature map size unchanged.

[0071] In a further embodiment, the feature detail enhancement module includes a detail enhancement convolution module DEConv and a CBAM attention mechanism.

[0072] Specifically, such as Figure 5 As shown, the DEConv module includes standard convolution and differential convolution. The standard convolution is a Conv module that can capture local features. Differential convolution explicitly encodes prior knowledge into the model through a pixel-to-pixel difference calculation strategy. Differential convolution includes four convolution operations: center difference convolution (CDC), angle difference convolution (ADC), vertical difference convolution (VDC), and horizontal difference convolution (HDC). Different differential convolutions can capture the differences in local information in the input data from multiple angles, making the model pay more attention to the high-frequency information of the image, thereby enhancing the details of the features.

[0073] Furthermore, such as Figure 6 As shown, the CBAM attention mechanism consists of two parts: spatial attention and channel attention. Given a feature... feature First, channel attention is used, and then global average pooling and global max pooling are performed in the spatial dimension to obtain the global feature description. and Global feature description and The inputs are fed into two fully connected layers with shared parameters to generate channel attention vectors. These two channel attention vectors are then added together and normalized using the sigmoid function to generate the final channel attention weights. Combine the original feature F with the channel attention weight M C Multiplying the main channels yields a feature map for channel enhancement. Channel Enhancement Feature Map Then, spatial attention is applied to enhance the feature map of the channel. Global feature descriptions are obtained by performing channel average pooling and channel max pooling along the channel dimension. and Will and After concatenating along the channel dimension, a spatial attention map is obtained by performing a convolution operation using a 7×7 convolution kernel and then normalizing it using sigmoid. Finally, the feature map of channel enhancement is... Spatial attention map M S Element-wise multiplication yields the spatially enhanced feature F″. The specific formula is as follows:

[0074] F′=F⊙M C (F)=F⊙σ(f 1×1 (f 1×1 (AvgPool(F)))+f 1×1 (f 1×1 (MaxPool(F))))

[0075] F″=F′M S (F′)=σ(f 7×7 ([AvgPool(F′);MaxPool(F′)]))

[0076] CBAM(F)=F″

[0077] Where f k×k (·) represents a convolution operation with a kernel of size k×k.

[0078] In the above technical solution, the context feature fusion module and the feature detail enhancement module are sequentially connected in series to obtain the multi-scale feature enhancement module MFEB, see [link to technical solution]. Figure 7 As shown.

[0079] The feature fusion network fuses the features extracted by the backbone feature extraction network in both bottom-up and top-down directions. The feature fusion network comprises four Conv modules, four C3 modules, and two upsampling modules, and different features are fused using channel concatenation.

[0080] The detection head detects three features of different sizes obtained by the feature fusion network and outputs the target category and the bounding box of the target. The detection head contains three detection branches, each of which contains a 1×1 convolution operation.

[0081] Step 3: Design a training strategy and use the training set as input to train the infrared weak target detection network model according to the training strategy.

[0082] Understandably, since small targets are more sensitive to IoU metrics, the first half of the training epochs uses the Focal-NWD loss function for a coarse bounding box regression, while the second half uses the Focal-αECIoU loss function for a finer bounding box regression. This training strategy effectively improves the accuracy of bounding box regression. The formula is as follows:

[0083]

[0084] Where nepoch is the number of arguments in the current training iteration, and epoch is the total number of training rounds.

[0085] Specifically, it includes the following sub-steps:

[0086] Step 3.1: Define the center coordinates cx and cy of the predicted bounding box, and the width and height w and h, respectively; define the center coordinates cx of the ground truth bounding box. gt and cy gt Width and height are w gt and h gt .

[0087] Step 3.2: Construct the Focal-αECIoU loss function, the specific formula is as follows:

[0088]

[0089]

[0090]

[0091]

[0092] L αECIoU =1-αECIoU

[0093] L Focal-αECIoU =IoUγ L αECIoU

[0094] Where AB is the intersection area of ​​bounding box A and bounding box B, AB is the union area, and ρ 2 (b,b gt ), ρ 2 (w,w gt ), ρ 2 (h,h gt Calculate the center distance, width distance, and length distance between the predicted bounding box and the ground truth bounding box, respectively. β is the balance parameter, ν is a parameter used to measure aspect ratio consistency, and c is the diagonal length of the two bounding boxes. w and C h α and γ are the width and height of the minimum bounding rectangles of the predicted and ground truth bounding boxes, respectively. α is a Power parameter used to satisfy different levels of bounding box regression accuracy and reduce sensitivity to the dataset. γ is a parameter controlling the degree of outlier suppression. In this embodiment, both α and γ are set to 2.

[0095] Step 3.3: Construct the Focal-NWD loss function. The specific derivation process and formula are as follows:

[0096] The bounding box is modeled as a two-dimensional Gaussian distribution to represent the importance of target pixels within the box. Assume the center coordinates of the bounding box are (c... x ,c y The bounding box has a width of w and a height of h. The formula for the inscribed ellipse of the bounding box is as follows:

[0097]

[0098] The probability density function formula for a two-dimensional Gaussian distribution is as follows:

[0099]

[0100] Where x, μ, and Σ represent the coordinates (x, y), the mean vector, and the covariance matrix, respectively. When (x - μ) T Σ -1 When (x-μ)=1, the inscribed ellipse of the bounding box can be modeled as a two-dimensional Gaussian distribution N(μ,Σ).

[0101]

[0102] The similarity between predicted and ground truth bounding boxes is measured by the distance between two Gaussian distributions. The Wasserstein distance is used to calculate the distance between the Gaussian distributions. Assuming that the two Gaussian distributions are μ1=N(m1,Σ1) and μ2=N(m2,Σ2), the Wasserstein distance can be expressed as follows:

[0103]

[0104] Therefore, the two-dimensional Gaussian distance between the predicted bounding box and the ground truth bounding box can be expressed by the following formula:

[0105]

[0106] Normalizing its exponent to the range of 0-1, we obtain the normalized Wasserstein distance (NWD), as shown in the following formula:

[0107]

[0108] Where N and N gt Let c represent the Gaussian distribution of the predicted bounding box and the ground truth bounding box, where c is a constant.

[0109] The specific formula for the Focal-NWD loss function is as follows:

[0110] L Focal-NWD =NWD γ (1-NWD)

[0111] Where γ is a parameter that controls the degree of outlier suppression. In this embodiment, γ is set to 2.

[0112] In this embodiment, the training environment and parameters are further configured during training. The operating system is Ubuntu 18.04, the PyTorch 13.1 deep learning framework is used, and an NVIDIA GeForce RTX 3090 GPU is employed for training. The training epochs are set to 200, the batch size to 16, the stochastic gradient descent (SGD) optimizer is used, the learning rate (lr) is set to 0.001, the IoU threshold for NMS is set to 0.5, and the confidence threshold is set to 0.001.

[0113] Input the training set and validation set from the dataset constructed in step 1 into the network. Set the input image size to 640×640. The training set is used to learn the network parameters, and the validation set is used to verify the training effect.

[0114] Step 4: After training is complete, input the test set to test and evaluate the infrared weak target detection network model.

[0115] Specifically, it includes the following sub-steps:

[0116] Step 4.1: Input the test set constructed in Step 1 into the trained model, compare the prediction results output by the model with the labels, and test the detection performance of the detection network model.

[0117] Step 4.2: Construct computational model performance metrics to evaluate the model's detection performance. The metrics are constructed as follows:

[0118]

[0119]

[0120]

[0121]

[0122] Where TP represents the number of actual positive classes predicted as positive; FP represents the number of actual negative classes predicted as positive; FN represents the number of actual positive classes predicted as negative; P represents precision; R represents recall; F1 is the harmonic mean of precision and recall; and P(R) represents the precision-recall curve.

[0123] Step 4.3: To verify the effectiveness of each part of the model, this example conducted ablation experiments on the SIRSTv2 dataset for the improved part, as shown in Table 1.

[0124] Table 1

[0125]

[0126] As shown in Table 1, Focal-αECIoU as a loss function can effectively improve the regression accuracy of target bounding boxes, thereby increasing precision, but the recall is low, resulting in a significant number of false negatives. Building on this, the Focal-NWD loss function is introduced, and a new training strategy is used to adaptively adjust the application of the loss function, effectively improving recall and reducing false negatives. Finally, the Multi-Scale Feature Enhancement (MFEB) module is used to acquire multi-scale features and contextual information, and to enhance the features at multiple levels, improving the detail of the features and effectively increasing both precision and recall, reducing false alarms and false negatives, resulting in a significant improvement in detection performance.

[0127] Step 4.4: Since most deep learning-based methods currently treat infrared small target detection as a pixel-level segmentation task, this embodiment selects both pixel-level segmentation task-based and target detection task-based models for comparison to verify the effectiveness of the improved model. Comparative experiments are conducted on the SIRSTv2 and IRSTD-1K datasets. For the segmentation task-based models, the state-of-the-art (SOTA) models for infrared small target detection—AGPCNet, ACM, ISNet, ALCNet, and DNANet—were selected. For the target detection task-based models, single-stage target detection algorithms YOLOv5 to YOLOv11, RetinaNet, and SSD, as well as two-stage target detection algorithms Faster-RCNN and Cascade-RCNN, were selected for comparison. The confidence threshold was set to 0.001, and the IOU threshold was set to 0.5. To standardize the metrics, this embodiment selects the commonly used evaluation metrics Precision, Recall, and F1 in infrared small target detection. The comparative experimental results are shown in Table 2.

[0128] Table 2

[0129]

[0130]

[0131] The experimental results above show that, since segmentation task models require pixel-level segmentation results, even slight deficiencies can lead to false alarms or missed detections, resulting in poor target detection performance. The target detection-based model proposed in this invention significantly outperforms various state-of-the-art segmentation task models, as well as commonly used single-stage and two-stage target detection task models, in target detection tasks. This method achieves optimal values ​​for Precision, Recall, and F1 scores on both the SIRSTv2 and IRSTD-1K datasets, indicating that it effectively improves the detection performance of small infrared targets. On the SIRSTv2 dataset, compared to the baseline YOLOv5, this method improves Precision by 7.7%, Recall by 6.8%, and F1 score by 7.3%.

[0132] Step 4.4: The detection results were visualized on the test image, such as... Figure 8 As shown, solid circles represent correctly detected targets, dashed circles represent missed detections, and ellipses represent false alarms.

[0133] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments, including components, without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.

Claims

1. A single-frame infrared weak target detection method based on multi-scale feature enhancement, characterized in that, Includes the following steps: Step 1: Obtain single-frame infrared images to construct a single-frame infrared image dataset, and divide it into a training set and a test set; Step 2: Construct an infrared weak target detection network model. The infrared weak target detection network is based on the YOLOv5 network model, which includes a backbone feature extraction network, a feature fusion network, and a detection head. A multi-scale feature enhancement module is introduced into the backbone feature extraction network. The multi-scale feature enhancement module includes a context feature fusion module and a feature detail enhancement module connected in series. The context feature fusion module includes a block-guided context information awareness module and a sequence convolution module; In the context feature fusion module, given a feature The block-guided context information awareness module performs average pooling, max pooling, and Conv operations to extract the intra-block average pooling feature F for each block. avg Intra-block max pooling feature F max and local features F within the block local Then, the average pooling feature F within the block is respectively avg and the intra-block max pooling feature F max The Nonlocal module is used to obtain global inter-block features with long-distance interactions. and Global features between two blocks and Channel concatenation is performed to obtain the aggregated global feature F. global Aggregate global features F global and local features within the block F local The elements in the matrix are multiplied together to obtain the fused global and local feature F. fusion Finally, the original input features F and the fused features F are connected through residual connections. fusion The summation yields the final feature F′; When the block-guided context information awareness module extracts features, it sets the window size to k×k, the step size to s, and the feature representation to F. k ′; The sequence convolution module is a Bottleneck module, consisting of a 1×1 Conv module, a 3×3 Conv module, and residual connections. The feature F obtained after passing through the sequence convolution module is F_i. seq Finally, the block-guided context information awareness module outputs feature F. k The output features F of the sequence convolution module seq The summation yields the output features of the context feature fusion module. The feature detail enhancement module includes a detail enhancement convolutional module and a CBAM attention mechanism; The detail enhancement convolutional module includes standard convolution and differential convolution. The differential convolution includes central differential convolution (CDC), angular differential convolution (ADC), vertical differential convolution (VDC), and horizontal differential convolution (HDC). The output of the context feature fusion module... The input is processed in parallel through five convolutions. Finally, the outputs of the five branches are summed element-wise to obtain the output of the detail enhancement convolutional module. The CBAM attention mechanism includes spatial attention and channel attention, given a feature. The features For the output of the detail enhancement module, channel attention is first applied, which performs global average pooling and global max pooling in the spatial dimension to obtain the global feature description. and Global feature description and The inputs are fed into a two-layer fully connected network with shared parameters to generate channel attention vectors. The two channel attention vectors are then added together and normalized using the sigmoid function to generate the final channel attention weights. Input features With channel attention weight M C Multiplying the main channels yields a feature map for channel enhancement. Channel Enhancement Feature Map Then, spatial attention is applied to enhance the feature map of the channel. Global feature descriptions are obtained by performing channel average pooling and channel max pooling along the channel dimension. and Global feature description and After concatenating along the channel dimension, a spatial attention map is obtained by performing a convolution operation using a 7×7 convolution kernel and then normalizing it using sigmoid. Finally, the feature map of channel enhancement is... Spatial attention map M S Element-wise multiplication yields the spatially enhanced feature F″′; Step 3: Design a training strategy and use the training set as input to train the infrared weak target detection network model according to the training strategy. Step 4: After training is complete, input the test set to test and evaluate the infrared weak target detection network model.

2. The single-frame infrared weak target detection method based on multi-scale feature enhancement according to claim 1, characterized in that, In step 3, the training strategy for the infrared weak target detection network model is as follows: Based on the set number of epochs, the first half of the training epochs uses the Focal-NWD loss function for a coarse bounding box regression, and the second half of the epochs uses the Focal-αECIoU loss function for a fine bounding box regression. The formula for the localization loss function is as follows: Where nepoch is the number of arguments in the current training iteration, and epoch is the total number of training rounds.

3. The single-frame infrared weak target detection method based on multi-scale feature enhancement according to claim 2, characterized in that, In step 3, during the training of the infrared weak target detection network model, the center coordinates of the predicted bounding box are defined as cx and cy, and the width and height are defined as w and h, respectively; the center coordinates of the ground truth bounding box are defined as cx. gt and cy gt Width and height are w gt and h gt Construct the Focal-αECIoU loss function, the specific formula of which is as follows: L αECIoU =1-αECIoU L Focal-αECIoU =IoU γ L αECIoU Where IoU is the intersection-union ratio, which is the ratio of the intersection to the union of the model's predicted bounding boxes and the ground truth bounding boxes; ρ 2 (b,b gt ), ρ 2 (w,w gt ), ρ 2 (h,h gt ) represent the center distance, width distance, and height distance between the predicted bounding box and the ground truth bounding box, respectively; β is the balance parameter; ν is a parameter used to measure aspect ratio consistency; and c is the diagonal length of the two bounding boxes. w and C h α represents the width and height of the minimum bounding rectangle of the predicted bounding box and the ground truth bounding box, respectively; α is a Power parameter, and γ is a parameter that controls the degree of outlier suppression.

4. The single-frame infrared weak target detection method based on multi-scale feature enhancement according to claim 2, characterized in that, The specific formula for the Focal-NWD loss function is as follows: L Focal-NWD =NWD γ (1-NWD) Where N and N gt The Gaussian distributions representing the predicted and ground truth bounding boxes; Represent N and N gt Wasserstein distance between Gaussian distributions; NWD(N,N) g ) represents the exponentially normalized form of the Wasserstein distance between two Gaussian distributions, where c is a constant.

Citation Information

Patent Citations

  • Single-frame infrared weak and small target detection method based on improved YOLOv5

    CN116665016A

  • Remote sensing image target detection method based on attention mechanism weighted feature fusion

    CN117611994A