High-altitude infrared target detection method and device based on hierarchical region attention and high-frequency coordinate filtering

By employing a hierarchical region attention and high-frequency coordinate filtering method, the challenges of extracting global contextual information and local fine-grained features in high-altitude infrared target detection are solved, improving detection accuracy and positioning precision. This method is applicable to practical applications such as UAV remote sensing and maritime search and rescue.

CN121884192APending Publication Date: 2026-04-17GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG UNIV OF TECH
Filing Date
2026-01-14
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing infrared imaging technology struggles to effectively extract global contextual information and local fine-grained features in the detection of small targets at long distances in high altitudes. It also lacks the ability to adaptively balance high-frequency edge details with low-frequency semantic information, resulting in insufficient detection accuracy and positioning precision.

Method used

A hierarchical region attention and high-frequency coordinate filtering method is adopted. Multi-scale feature maps are extracted through a hierarchical layered attention module. Feature fusion and enhancement are performed by combining adaptive content awareness and coordinate space attention filter. Finally, a coordinate attention detection head is used for target classification and bounding box regression.

Benefits of technology

It improves the accuracy and robustness of high-altitude infrared target detection, enhances the ability to represent the features of small and faint targets, increases the sensitivity of the detection head to the spatial position of the target, and reduces network complexity, making it suitable for UAV remote sensing and maritime search and rescue scenarios with high real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884192A_ABST
    Figure CN121884192A_ABST
Patent Text Reader

Abstract

The invention discloses a high-altitude infrared target detection method and device based on hierarchical region attention and high-frequency coordinate filtering, and belongs to the technical field of infrared imaging and target detection. Aiming at the problems of insufficient multi-scale region perception, high-frequency edge feature loss and low spatial positioning precision existing in the existing infrared target detection method, the method comprises the following steps of: extracting multi-scale features by constructing a feature extraction backbone network comprising a hierarchical attention module; a feature fusion network integrating adaptive content awareness and a coordinate space attention filter is adopted to fuse and enhance features so as to suppress background noise and enhance edges; a coordinate attention detection head is used for target classification and bounding box regression, and the spatial position sensing ability is enhanced. The method improves the detection precision and positioning accuracy of the small target in the high-altitude infrared image, and is suitable for the fields of unmanned aerial vehicle remote sensing monitoring, border patrol, maritime search and rescue and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of infrared imaging and target detection technology, and particularly relates to a method and device for high-altitude infrared target detection based on hierarchical region attention and high-frequency coordinate filtering. Background Technology

[0002] Infrared imaging technology, by capturing the thermal radiation characteristics of objects, demonstrates its advantages in remote sensing monitoring, drone reconnaissance, and security surveillance, exhibiting strong all-weather adaptability and outstanding penetration capabilities. This technology effectively overcomes lighting limitations, providing stable image information even under adverse conditions such as smoke and haze, making it particularly suitable for complex scenarios such as high-altitude, long-distance target identification. In recent years, deep learning-based target detection methods have provided a new technical approach for automatically identifying targets from infrared images. However, when dealing with real-world complex scenarios such as high altitudes, long distances, and small targets, existing methods still have significant limitations, restricting their detection accuracy and practical effectiveness.

[0003] Specifically, firstly, traditional convolutional neural networks typically employ a single-scale attention mechanism with a fixed receptive field. This structure struggles to effectively model both global contextual information and fine-grained local features simultaneously. In high-altitude infrared scenes, target scales vary drastically, and the spatial localization information of small targets is easily diluted and submerged during layer-by-layer feature extraction, resulting in insufficient model perception of small targets. Secondly, existing methods often lack the ability to adaptively balance high-frequency edge details and low-frequency semantic information when performing multi-level feature fusion. This causes the key contour features of infrared targets with ambiguous boundaries to be gradually smoothed during propagation in deep networks, reducing the accuracy of detection boxes and failing to meet the stringent precision requirements of practical applications. Furthermore, most mainstream detection heads are designed with a focus on the classification and regression of general objects, neglecting the inherent directional sensitivity of infrared targets, especially small targets at long distances, in spatial coordinates. This design flaw leads to severe localization biases when dealing with dense groups of small targets with significant positional shifts, affecting subsequent tracking and analysis. Therefore, developing an infrared target detection method capable of hierarchical multi-scale regional perception, adaptive enhancement of high-frequency edge features, and precise spatial location perception is of urgent need and great significance for improving the target recognition accuracy and real-time processing capabilities in key scenarios such as high-altitude monitoring, UAV remote sensing, and maritime search and rescue. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes a method and apparatus for detecting high-altitude infrared targets based on hierarchical region attention and high-frequency coordinate filtering, thereby resolving the issues present in the prior art.

