Infrared target detection method based on dynamic upsampling and multi-dimensional attention mechanism

CN118447233BActive Publication Date: 2026-10-30XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410597461.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2026-10-30
Estimated Expiration
2044-05-14

AI Technical Summary

Technical Problem

但无人机搭载红外探测器获取的红外图像具有分辨率低、背景干扰大、目标尺度多、纹理颜色细节少等问题,使得YOLOv8对这类数据的检测效果仍不够理想

Benefits of technology

[0012]本发明提供了一种基于动态上采样与多维注意力机制的红外目标检测方法,通过从机载设备获取待检测红外图像,输入至训练好的目标检测网络模型中,以使所述目标检测网络模型提取所述待检测红外图像的多层特征,并将多层特征融合得到融合特征,对所述融合特征作检测得到所述待检测红外图像中的目标类别和目标位置。由于本发明的目标检测网络模型将原YOLOv8n网络中颈部网络的C2f模块替换为1×1基本卷积单元CBS模块,从而减少颈部网络的层数以及参数,实现轻量化颈部网络,并且将原颈部网络的基于最近邻插值的上采样模块替换为轻量且有效的Dysample模块,能有效提高特征图上采样质量,使轻量化的颈部更为高效。此外,本发明将多维度注意力机制模块添加至原YOLOv8检测头中,从而在特征维度上增强检测头的尺度感知能力,在空间维度上增强检测头的空间感知能力,在通道维度上增强检测头的任务感知能力,从而显著提高了检测头的检测性能。在训练过程中将原YOLOv8的CIoU替换为MDPIoU,MDPIoU通过直接最小化预测边界框与真实边界框之间的左上点和右下点的距离,提高边框回归的收敛速度和精度,因此本发明可以提高检测红外图像的检测效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447233B_ABST
    Figure CN118447233B_ABST
Patent Text Reader

Abstract

The application provides an infrared target detection method based on dynamic up-sampling and a multi-dimensional attention mechanism, which inputs an infrared image to be detected into a trained target detection network model to obtain a target category and a target position. The application replaces a C2f module of a neck network in an original YOLOv8n network with a CBS module, reduces the number of layers and parameters of the neck network, and replaces a nearest neighbor interpolation-based up-sampling module with a lightweight and effective Dysample module, which can effectively improve the up-sampling quality of a feature map and make the lightweight neck network more efficient. In addition, the application adds a multi-dimensional attention mechanism module to an original YOLOv8 detection head, thereby enhancing the perception ability of the detection head in the feature dimension, the spatial dimension and the channel dimension. During training, CIoU is replaced with MDPIoU, which improves the convergence speed and accuracy of the bounding box regression, so that the application can improve the detection effect of the infrared image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of infrared image target detection technology, specifically relating to an infrared target detection method based on dynamic upsampling and multidimensional attention mechanism. Background Technology

[0002] Aerial imaging boasts advantages such as high efficiency and low cost, playing a crucial role in various fields. Target detection refers to using algorithms to calculate the position coordinates and category of targets in an image. Infrared target detection is an important branch of target detection. Infrared detection imaging utilizes the infrared radiation emitted by natural objects for detection without the need for active illumination by a detector. Furthermore, the longer wavelength of infrared light provides greater penetration and is less affected by environmental factors, performing stably even in night vision scenarios, enabling all-weather operation. However, compared to visible light images, infrared images suffer from lower signal-to-noise ratios, less detailed target information such as texture and color features, and lower contrast. Additionally, airborne infrared imaging, with its long imaging distance and large area, leads to problems such as lower image resolution, smaller target scale, denser target distribution, and greater background interference, making airborne infrared target detection more challenging than non-aerial infrared target detection.

[0003] Object detection algorithms can be divided into traditional non-deep learning object detection techniques and deep learning-based object detection techniques. Non-deep learning object detection techniques are mainly divided into: methods based on grayscale information statistics, methods based on template matching, methods based on visual saliency, and methods based on machine learning.

[0004] Methods based on grayscale information statistics treat the background in an image as noise. Noise has a certain impact on target detection, so to reduce the influence of background factors, the grayscale difference between the target and the background in the image can be used to set an appropriate threshold for extracting infrared targets. Template matching methods first extract sample information from a ship database to establish a ship feature template set and define matching rules. Features of the target of interest are extracted from the processed image, and these features are matched with the templates. As the number of target categories increases, the system needs a large number of templates to achieve optimal matching results. Methods based on visual saliency describe the contrast between a region and its surrounding areas based on the image's own features, which can quickly extract candidate regions containing targets. Machine learning-based methods require manually designed features, and then image features are extracted to train machine learning models, such as artificial neural networks and support vector machines.

[0005] Deep learning-based object detection technologies leverage large datasets to automatically learn high-level features with rich semantic information, stronger feature representation capabilities, greater adaptability, lower reliance on human experience, and higher detection accuracy and speed. Current mainstream deep learning-based object detection algorithms are divided into two-stage and one-stage algorithms. Two-stage algorithms, such as Faster-RCNN and SPP-Net, are primarily based on candidate regions. These algorithms offer high accuracy but are slow due to the generation of numerous redundant anchor boxes and the separate prediction of classification and localization, making them unsuitable for real-time applications. One-stage algorithms, such as SSD and the YOLO series, are based on regression-based detection. These algorithms are fast, with the YOLO series experiencing rapid updates and improvements, while two-stage algorithms are less efficient. The YOLO series algorithms generally consist of three main parts: a backbone network, a neck network, and a head. Currently, the most commonly used YOLO series algorithms in industry are YOLOv5 to v8.

[0006] Non-deep learning-based object detection technologies require significant human intervention and involve numerous algorithms, exhibiting weak generalization ability in complex scenarios, low flexibility, significant limitations, and low intelligence, making real-time monitoring and dynamic tracking difficult. Deep learning-based object detection technologies commonly employ two-stage algorithms, such as Faster-RCNN, which offers high accuracy but is slow and requires substantial computational and memory investment for training. The YOLO series of algorithms is a commonly used single-stage approach and is currently the most widely used object detection algorithm in industry, with YOLOv8 offering significant advantages in speed and accuracy. However, infrared images acquired by UAVs equipped with infrared detectors suffer from low resolution, significant background interference, diverse target scales, and limited texture and color details, making YOLOv8's detection performance on such data less than ideal. Summary of the Invention

[0007] To address the aforementioned problems in the existing technology, this invention provides an infrared target detection method based on dynamic upsampling and a multidimensional attention mechanism. The technical problem to be solved by this invention is achieved through the following technical solution:

[0008] This invention provides an infrared target detection method based on dynamic upsampling and multidimensional attention mechanism, comprising:

[0009] S100 acquires the infrared image to be detected from the airborne equipment;

[0010] S200, the infrared image to be detected is input into the trained target detection network model, so that the target detection network model extracts multi-layer features of the infrared image to be detected, and fuses the multi-layer features to obtain fused features, and detects the fused features to obtain the target category and target location in the infrared image to be detected.

[0011] Beneficial effects:

[0012] This invention provides an infrared target detection method based on dynamic upsampling and a multi-dimensional attention mechanism. The method acquires an infrared image to be detected from an onboard device and inputs it into a trained target detection network model. The target detection network model extracts multi-layer features from the infrared image and fuses these features to obtain fused features. Detection is then performed on these fused features to determine the target category and location in the infrared image. Because the target detection network model of this invention replaces the C2f module of the neck network in the original YOLOv8n network with a 1×1 basic convolutional unit (CBS) module, the number of layers and parameters of the neck network are reduced, resulting in a lightweight neck network. Furthermore, the upsampling module based on nearest neighbor interpolation in the original neck network is replaced with a lightweight and efficient Dysample module, which effectively improves the upsampling quality of the feature map, making the lightweight neck network more efficient. In addition, this invention adds a multi-dimensional attention mechanism module to the original YOLOv8 detection head, thereby enhancing the scale perception capability of the detection head in the feature dimension, the spatial perception capability in the spatial dimension, and the task perception capability in the channel dimension, thus significantly improving the detection performance of the detection head. During training, the original YOLOv8 CIoU is replaced with MDPioU. MDPioU improves the convergence speed and accuracy of bounding box regression by directly minimizing the distance between the top left and bottom right points of the predicted bounding box and the true bounding box. Therefore, this invention can improve the detection effect of infrared images.

[0013] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating an infrared target detection method based on dynamic upsampling and multidimensional attention mechanism provided by the present invention.

[0015] Figure 2 This is a schematic diagram of the training process provided by the present invention;

[0016] Figure 3 This is a basic unit structure diagram of the existing YOLOv8n network;