[0005] In a first aspect, to achieve the above objectives, the present invention provides a high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering, comprising the following steps: Acquire infrared images of high-altitude scenes; The infrared image is input into a target detection network, which includes a feature extraction backbone network, a feature fusion network, and a detection head connected in sequence. The feature extraction backbone network extracts multi-scale feature maps through a hierarchical attention module. The feature fusion network uses an adaptive content-aware and coordinate space attention filter to fuse and enhance multi-scale feature maps from the feature extraction backbone network, and outputs enhanced feature maps for detection. The detection head is a coordinate attention detection head, which performs target classification and bounding box regression based on the enhanced feature map and outputs the detection results.

[0006] Optionally, the hierarchical attention module extracts multi-scale feature maps including: Channel dimensionality reduction is performed on the input features to obtain the basic features; The basic features are input into a sequence consisting of n hierarchical regional attention bottleneck units for processing; The execution process of each hierarchical regional attention bottleneck unit includes: generating fused features through a hierarchical multi-scale attention mechanism; nonlinearly modulating the fused features through a gating enhancement module and performing a first residual connection with the unit's original input to obtain intermediate features; processing the intermediate features through a feedforward neural network and performing a second residual connection to obtain the unit's output features. The output features of all bottleneck units in the sequence are concatenated and fused with the basic features, and residual connections are made with the original input of the module to output the final features.

[0007] Optionally, the execution process of a hierarchical multi-scale attention mechanism includes: The original input features of the bottleneck unit are processed by the weight generation module to generate normalized weight vectors corresponding to different scales. The original input features are processed in parallel by a region attention module, and multi-scale features corresponding to different scales are output. The normalized weight vector is used to weight the corresponding multi-scale features, and the aggregated features are obtained by concatenating them in the channel dimension. The aggregated features are input into the scale fusion layer for dimensionality reduction and interaction, and the fused features are output.

[0008] Optionally, the execution process of the adaptive content-aware and coordinate-space attention filter includes: Input features are fed in parallel into the high-frequency content-aware path and the hole coordinate space attention path; The high-frequency content perception path extracts features through a global three-dimensional attention mechanism and a high-frequency edge enhancement branch to obtain the first path output; The void coordinate spatial attention path performs spatial calibration on the query and key features through a multi-scale spatial operation unit, and uses the calibrated features to interact and obtain the second path output. The first path output and the second path output are multiplied by the learnable weight coefficients respectively, and then summed to obtain the fused path output; The output of the fusion path is residually connected to the original input of the filter to output the final feature.

[0009] Optionally, the execution process of multi-scale spatial operation units in the hollow coordinate space attention path includes: Decompose the input features into query features, key features, and value features; The query features and key features are respectively input into the local detail branch and the wide context branch for processing; The outputs of the two branches are concatenated along the channel dimension to generate a spatial calibration map; The original query features and key features are weighted and modulated using the spatial calibration map to obtain the calibrated query features and key features.

[0010] Optionally, the process of the coordinate attention detection head performing target classification and bounding box regression based on the enhanced feature map includes: For each scale of the enhanced feature map in the input, a decoupled bounding box regression branch and a class prediction branch are constructed respectively. In each branch, the input features are passed sequentially through a convolutional layer, a coordinate attention module, another convolutional layer, and an output mapping layer. The execution process of the coordinate attention module includes: pooling and encoding the input features along the horizontal and vertical directions respectively to generate direction-aware feature vectors; concatenating, fusing and reducing the dimensionality of the feature vectors in the two directions, and then dividing them into independent horizontal and vertical attention weights; multiplying the horizontal and vertical attention weights with the original input features of the module to output the enhanced features.

[0011] Optionally, in the coordinate attention module, the process of pooling and encoding the input features along the horizontal and vertical directions respectively includes: For each channel of the input feature, a pooling kernel of size (1, W) is used to encode it along the vertical direction to generate a vertical feature vector; For each channel of the input feature, a pooling kernel of size (H, 1) is used to encode along the horizontal direction to generate a horizontal feature vector.