[0017] Figure 4 This is a diagram of the improved YOLOv8n network structure provided by the present invention;

[0018] Figure 5 This is a structural diagram of the Dysample module;

[0019] Figure 6 This is a schematic diagram of a grid coordinate matrix;

[0020] Figure 7 This is a schematic diagram of the six basic modules of the multidimensional attention mechanism;

[0021] Figure 8 This is a structural diagram of a multi-dimensional attention mechanism;

[0022] Figure 9 This is a schematic diagram for calculating the MDPioU loss function;

[0023] Figure 10 This is a performance comparison chart between the network model of this invention and the YOLOv8n network model. Detailed Implementation

[0024] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0025] like Figure 1 As shown, this invention provides an infrared target detection method based on dynamic upsampling and multidimensional attention mechanism, comprising:

[0026] S100 acquires the infrared image to be detected from the airborne equipment;

[0027] S200, the infrared image to be detected is input into the trained target detection network model, so that the target detection network model extracts multi-layer features of the infrared image to be detected, and fuses the multi-layer features to obtain fused features, and detects the fused features to obtain the target category and target location in the infrared image to be detected.

[0028] The present invention inputs the infrared image to be detected into a trained target detection network model, extracts low-level, mid-level, and high-level features of the infrared image to be detected through the backbone network of the target detection network model, fuses the low-level, mid-level, and high-level features through the neck network to obtain feature maps of different scales, and uses the detection head to detect the feature maps of different scales to obtain the target category and target location in the infrared image to be detected.

[0029] As an optional embodiment of the present invention, such as Figure 2 As shown, the training process of the target detection network model of the present invention includes:

[0030] a1. Construct an airborne infrared dataset, which includes multiple infrared images, in which targets in each infrared image are marked with real bounding boxes;

[0031] It is worth noting that this step can be based on the publicly available HIT-UAV dataset and DroneVehichle dataset to construct a dataset containing seven categories: person, bicycle, car, truck, bus, van, and truck. The data was obtained by drones carrying infrared detectors in flight. This dataset contains 5551 images, including data obtained from different heights and angles, and covers various scenes such as daytime, nighttime, playgrounds, urban streets, and highways. This invention can divide the dataset into training, validation, and test sets in a 7:2:1 ratio; infrared images from the training set are selected as training samples.

[0032] a2, in the current iteration, select multiple infrared images from the airborne infrared dataset and input them into the pre-built target detection network model, outputting the predicted category and predicted bounding box of the target in each infrared image;

[0033] In the actual training of this invention, 32 (batch size) infrared images can be selected as the input images for each iteration of training.

[0034] The target detection network model of the present invention consists of a backbone network, a neck network, and a detection head. The backbone network is used to extract features from the input image, and the neck network is used to fuse shallow, medium, and deep features extracted by the backbone network to give the features richer semantic information and enhance the feature expression ability. The detection head is used to detect targets (including detecting target categories and bounding boxes).

[0035] refer to Figure 3 , Figure 3 This is a basic unit structure diagram of an existing YOLOv8n network. This invention lightweights the original neck network of the existing YOLOv8n network and introduces a multi-dimensional attention mechanism module into the detection head. (Reference) Figure 4The target detection network model of this invention includes a backbone network, a neck network, and a detection head. The backbone network consists of 5 CBS units, 4 C2f modules, and an SPPF module. The neck network consists of 4 contact modules, 2 Dysample modules, and 6 CBS units. The detection head consists of 3 parallel CBS modules, 3 cascaded multidimensional attention mechanism modules, and 3 parallel coupling heads. The 5 CBS units within the backbone network are CBS units 1 to 5, and the 4 C2f modules are C2f modules 1 to 4. The internal connection relationship of the backbone network is that CBS unit 1, CBS unit 2, C2f module 1, CBS unit 3, C2f module 2, CBS unit 4, C2f module 3, CBS unit 5, C2f module 4, and SPPF module are cascaded in series.

[0036] exist Figure 4 In this context, k is the kernel size of the convolution / pooling kernel, s is the stride of the convolution / pooling, and n is the number of Bottlenecks used. The padding size p for convolution and pooling is obtained from the formula p = floor(k / 2), where floor represents rounding down.

[0037] The neck network consists of four splicing modules, designated as the 1st to 4th splicing contact modules; two Dysample modules, designated as the 1st and 2nd Dysample modules; and six CBS units, designated as the 6th to 10th CBS units. The output of the 1st contact module is connected to the input of the 7th CBS unit. The 7th, 8th, 3rd, 9th, 10th, 4th, and 11th CBS units are connected in series. The input of the 2nd Dysample module is connected to the output of the SPPF module. The 2nd Dysample module, 2nd contact module, 6th CBS module, and 1st Dysample module are connected in series. The input of the 1st contact module is connected to both the output of the 1st Dysample module and the output of the 2nd CBS unit. The output of the 3rd C2F module is connected to the input of the 2nd contact module.

[0038] The three CBS units in the detection head are CBS units 12 to 14. The input of CBS unit 12 is connected to the output of CBS unit 7, the input of CBS unit 13 is connected to the output of CBS unit 9, the input of CBS unit 14 is connected to the output of CBS unit 11, and the outputs of CBS units 12 to 14 are all connected to the input of the third multidimensional attention mechanism module. The output of the third multidimensional attention mechanism module is connected to the three coupling heads.

[0039] 1) Lightweighting of the original neck network:

[0040] The original neck network's C2f module is replaced with a 1×1 basic convolutional unit CBS (each CBS unit consists of a two-dimensional convolutional layer, a batch normalization layer, and a SiLU activation function connected in sequence) to fuse features and reduce the number of parameters; the original neck network's nearest neighbor interpolation-based upsampling module is replaced with a Dysample (dynamic upsampling) module.

[0041] refer to Figure 5 Dysample is an ultra-lightweight and efficient dynamic upsampling method. In practice, there are several places in the network structure where the feature map size needs to be transformed. Figure 5 The dimensionality transformation operation is omitted in the structural diagram. Dysample can be easily implemented using PyTorch's standard built-in functions. It consists of a 1×1 2D convolution with 32 output channels, a sub-pixel convolution module (pixel_shuffle) (implemented by the `torch.nn.functional.pixel_shuffle()` function in PyTorch), and a grid sampling module (gridsample) (implemented by the `torch.nn.functional.grid_sample()` function in PyTorch); for example, input features... Figure X The matrix (C×H×W) is convolved in two dimensions to obtain an offset O(32×H×W). O is then multiplied by a static range factor of 0.25 to avoid a checkerboard effect in the upsampling results. The dimensions of O are then transformed to O(2×16×H×W). This generates a grid coordinate matrix G(2×1×H×W), which can be generated using the `torch.meshgrid()` function in PyTorch. A schematic diagram of G is shown below. Figure 6 As shown; G and O are added to obtain the sampling point matrix S (2×16×H×W), S is normalized to the range [-1, 1], and the dimension of S is transformed to S (32×H×W); the sub-pixel convolution module is used to upsample S to obtain S (8×2H×2W); the dimension of S is transformed to S (4×2H×2W×2), the dimension of X is transformed to X (4×C / 4×H×W), and then the sampling point matrix S and the low-resolution feature X are sent to the grid sampling module for resampling to obtain the final upsampled feature X' (C×2H×2W).

[0042] 2) A multi-dimensional attention mechanism module is added before the original detection head network. Stacking this module three times consecutively yields the best results. The multi-dimensional attention mechanism module of this invention comprises six basic modules. (Reference) Figure 7Each multi-dimensional attention mechanism module consists of 3 parallel offset and mask modules, 2 Spatial Attn low modules, 3 Spatial Attn mid modules, 2 Spatial Attn high modules, 7 Scale Attn modules, and 3 Channel Attn modules. The 3 parallel offset and mask modules are the 1st to 3rd offset and mask modules; the 2 Spatial Attn low modules are the 1st to 2nd Spatial Attn low modules; the 7 Scale Attn modules are the 1st to 7th Scale Attn modules; and the 3 Channel Attn modules are the 1st to 3rd Channel Attn modules.