[0012] Secondly, the present invention also provides a high-altitude infrared target detection device based on hierarchical region attention and high-frequency coordinate filtering, for implementing a high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering, the device comprising: Computers, wireless image transmission modules, infrared cameras, and drones; The drone is equipped with the infrared camera; The infrared camera is communicatively connected to the wireless image transmission module and is used to acquire infrared images of high-altitude scenes and transmit them through the wireless image transmission module. The computer is communicatively connected to the wireless image transmission module to receive the infrared image, run a target detection program to process the infrared image and output the detection result. The target detection program integrates a hierarchical attention module, an adaptive content-aware and coordinate space attention filter, and a coordinate attention detection head.

[0013] Thirdly, the present invention also provides a computer terminal device, comprising: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering in the first aspect described above.

[0014] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of the high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering in the first aspect described above.

[0015] Compared with the prior art, the present invention has the following advantages and technical effects: This invention provides a method and apparatus for high-altitude infrared target detection based on hierarchical region attention and high-frequency coordinate filtering. By introducing a hierarchical layered attention module, it effectively extracts and fuses global, medium, and fine-grained multi-level features from infrared images, enhancing the feature representation capability for small and faint high-altitude targets and solving the problem of feature obscuring of small targets in deep networks. This invention adaptively fuses high-frequency edge features and long-distance spatial context information through adaptive content-aware and coordinate space attention filters, accurately capturing target contours and suppressing complex background interference, thus improving detection accuracy and robustness. This invention introduces a direction-sensitive position-aware mechanism through a coordinate attention detection head, enhancing the detection head's sensitivity to target spatial location and significantly improving bounding box positioning accuracy. While ensuring high performance, this invention reduces network complexity and improves computational efficiency through a lightweight attention design, making it suitable for practical applications such as UAV remote sensing, border patrol, and maritime search and rescue where real-time requirements are high. Attached Figure Description

[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of a high-altitude infrared target detection device based on hierarchical region attention and high-frequency coordinate filtering according to an embodiment of the present invention, wherein 101-computer, 102-wireless image transmission module, 103-infrared camera, 104-UAV, and 105-the object to be detected. Figure 2 This is a schematic diagram of the overall architecture of the detection network according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the hierarchical attention module according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of the hierarchical region attention bottleneck unit according to an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the principle of the hierarchical multi-scale attention mechanism in an embodiment of the present invention. Figure 6 This is a schematic diagram of the adaptive content-aware and coordinate space attention filter according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the coordinate attention detection head according to an embodiment of the present invention. Detailed Implementation

[0017] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0018] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0019] Example 1 like Figure 1 As shown, this embodiment provides a high-altitude infrared target detection device based on hierarchical region attention and high-frequency coordinate filtering, comprising: Computer 101, wireless image transmission module 102, infrared camera 103, and drone 104; The drone 104 is equipped with the infrared camera 103; The infrared camera 103 is communicatively connected to the wireless image transmission module 102, and is used to acquire infrared images of the high-altitude scene of the inspected object 105 and transmit them through the wireless image transmission module. The computer 103 is communicatively connected to the wireless image transmission module 102, and is used to receive the infrared image, run a target detection program to process the infrared image and output the detection result. The target detection program integrates a hierarchical attention module, an adaptive content-aware and coordinate space attention filter, and a coordinate attention detection head.

[0020] Example 2 like Figure 2 As shown, this embodiment provides a high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering, including: Acquire infrared images of high-altitude scenes; The infrared image is input into a target detection network, which includes a feature extraction backbone network, a feature fusion network, and a detection head connected in sequence. The feature extraction backbone network extracts multi-scale feature maps through a hierarchical attention module. The feature fusion network uses an adaptive content-aware and coordinate space attention filter to fuse and enhance multi-scale feature maps from the feature extraction backbone network, and outputs enhanced feature maps for detection. The detection head is a coordinate attention detection head, which performs target classification and bounding box regression based on the enhanced feature map and outputs the detection results.

[0021] Further, step 1: Use an infrared camera mounted on a drone to capture high-altitude scene images and construct a high-altitude infrared target detection dataset. , where the dataset The total number of elements in the middle is =3000, image size is , The number of image channels. Image height, [Image width]. Image annotation was performed using the open-source tool labelImg, with annotations including the infrared target category and the coordinates of the top-left and bottom-right corners of the detected target. The annotated information file is in XML format.

[0022] Step 2.1: Set up as follows Figure 2 The network model shown includes a Backbone feature extraction network with a hierarchical attention module, a Neck feature extraction network integrating adaptive content awareness and coordinate space attention filters, and a coordinate attention detection head structure.

[0023] The size is The infrared image is used as input to the Backbone of the network model. The Backbone extracts features through a series of convolutional layers, a C3k2 module, and a hierarchical attention module. The hierarchical attention module effectively preserves fine-grained features in the high-altitude infrared image by using a three-level region attention mechanism combined with adaptive weight fusion and small target enhancement gating. The Backbone outputs three feature maps at different scales, namely P3, P4, and P5 levels. In this embodiment, they are defined as follows: Its specific scale and number of channels are as follows: , ,as well as .

[0024] In the Neck of the network model, to achieve efficient feature map fusion and enhanced detection of small targets, this embodiment constructs a feature pyramid network based on adaptive filtering. This network includes two paths: top-down and bottom-up. The top-down path starts from the highest-level feature map of the Backbone. (Right now Starting with ), upsampling is performed level by level and compared with the feature maps of the corresponding layers of the Backbone. The feature maps are then concatenated. After concatenation, the feature maps are fed into an adaptive content-aware and coordinate space attention filter. This filter comprises two branches: high-frequency edge enhancement and holed coordinate space attention, which are implemented using learnable parameters. and Adaptive weight fusion is performed to suppress background noise in both the frequency and spatial domains. Semantic information is then further integrated through a hierarchical attention module. The bottom-up path starts with the P3-level features generated by the top-down path, downsamples them using convolutions with a stride of 2, and then concatenates and fuses them with the feature maps of the corresponding levels. The fused feature maps are then passed through the hierarchical attention module again, ultimately generating P3, P4, and P5-level features containing rich localization information.

[0025] After fusion and enhancement by the Neck network, three feature maps are finally output for detection. In this embodiment, they are defined as follows: These three feature maps cover targets of small, medium, and large scales, with specific scales and number of channels as follows: , ,as well as .

[0026] Finally, these three output feature maps The data is fed into a coordinate attention detection head to complete the final classification and bounding box regression of the target. The coordinate attention detection head introduces position-sensitive attention mechanisms in the horizontal and vertical directions, which addresses the problem of poor spatial position sensitivity of targets in infrared images. This enhances the localization perception capability of bounding box regression and classification tasks, thereby significantly improving the detection accuracy of small and faint targets at high altitudes.

[0027] Furthermore, the hierarchical attention module extracts multi-scale feature maps, including: Channel dimensionality reduction is performed on the input features to obtain the basic features; The basic features are input into a sequence consisting of n hierarchical regional attention bottleneck units for processing; The execution process of each hierarchical regional attention bottleneck unit includes: generating fused features through a hierarchical multi-scale attention mechanism; nonlinearly modulating the fused features through a gating enhancement module and performing a first residual connection with the unit's original input to obtain intermediate features; processing the intermediate features through a feedforward neural network and performing a second residual connection to obtain the unit's output features. The output features of all bottleneck units in the sequence are concatenated and fused with the basic features, and residual connections are made with the original input of the module to output the final features.

[0028] Furthermore, the execution process of the hierarchical multi-scale attention mechanism includes: The original input features of the bottleneck unit are processed by the weight generation module to generate normalized weight vectors corresponding to different scales. The original input features are processed in parallel by a region attention module, and multi-scale features corresponding to different scales are output. The normalized weight vector is used to weight the corresponding multi-scale features, and the aggregated features are obtained by concatenating them in the channel dimension. The aggregated features are input into the scale fusion layer for dimensionality reduction and interaction, and the fused features are output.

[0029] Specifically, the implementation process of this embodiment includes: Step 2.2: Hierarchical attention modules, such as Figure 3 As shown, this module addresses the problem of large target scales and the easy obscuration of small target features in high-altitude infrared images by reconstructing the bottleneck structure of the feature pyramid. Assume the input feature map of the module is... First, the input feature map is processed through... Convolution performs channel reduction to generate basic features. To enhance feature reuse capabilities, a cross-stage partial network structure is adopted. Input to by In a sequence composed of hierarchical regional attention bottleneck units.