[0043] refer to Figure 8The output of the first offset and mask module is connected to the input of the first Spatial Attn mid module and the first Spatial Attn high module. The output of the first Spatial Attn mid module is connected to the input and output of the first ScaleAttn ​​module. The output of the first Spatial Attn high module is connected to the input and output of the second ScaleAttn ​​module. The outputs of the first and second ScaleAttn ​​modules are connected to the input of the first Channel Attn module. The output of the second offset and mask module is connected to the input of the first Spatial Attn low module, the second Spatial Attn mid module, and the second Spatial Attn high module. The output of the first Spatial Attn low module is connected to the input and output of the third ScaleAttn ​​module. The output of the second Spatial Attn mid module is connected to the input and output of the fourth ScaleAttn ​​module. The output of the second Spatial Attn high module is connected to the input and output of the fifth ScaleAttn ​​module. The third to fifth ScaleAttn ​​modules... The output of the Attn module is connected to the input of the 2nd Channel Attn module; the output of the 3rd offset and mask module is connected to the input of the 2nd Spatial Attn low module and the 3rd Spatial Attn mid module; the output of the 2nd Spatial Attn low module is connected to the input and output of the 6th Scale Attn module; the output of the 3rd Spatial Attn mid module is connected to the input and output of the 7th Scale Attn module; the outputs of the 6th and 7th Scale Attn modules are connected to the input of the 3rd Channel Attn module; the inputs of the 1st Spatial Attn mid module and the 1st Spatial Attn low module are connected; the inputs of the 1st Spatial Attn high module, the 2nd Spatial Attn mid module, and the 2nd Spatial Attn low module are connected; the inputs of the 2nd Spatial Attn high module and the 3rd Spatial Attn mid module are connected.

[0044] The functions and structure of the 6 basic modules are as follows:

[0045] Each offset and mask module consists of a 1×1 two-dimensional convolutional layer with 27 output channels, a channel partitioning module, and a sigmoid activation function. The offset and mask module is used to calculate the offset and the feature amplitude modulation amount mask. For example, the input feature map C×W×H is processed by a 1×1 convolution to obtain the output feature 27×W×H. This feature is then partitioned along the channel dimension. The features of the first 18 channels, 18×W×H, are output as the offset, and the features of the last 9 channels, 9×W×H, are processed by the sigmoid activation function to output as the mask.

[0046] The three Spatial Attn modules are spatial attention modules used to enhance the model's ability to perceive target locations. Spatial Attn has three modules, each used for feature maps at different scales, and outputs a feature map at the same scale. The Spatial Attn low module consists of a 2D modulated deformable convolution, a group normalization layer with 16 groups, and a 2x upsampling layer. The input to the 2D modulated deformable convolution is the feature map, offset, and mask. Compared to the fixed-size kernel of a regular 2D convolution, the 2D modulated deformable convolution can adapt to target objects of different scales or deformations, offering high flexibility, increasing the receptive field, and enhancing the model's generalization ability. The Spatial Attn mid module consists of a 2D modulated deformable convolution layer and a group normalization layer with 16 groups. The Spatial Attn low module consists of a 2D modulated deformable convolution layer with a stride of 2 and a group normalization layer with 16 groups. The stride of 2 is mainly used to achieve 2x downsampling.

[0047] The Scale Attn module is a scale attention module. This module consists of a two-dimensional adaptive average pooling layer, a 1×1 convolution, a ReLU activation function, and a Hard Sigmoid activation function. The two-dimensional adaptive average pooling layer is used to compress the input width and height to a size of 1×1. The 1×1 convolution adjusts the number of channels to 1. Thus, the output feature scale of this module is 1×1×1. The two-dimensional adaptive average pooling layer is used to perform global pooling on H×W to obtain the average value of the features of each channel. The 1×1 convolution is responsible for fusing and integrating all channels.

[0048] The Channel Attn module is a channel attention module (DyReLU). This module consists of a two-dimensional adaptive average pooling layer, two fully connected layers, a ReLU activation function, a Hard Sigmoid activation function, and a dynamic segmentation function. The dynamic segmentation function is as follows: assuming the input feature map of Channel Attn is x, the output feature values ​​of Hard Sigmoid are all between 0 and 1, not zero mean, which is not conducive to optimization. Therefore, the output needs to be added to -0.5. Then, the feature is evenly divided into four feature maps a1, b1, a2, and b2 along the channel dimension. After passing through a Maxout activation function, the output is max{xα1+b1,xα2+b2}, where α1=2a1+1, α2=2a2, β1=b1, β2=b2.

[0049] Each of the aforementioned multi-dimensional attention mechanism modules is used for:

[0050] a) Input three feature maps with the same number of channels but different scales output by the neck network. Let the large-scale feature map be X1, and the medium-scale feature map be X2. Figure X 2. Small-scale features Figure X 3; In this technology, the input to the overall network is a 3×640×640 image, then the sizes of X1, X2 and X3 are 128×80×80, 128×40×40 and 128×20×20 respectively;