[0030] The structure of the hierarchical regional attention bottleneck unit is as follows: Figure 4 As shown, it integrates a core hierarchical multi-scale attention mechanism, a gating enhancement module, and a feedforward neural network. The hierarchical multi-scale attention mechanism is as follows: Figure 5 As shown, it mainly consists of a weight generation module, an Area-attn module, and a weighted fusion module. First, the weight generation module aims to adaptively determine the importance of targets at different scales in the input features. This module receives input... Spatial information is compressed through global average pooling, and then sequentially processed through compressed convolution. ReLU activation function and extended convolution To capture the non-linear dependencies between channels, the Softmax function is used to generate normalized weight vectors for three scales. The process is described as follows: ; in, These correspond to the weighting coefficients of the global region, the 4-point region, and the 16-point fine-grained region in the subsequent Area-attn, respectively.

[0031] Secondly, Area-attn is responsible for extracting feature information of different granularities in parallel. This module contains three parallel processing branches, which take input features as input. Simultaneously, the input enters these three branches. The first branch is a global attention branch (Area=1), capturing long-range context; the second branch is a medium-scale attention branch (Area=4), focusing on local region features; and the third branch is a fine-grained attention branch (Area=16), specifically designed to capture texture details of small objects. Each branch divides the feature map into corresponding... Each sub-region is processed and self-attention is calculated to output multi-scale features. .

[0032] Subsequently, the weighted fusion module receives the aforementioned weights and features. First, it utilizes the output of the weight generation module... The features output by Area-attn are weighted element-wise and then concatenated along the channel dimension to obtain aggregated features. Then, through a process involving " Convolution-Batch Normalization-ReLU The fusion layer consisting of "convolution-batch normalization" It fully mixes semantic information across scales and outputs fused features. : ; ; Finally, a gating enhancement module is used to further enhance the feature response to small, faint targets. This module enhances the fused features. Perform grouped depthwise convolution To extract high-frequency edge details, and then pass them through the Sigmoid function. Generate gating coefficients This coefficient is used to nonlinearly modulate the fused features and compared with the original input. Add them together to get the intermediate output. .final, After processing by a feedforward neural network (MLP) and performing residual connections again, the final output of the bottleneck unit is obtained. : ; ; ; The entire hierarchical attention module ultimately concatenates and fuses the outputs of all bottleneck units with the basic features, and introduces learnable parameters. With input Perform residual connections to output the final features. .

[0033] Furthermore, the execution process of the adaptive content-aware and coordinate-space attention filter includes: Input features are fed in parallel into the high-frequency content-aware path and the hole coordinate space attention path; The high-frequency content perception path extracts features through a global three-dimensional attention mechanism and a high-frequency edge enhancement branch to obtain the first path output; The void coordinate spatial attention path performs spatial calibration on the query and key features through a multi-scale spatial operation unit, and uses the calibrated features to interact and obtain the second path output. The first path output and the second path output are multiplied by the learnable weight coefficients respectively, and then summed to obtain the fused path output; The output of the fusion path is residually connected to the original input of the filter to output the final feature.

[0034] Specifically, the implementation process of this embodiment includes: Step 2.3: Adaptive content-aware and coordinate space attention filter, as shown below Figure 6 As shown, this module is designed with a dual-stream parallel structure, aiming to simultaneously solve the problems of edge blurring and inaccurate spatial positioning in infrared images. Assume the input features are... This module includes a high-frequency content awareness path and a void coordinate space attention path, and performs soft fusion through learnable parameters.

[0035] The first path is the high-frequency content-aware path, whose feature extraction process consists of two parts: global 3D attention and high-frequency edge enhancement. First, the input features are expanded into a 3D tensor. ,use 3D convolution to generate queries ,key Sum To capture the joint correlation between channels and space, 3D depthwise convolution is used for feature interaction to compute a global attention map. Simultaneously, unbiased grouped convolution is used to extract clean high-frequency edge texture features. The path output is obtained by adding the two feature sets. The mathematical expression of this process is as follows: ; ; ; in, A learnable temperature coefficient, This is for output projection layer.

[0036] Furthermore, the execution process of multi-scale spatial operation units in the hollow coordinate space attention path includes: Decompose the input features into query features, key features, and value features; The query features and key features are respectively input into the local detail branch and the wide context branch for processing; The outputs of the two branches are concatenated along the channel dimension to generate a spatial calibration map; The original query features and key features are weighted and modulated using the spatial calibration map to obtain the calibrated query features and key features.