[0051] b, let i = 1;

[0052] c. Calculate X using the offset and mask modules. i The offset and mask are set, and a new variable k is created to count the number of fused feature maps, and initialized to k=0;

[0053] d, including offset, mask, and features Figure X i The feature map S is obtained by feeding it into the Spatial Attn mid module. i Then S i The scaling factor f is obtained by inputting it into the Scale Attn module. i Then S i with f i Multiplication yields the feature map L i Finally, let k = k + 1;

[0054] e. Create a new variable X and initialize it to S = S i ;

[0055] f, if i is greater than or equal to 2, then offset, mask, and features are... Figure Xi-1 The feature map S is obtained by feeding it into the Spatial Attn low module. i-1 Then S i-1 The scaling factor f is obtained by inputting it into the Scale Attn module. i-1 Then S i-1 with f i-1 Multiplication yields the feature map L i-1 And let S = S + S i-1 S and S i Since the features come from different scales, the addition operation can increase the amount of information contained in the features. Finally, let k = k + 1.

[0056] g, if i is less than or equal to 2, include offset, mask, and features. Figure X i+1 The feature map S is obtained by feeding it into the Spatial Attn high module. i+1 Then S i+1 The scaling factor f is obtained by inputting it into the Scale Attn module. i+1 Then S i+1 with f i+1 Multiplication yields the feature map L i+1 And let S = S + S i+1 , k = k + 1;

[0057] h, let S = S / k, and input S into Channel Attn to obtain the feature map Y. i ;

[0058] Let i = i + 1, and return b;

[0059] j, determine if i is 3, if so, obtain three feature maps Y. i (i = 1, 2, 3), Y i The scale size of (i = 1, 2, 3) and X i (i = 1, 2, 3) are the same.

[0060] a3, calculate the MDPIOU loss function using the predicted bounding box and the true bounding box of the target;

[0061] The original bounding box regression loss CIoU is replaced with MDPioU. MDPioU includes all factors considered in the existing loss function, namely overlapping regions, non-overlapping regions, center distance, and width and height deviation, and simplifies the calculation process. A schematic diagram of MDPioU is shown below. Figure 9 As shown, the specific calculation process is as follows:

[0062] calculate

[0063] MDPIoU loss function

[0064] in d1 represents the coordinates of the top-left corner of the predicted bounding box and the ground truth bounding box, respectively. The distance between two points To predict the coordinates of the bottom right corner of the bounding box and the ground truth bounding box, d2 is... The distance between two points, h and w are the height and width of the image, and IoU is the area of ​​the overlap between the predicted bounding box and the ground truth bounding box;

[0065] a4. Using the direction of descent of the MDPIOU loss function as the direction, the network parameters of the target detection network model are updated using a stochastic gradient descent optimizer to obtain an updated target detection network model.

[0066] During training, this invention uses a stochastic gradient descent (SGD) optimizer to update the network parameters.

[0067] a5, repeat a2 to a4 until the training cutoff condition is met to obtain a well-trained object detection network model.

[0068] To demonstrate the detection effectiveness of this invention, the following experimental comparison and result analysis are presented between the embodiments of this invention and existing advanced target detection methods. The evaluation indicators for each model are shown in the table below, and the comparison diagram is shown in the figure. Figure 10 As shown.

[0069]

[0070]

[0071] From the table and Figure 10 The data shows that the network model improvement method of this invention has achieved good results in four performance indicators: precision (the higher the precision, the lower the false positive rate), recall (the higher the recall rate, the lower the false negative rate), map@0.5, and map@0.5:0.95. It effectively improves the detection accuracy, reduces the false positive rate and false negative rate, and the overall parameters and FLOPs are relatively low.

[0072] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0073] Although this application has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality.