[0037] Specifically, the implementation process of this embodiment includes: The second path is the hollow coordinate space attention path, which focuses on using multi-scale spatial operation units to spatially calibrate the query and key. The input features are decomposed by convolution. .for and Each through local detail branches ( Convolution and wide-area context branches (dilation rate) of Processed using dilated convolution. The outputs of the two branches are concatenated through channels and then... Convolution and Sigmoid activation function Generate space calibration map And thus the original Weighted modulation is performed to obtain This spatial operation is described as follows: ; ; ; Subsequently, after calibration and Add them together and then pass them through a depthwise convolution. Perform feature interactions, and finally with values. Multiplication yields the path output. : ; Finally, to achieve dynamic adaptation to different infrared scenes, the module introduces two learnable scalar parameters. and These two parameters are normalized using the Sigmoid function and used as the fusion weights for the two paths. The fused features are then compared with the input. (or its shortcut mapping) perform residual connections to obtain the final output. : ; ; This design ensures that the network can adaptively balance high-frequency texture information with long-distance spatial positioning information according to the characteristics of the target.

[0038] Furthermore, the process of target classification and bounding box regression based on the enhanced feature map by the coordinate attention detection head includes: For each scale of the enhanced feature map in the input, a decoupled bounding box regression branch and a class prediction branch are constructed respectively. In each branch, the input features are passed sequentially through a convolutional layer, a coordinate attention module, another convolutional layer, and an output mapping layer. The execution process of the coordinate attention module includes: pooling and encoding the input features along the horizontal and vertical directions respectively to generate direction-aware feature vectors; concatenating, fusing and reducing the dimensionality of the feature vectors in the two directions, and then dividing them into independent horizontal and vertical attention weights; multiplying the horizontal and vertical attention weights with the original input features of the module to output the enhanced features.

[0039] Specifically, the implementation process of this embodiment includes: Step 2.4: Coordinate attention detection head structure as follows Figure 7 As shown, this module aims to address the problem of spatial location information loss in high-altitude infrared small target detection using traditional decoupled detection heads. Traditional detection heads typically employ global pooling or standard convolution, easily overlooking the positional sensitivity of small targets. The coordinate attention detection head proposed in this embodiment receives three feature maps of different scales from the Neck output. For each scale, a decoupled bounding box regression branch and a category prediction branch are constructed respectively.

[0040] Unlike traditional structures, both branches of this invention embed coordinate attention modules, forming an enhanced link of "convolution-coordinate attention-convolution-output mapping". Taking one branch as an example, assume the input feature map is... To capture precise location-aware information, the coordinate attention module first decomposes the global pooling operation into feature aggregation in two orthogonal directions. Specifically, it uses features of size [missing information] along the horizontal (X-axis) and vertical (Y-axis) directions respectively. and Pooling kernels for each channel Encode it.

[0041] For height is The Output of each channel The calculation formula is as follows: ; Similarly, for a width of The Output of each channel The calculation formula is as follows: ; The two transformations described above aggregate features from the vertical and horizontal directions, respectively, generating a set of orientation-aware feature maps. To utilize this directional information to capture spatial dependencies, the module uses the generated vertical feature vector... and horizontal eigenvectors (After transpose transformation) the pieces are spliced ​​together in spatial dimensions and connected through a shared... Convolution Transform Function Dimensionality reduction and fusion are performed to generate intermediate feature maps. This process can be described as follows: ; in, This indicates a splicing operation along a spatial dimension. For batch normalization, For Hard-Swish nonlinear activation function, It is an intermediate feature that contains both horizontal and vertical spatial information. To reduce the proportion.

[0042] Subsequently, in order to generate independent attention weights, intermediate features It is split into two independent feature tensors along the spatial dimension. and These two feature tensors are respectively passed through two independent convolution and Restore the number of channels to And combined with the Sigmoid activation function Generate the final attention weight map and The process is described as follows: ; Finally, the generated attention weights in the two directions are combined with the original input features. By performing multiplication and weighting, output features with precise position awareness are obtained. For the position in the feature map and channels Its output value is calculated as follows: ; After enhancement by the coordinate attention module, the features of the bounding box regression branch and the class prediction branch are respectively processed through a... The convolutional layer performs further feature extraction, and finally, through... The convolutional layer maps to the prediction space. The bounding box branch output dimension is... This is used to predict the distribution of the target bounding box; the output dimension of the category branch is... This is used to predict the probability of target categories. This design allows the detector head to significantly enhance the positioning accuracy and classification accuracy of small high-altitude infrared targets without significantly increasing the computational load.

[0043] Step 3: The training method includes first freezing the weights of the backbone network, then training only the parameters of the hierarchical attention module, adaptive content-aware and coordinate space attention filter, and coordinate attention detection head proposed in this embodiment. After training for multiple epochs, all weights are unfrozen, and the entire network is jointly trained for multiple epochs. The loss function used is consistent with the loss function in YOLOv12. Network training parameters are set as follows: learning rate (lr), batch size, training set / validation set partitioning, optimizer, and training epoch.

[0044] Step 4: Use the trained network for prediction. Input the test image, and output the predicted target bounding box in the infrared image. First, input the image to be tested... The image size is input into the network. After feature extraction by the backbone network, the features are fused into multi-scale regions using a hierarchical attention module. Subsequently, in the Neck feature extraction network, adaptive content-aware and coordinate space attention filters are used to enhance high-frequency edge features and suppress background interference. Finally, the coordinate attention detection head completes network inference, yielding the output of the detection head. The scale of the output feature map is... , and The three feature maps correspond to the three detection layers P3, P4, and P5, respectively. The classification and regression prediction results are extracted from the feature maps at different scales and then concatenated and transformed in dimension. For ease of processing, the original channel dimension is moved to the end, resulting in the following shapes for the class prediction branch and bounding box prediction branch: and ,in Image batch processing size, For the number of prediction points, The preset number of categories. All targets are sorted in descending order of their presence confidence (conf), and then the IoU (Interval) with other predictions is calculated for each target from highest to lowest. Targets with IoU greater than a certain threshold (e.g., ...) are discarded. The prediction of the detection boxes is then performed. Following the previous preprocessing, the remaining detection boxes are restored to the original image scale before network output, and non-maximum suppression (NMS) is applied to remove redundant detection boxes. The number of output detection boxes does not exceed a preset maximum number of detections (e.g., ...). ).