[0074] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. An infrared target detection method based on dynamic upsampling and multidimensional attention mechanism, characterized in that, include: S100 acquires the infrared image to be detected from the airborne equipment; S200, the infrared image to be detected is input into a trained target detection network model, so that the target detection network model extracts multi-layer features of the infrared image to be detected, fuses the multi-layer features to obtain fused features, and detects the fused features to obtain the target category and target location in the infrared image to be detected; the target detection network model includes a backbone network, a neck network, and a detection head; the backbone network consists of 5 CBS units, 4 C2f modules, and an SPPF module; the neck network consists of 4 contact modules, 2 Dysample modules, and 6 CBS units; the detection head consists of 3 parallel CBS modules, 3 cascaded multi-dimensional attention mechanism modules, and 3 parallel coupling heads; Each multi-dimensional attention mechanism module consists of 3 parallel offset and mask modules, 2 Spatial Attn low modules, 3 Spatial Attn mid modules, 2 Spatial Attn high modules, 7 Scale Attn modules, and 3 Channel Attn modules; the 3 parallel offset and mask modules are the 1st to 3rd offset and mask modules; the 2 Spatial Attn low modules are the 1st to 2nd Spatial Attn low modules; the 7 Scale Attn modules are the 1st to 7th Scale Attn modules; and the 3 Channel Attn modules are the 1st to 3rd Channel Attn modules. Specifically, the output of the first offset and mask module is connected to the input of the first Spatial Attn mid module and the first Spatial Attn high module; the output of the first Spatial Attn mid module is connected to the input and output of the first Scale Attn module; the output of the first Spatial Attn high module is connected to the input and output of the second Scale Attn module; the outputs of the first and second Scale Attn modules are connected to the input of the first Channel Attn module; the output of the second offset and mask module is connected to the input of the first Spatial Attn low module, the second Spatial Attn mid module, and the second Spatial Attn high module; the output of the first Spatial Attn low module is connected to the input and output of the third Scale Attn module; the output of the second Spatial Attn mid module is connected to the input and output of the fourth Scale Attn module; the output of the second Spatial Attn high module is connected to the input and output of the fifth Scale Attn module; and the third to fifth Scale Attn modules... The output of the Attn module is connected to the input of the 2nd Channel Attn module; the output of the 3rd offset and mask module is connected to the input of the 2nd Spatial Attn low module and the 3rd Spatial Attn mid module; the output of the 2nd Spatial Attn low module is connected to the input and output of the 6th Scale Attn module; the output of the 3rd Spatial Attn mid module is connected to the input and output of the 7th Scale Attn module; the outputs of the 6th and 7th Scale Attn modules are connected to the input of the 3rd Channel Attn module; the inputs of the 1st Spatial Attn mid module and the 1st Spatial Attn low module are connected; the inputs of the 1st Spatial Attn high module, the 2nd Spatial Attn mid module, and the 2nd Spatial Attn low module are connected; the inputs of the 2nd Spatial Attn high module and the 3rd Spatial Attn mid module are connected. Each offset and mask module consists of a 1×1 two-dimensional convolutional layer with 27 output channels, a channel partitioning module, and a sigmoid activation function; Each Spatial Attn high module consists of a 2D modulated deformable convolutional layer, a group normalization layer with 16 groups, and a 2x upsampling layer; each Spatial Attn mid module consists of a 2D modulated deformable convolutional layer and a group normalization layer with 16 groups; each Spatial Attn low module consists of a 2D modulated deformable convolutional layer with a stride of 2 and a group normalization layer with 16 groups; each Scale Attn module consists of a 2D adaptive average pooling layer, a 1×1 convolutional layer, a ReLU activation function, and a Hard Sigmoid activation function; each Channel Attn module consists of a 2D adaptive average pooling layer, two fully connected layers, a ReLU activation function, a Hard Sigmoid activation function, and a dynamic piecewise function.

2. The infrared target detection method based on dynamic upsampling and multidimensional attention mechanism according to claim 1, characterized in that, The training process of the object detection network model includes: a1. Construct an airborne infrared dataset, which includes multiple infrared images, in which targets in each infrared image are marked with real bounding boxes; a2, in the current iteration, select multiple infrared images from the airborne infrared dataset and input them into the pre-built target detection network model, outputting the predicted category and predicted bounding box of the target in each infrared image; a3, calculate the MDPIOU loss function using the predicted bounding box and the true bounding box of the target; a4. Using the direction of descent of the MDPIOU loss function as the direction, the network parameters of the target detection network model are updated using a stochastic gradient descent optimizer to obtain an updated target detection network model. a5, repeat a2 to a4 until the training cutoff condition is met to obtain a well-trained object detection network model.

3. The infrared target detection method based on dynamic upsampling and multidimensional attention mechanism according to claim 2, characterized in that, The MDPIOU loss function is expressed as follows: ; in, , , , These are the coordinates of the top-left corner of the predicted bounding box and the ground truth bounding box, respectively. Then it is , The distance between two points , To predict the coordinates of the bottom right corner of the bounding box and the ground truth bounding box, Then it is , The distance between two points and The height and width of the image. To predict the area of ​​the overlap between the bounding box and the actual bounding box.

4. The infrared target detection method based on dynamic upsampling and multidimensional attention mechanism according to claim 1, characterized in that, The backbone network consists of five CBS units, numbered 1 to 5, and four C2f modules, numbered 1 to 4. The internal connection of the backbone network is as follows: CBS unit 1, CBS unit 2, C2f module 1, CBS unit 3, C2f module 2, CBS unit 4, C2f module 3, CBS unit 5, C2f module 4, and SPPF module are connected in series. The neck network consists of four splicing modules, designated as the 1st to 4th splicing contact modules; two Dysample modules, designated as the 1st and 2nd Dysample modules; and six CBS units, designated as the 6th to 10th CBS units. The output of the 1st contact module is connected to the input of the 7th CBS unit. The 7th, 8th, 3rd, 9th, 10th, 4th, and 11th CBS units are connected in series. The input of the 2nd Dysample module is connected to the output of the SPPF module. The 2nd Dysample module, 2nd contact module, 6th CBS module, and 1st Dysample module are connected in series. The input of the 1st contact module is connected to both the output of the 1st Dysample module and the output of the 2nd CBS unit. The output of the 3rd C2F module is connected to the input of the 2nd contact module. The three CBS units in the detection head are CBS units 12 to 14. The input of CBS unit 12 is connected to the output of CBS unit 7, the input of CBS unit 13 is connected to the output of CBS unit 9, the input of CBS unit 14 is connected to the output of CBS unit 11, and the outputs of CBS units 12 to 14 are connected to the inputs of the corresponding multidimensional attention mechanism modules. The output of each multidimensional attention mechanism module is connected to the corresponding coupling head.

5. The infrared target detection method based on dynamic upsampling and multidimensional attention mechanism according to claim 1, characterized in that, Each CBS unit consists of a two-dimensional convolutional layer, a batch normalization layer, and a SiLU activation function connected in sequence; each Dysample module consists of a 1×1 two-dimensional convolutional layer with 32 output channels, a sub-pixel convolutional module, and a grid sampling module; the 1×1 two-dimensional convolutional layer with 32 output channels takes the feature map as input, and the output is multiplied by a static range factor and then added to a coordinate grid matrix before being input to the sub-pixel convolutional module, which also takes the feature map as input.

6. The infrared target detection method based on dynamic upsampling and multidimensional attention mechanism according to claim 1, characterized in that, Each of the aforementioned multi-dimensional attention mechanism modules is used for: a) Input three feature maps with the same number of channels but different scales, output by the neck network. The large-scale feature map is denoted as... Mesoscale feature map Small-scale feature maps ; b, let ; c, Calculate using the offset and mask modules Set the offset and mask, and create a new variable. The number of feature maps used for statistical fusion is initialized to 0. ; d, combine offset, mask, and feature map The feature map is obtained by feeding it into the Spatial Attn mid module. Then The scaling factor is obtained by inputting it into the Scale Attn module. ,Then and Multiplication yields the feature map Finally, ; e, create a new variable Initialized to ; f, if If the value is greater than or equal to 2, then the offset, mask, and feature map will be used. The feature map is obtained by feeding it into the Spatial Attn low module. Then The scaling factor is obtained by inputting it into the Scale Attn module. ,Then and Multiplication yields the feature map and order , and From feature maps of different scales, finally let ; g, if Less than or equal to 2, set the offset, mask, and feature map. The feature map is obtained by feeding it into the Spatial Attn high module. Then The scaling factor is obtained by inputting it into the Scale Attn module. ,Then and Multiplication yields the feature map and order , ; h, let ,Will The feature map is obtained by sending it to Channel Attn. ; i, let and return c; j, judgment If the value is 3, then three feature maps are obtained. , Scale and same.

7. The infrared target detection method based on dynamic upsampling and multidimensional attention mechanism according to claim 2, characterized in that, S200 includes: The infrared image to be detected is input into a trained target detection network model. The backbone network of the target detection network model extracts low-level, mid-level, and high-level features of the infrared image to be detected. The neck network fuses the low-level, mid-level, and high-level features to obtain feature maps of different scales. The detection head detects the feature maps of different scales to obtain the target category and target location in the infrared image to be detected.