[0045] Obtain the coordinate position of the described detection box. The corresponding normalized position coordinates The bounding box is then plotted on the test image. If a detection box is output for the image to be detected, it means that the target has been detected in the infrared image; otherwise, it means that the target has not been detected.

[0046] In this embodiment, a computer terminal device is provided, including: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering described above.

[0047] In this embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the above-described high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering.

[0048] In this embodiment, an electronic device is also provided, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to perform the steps of the above-described high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering.

[0049] The aforementioned program can run on a processor or be stored in memory (or a computer-readable medium). Computer-readable media includes both permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0050] These computer programs may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps for the functions specified in one or more boxes can be implemented by different modules for different steps.

[0051] This invention provides a method and apparatus for high-altitude infrared target detection based on hierarchical region attention and high-frequency coordinate filtering. By introducing a hierarchical layered attention module, it effectively extracts and fuses global, medium, and fine-grained multi-level features from infrared images, enhancing the feature representation capability for small and faint high-altitude targets and solving the problem of feature obscuring of small targets in deep networks. This invention adaptively fuses high-frequency edge features and long-distance spatial context information through adaptive content-aware and coordinate space attention filters, accurately capturing target contours and suppressing complex background interference, thus improving detection accuracy and robustness. This invention introduces a direction-sensitive position-aware mechanism through a coordinate attention detection head, enhancing the detection head's sensitivity to target spatial location and significantly improving bounding box positioning accuracy. While ensuring high performance, this invention reduces network complexity and improves computational efficiency through a lightweight attention design, making it suitable for practical applications such as UAV remote sensing, border patrol, and maritime search and rescue where real-time requirements are high.

[0052] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A high-altitude infrared target detection method based on hierarchical region attention and high-frequency coordinate filtering, characterized in that, Includes the following steps: Acquire infrared images of high-altitude scenes; The infrared image is input into a target detection network, which includes a feature extraction backbone network, a feature fusion network, and a detection head connected in sequence. The feature extraction backbone network extracts multi-scale feature maps through a hierarchical attention module. The feature fusion network uses an adaptive content-aware and coordinate space attention filter to fuse and enhance multi-scale feature maps from the feature extraction backbone network, and outputs enhanced feature maps for detection. The detection head is a coordinate attention detection head, which performs target classification and bounding box regression based on the enhanced feature map and outputs the detection results.

2. The method according to claim 1, characterized in that, The hierarchical attention module extracts multi-scale feature maps, including: Channel dimensionality reduction is performed on the input features to obtain the basic features; The basic features are input into a sequence consisting of n hierarchical regional attention bottleneck units for processing; The execution process of each hierarchical regional attention bottleneck unit includes: generating fused features through a hierarchical multi-scale attention mechanism; nonlinearly modulating the fused features through a gating enhancement module and performing a first residual connection with the unit's original input to obtain intermediate features; processing the intermediate features through a feedforward neural network and performing a second residual connection to obtain the unit's output features. The output features of all bottleneck units in the sequence are concatenated and fused with the basic features, and residual connections are made with the original input of the module to output the final features.

3. The method according to claim 2, characterized in that, The execution process of the hierarchical multi-scale attention mechanism includes: The original input features of the bottleneck unit are processed by the weight generation module to generate normalized weight vectors corresponding to different scales. The original input features are processed in parallel by a region attention module, and multi-scale features corresponding to different scales are output. The normalized weight vector is used to weight the corresponding multi-scale features, and the aggregated features are obtained by concatenating them in the channel dimension. The aggregated features are input into the scale fusion layer for dimensionality reduction and interaction, and the fused features are output.

4. The method according to claim 1, characterized in that, The execution process of the adaptive content-aware and coordinate-space attention filter includes: Input features are fed in parallel into the high-frequency content-aware path and the hole coordinate space attention path; The high-frequency content perception path extracts features through a global three-dimensional attention mechanism and a high-frequency edge enhancement branch to obtain the first path output; The void coordinate spatial attention path performs spatial calibration on the query and key features through a multi-scale spatial operation unit, and uses the calibrated features to interact and obtain the second path output. The first path output and the second path output are multiplied by the learnable weight coefficients respectively, and then summed to obtain the fused path output; The output of the fusion path is residually connected to the original input of the filter to output the final feature.

5. The method according to claim 4, characterized in that, The execution process of multi-scale spatial operation units in the hollow coordinate space attention path includes: Decompose the input features into query features, key features, and value features; The query features and key features are respectively input into the local detail branch and the wide context branch for processing; The outputs of the two branches are concatenated along the channel dimension to generate a spatial calibration map; The original query features and key features are weighted and modulated using the spatial calibration map to obtain the calibrated query features and key features.

6. The method according to claim 1, characterized in that, The process of target classification and bounding box regression based on enhanced feature maps by the coordinate attention detection head includes: For each scale of the enhanced feature map in the input, a decoupled bounding box regression branch and a class prediction branch are constructed respectively. In each branch, the input features are passed sequentially through a convolutional layer, a coordinate attention module, another convolutional layer, and an output mapping layer. The execution process of the coordinate attention module includes: pooling and encoding the input features along the horizontal and vertical directions respectively to generate direction-aware feature vectors; concatenating, fusing and reducing the dimensionality of the feature vectors in the two directions, and then dividing them into independent horizontal and vertical attention weights; multiplying the horizontal and vertical attention weights with the original input features of the module to output the enhanced features.

7. The method according to claim 6, characterized in that, In the coordinate attention module, the process of pooling and encoding the input features along the horizontal and vertical directions respectively includes: For each channel of the input feature, a pooling kernel of size (1, W) is used to encode it along the vertical direction to generate a vertical feature vector; For each channel of the input feature, a pooling kernel of size (H, 1) is used to encode along the horizontal direction to generate a horizontal feature vector.

8. A high-altitude infrared target detection device based on hierarchical region attention and high-frequency coordinate filtering, characterized in that, For implementing the method according to any one of claims 1-7, the apparatus comprises: Computers, wireless image transmission modules, infrared cameras, and drones; The drone is equipped with the infrared camera; The infrared camera is communicatively connected to the wireless image transmission module and is used to acquire infrared images of high-altitude scenes and transmit them through the wireless image transmission module. The computer is communicatively connected to the wireless image transmission module to receive the infrared image, run a target detection program to process the infrared image and output the detection result. The target detection program integrates a hierarchical attention module, an adaptive content-aware and coordinate space attention filter, and a coordinate attention detection head.

9. A computer terminal device, characterized in that, include: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the steps of the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.