A method and system for detecting targets of low-altitude unmanned aerial vehicles (UAVs)
By combining the ResNet backbone network and multi-class semantic enhancement modules, the problem of detection accuracy of small targets in complex backgrounds in low-altitude UAV target detection is solved, achieving high-precision and robust target detection.
Patent Information
- Application Number
- CN202510197019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-02-21
AI Technical Summary
Existing infrared target detection algorithms suffer from low accuracy in detecting small targets in low-altitude UAVs, and are easily obscured or confused in complex backgrounds. They are particularly difficult to achieve high-precision detection under different lighting and weather conditions.
We employ a ResNet backbone network for multi-scale feature extraction, combined with a multi-class semantic enhancement module and a query refinement module. Through cross-level information interaction and multi-head self-attention mechanism, we improve the expressive power of foreground features and the accuracy of target detection.
It improves the accuracy and robustness of low-altitude UAV target detection, especially the ability to detect small targets in complex backgrounds, and meets real-time requirements.
Smart Images

Figure CN120088683B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to a method and system for detecting targets from low-altitude unmanned aerial vehicles (UAVs). Background Technology
[0002] With the advancement of modern technology, low-altitude unmanned aerial vehicles (UAVs) are increasingly widely used in military, security, and emergency rescue fields. Low-altitude UAVs are characterized by their flexibility, stealth, and rapid deployment, enabling them to perform various tasks such as surveillance and reconnaissance, communication relay, and fire support. However, because UAVs typically fly in complex low-altitude environments, they face multiple challenges, including changing lighting conditions, weather interference, and cluttered ground backgrounds, significantly increasing the difficulty of real-time detection and identification. In complex environments, the target features of UAVs are often small and inconspicuous, easily affected by ground objects, leading to misidentification or missed detection. Therefore, improving the accuracy and robustness of low-altitude UAV target detection has become a current research hotspot.
[0003] Infrared technology, as an important sensing method, can effectively address these challenges. Because infrared sensors can capture the thermal radiation characteristics of target objects, infrared imaging systems can clearly display UAV targets even at night or in adverse environments with low visibility. Therefore, infrared images possess inherent resistance to changes in lighting conditions and can penetrate obstacles such as smoke and haze, providing stable perception in complex weather conditions. This characteristic makes infrared imaging an indispensable tool in low-altitude UAV detection missions. By capturing the temperature difference between the target and the background, infrared imaging not only enhances the visibility of small targets but also increases the effectiveness of detection in UAV covert operations. However, infrared images often suffer from low resolution, high noise levels, and insufficient contrast, resulting in blurred target features and further increasing the difficulty of detection.
[0004] Significant progress has been made in object detection algorithms in the field of computer vision. Convolutional Neural Network (CNN)-based methods, such as YOLO, Faster R-CNN, and SSD, can quickly and accurately detect targets in visible light images and are widely used in various application scenarios. However, the characteristics of infrared images make it difficult to directly transfer these algorithms. Infrared target detection for low-altitude UAVs is characterized by the detection of small targets, and UAVs typically fly against complex backgrounds, where targets are easily occluded or blended into the background. Existing infrared target detection algorithms exhibit certain limitations in complex environments and low-resolution images, especially when detecting small and dense targets. For small infrared targets like low-altitude UAVs, existing algorithms often struggle to achieve high-accuracy detection without sacrificing detection speed.
[0005] With the further development of deep learning technology, the Transformer architecture has been increasingly applied in computer vision tasks. In 2020, the Facebook team proposed the Detection Transformer (DETR) based on the Transformer architecture. This work was the first to introduce a self-attention mechanism into the field of object detection and reduced steps such as anchor box generation and non-maximum suppression (NMS) through ensemble prediction and bipartite graph matching methods, enabling the object detection model to be trained end-to-end. DETR showed good performance on standard object detection tasks, but due to the complexity of its bipartite graph matching and encoder design, the DETR model converged slowly and performed poorly in small object detection. To address these issues, Deformable DETR was developed. This model effectively narrowed the attention scope of the attention module by introducing deformable convolution and multi-scale feature extraction, achieving faster convergence and improving the detection capability for small objects. Therefore, Deformable DETR exhibits better performance in object detection tasks with complex backgrounds.
[0006] Despite significant progress in target detection, Deformable DETR still has limitations in low-altitude UAV target detection scenarios. UAVs flying at low altitudes have small and dispersed target features, and under varying lighting and weather conditions, targets are easily confused with the background. Traditional multi-scale feature extraction methods have limited effectiveness in fusing features at different scales. Furthermore, in complex background environments, relying solely on Deformable DETR's attention mechanism and multi-scale feature extraction often fails to adequately distinguish foreground targets from background noise, leading to decreased detection accuracy. Summary of the Invention
[0007] This invention provides a method and system for detecting low-altitude unmanned aerial vehicle (UAV) targets, in order to overcome the deficiencies in the existing technology.
[0008] In a first aspect, the present invention provides a method for detecting low-altitude unmanned aerial vehicle (UAV) targets, comprising:
[0009] Acquire image data captured by the drone's infrared camera;
[0010] The image data is subjected to multi-scale feature extraction using a ResNet backbone network to generate feature maps of different scales.
[0011] The feature maps at different scales are flattened into multi-scale feature sequences, which are then input into the encoding layer of the target detection model. The multi-class semantic enhancement module in the encoding layer enhances the foreground features of the multi-scale feature sequences to obtain enhanced multi-scale feature sequences.
[0012] The enhanced multi-scale feature sequence is restored to a restored multi-scale feature map, and the restored multi-scale feature map is passed to the query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map.
[0013] The enhanced multi-scale feature map is flattened again into a new multi-scale feature sequence, and the top k queries in the new multi-scale feature sequence are determined as the initial target queries.
[0014] The initial target query and the new multi-scale feature sequence are input into the decoder, and the target detection result is output.
[0015] According to the present invention, a low-altitude unmanned aerial vehicle (UAV) target detection method is provided, which extracts multi-scale features from the image data using a ResNet backbone network to generate feature maps at different scales, including:
[0016] Feature maps of different scales are extracted from the ResNet backbone network. ,in L=4 represents the feature map at different scales. It is the number of channels in each feature map. and They are the first The height and width of the layer feature map.
[0017] According to the present invention, a low-altitude unmanned aerial vehicle (UAV) target detection method flattens the feature maps of different scales into a multi-scale feature sequence, including:
[0018]
[0019] The Reshape operation transforms the feature map from... Flattened, it is a sequence with dimension . The sequence length is The Concat operation concatenates L feature sequences into a single long sequence. It is a multi-scale feature sequence.
[0020] According to a low-altitude unmanned aerial vehicle (UAV) target detection method provided by the present invention, the multi-scale feature sequence is input into the encoding layer of the target detection model, and the foreground features of the multi-class semantic enhancement module in the encoding layer are enhanced to obtain an enhanced multi-scale feature sequence, including:
[0021] The multi-category semantic enhancement module calculates the predicted score of each token in different categories by setting a linear classification head, and generates a category score matrix.
[0022] It has Tokens and Each category has a linear classification head that embeds the token's vector. Mapped to ,in The mapping process is as follows, depending on the dimension of the embedded vector:
[0023]
[0024] Where S contains Indicates the first Each token for the category The predicted score;
[0025] The multi-category semantic enhancement module is based on the category score matrix. Calculate the maximum predicted score for each token across all categories, and for the i-th token, select the maximum value across all categories as the significance score for that token. :
[0026]
[0027] Significance score Normalization is performed using the Softmax function to generate a semantic context score vector. :
[0028]
[0029] Indicates the total number of tokens;
[0030] Based on semantic context score To dynamically adjust query embedding The adjusted query embedding is obtained. :
[0031]
[0032] in Represents semantic context score With query embedding Element-by-element multiplication and The current level in the encoder The key and value matrix, This is the normalization factor.
[0033] According to the low-altitude unmanned aerial vehicle (UAV) target detection method provided by the present invention, the enhanced multi-scale feature sequence is restored to a restored multi-scale feature map, and the restored multi-scale feature map is passed to a query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map, including:
[0034] Feature Tokens at Adjacent Levels and A fusion structure based on RepVGGBlock is added between them, and the calculation process is as follows:
[0035]
[0036] Where Conv represents the convolution operation, Concat is the concatenation operation, and UP is the bilinear interpolation operation used to transform low-resolution feature maps. Upsampling to high-resolution feature maps Same space dimensions;
[0037] The alignment features are refined and fused layer by layer. conduct The convolution operation calculates the refined features using the following formula.
[0038]
[0039] in, The specific operation of convolution is as follows
[0040]
[0041] GC stands for grouped convolution. The ReLU activation function is used, and BN indicates batch normalization. These are weighting coefficients used to balance the contributions of input features.
[0042] According to a low-altitude unmanned aerial vehicle (UAV) target detection method provided by the present invention, the enhanced multi-scale feature map is flattened again into a new multi-scale feature sequence, and the top k queries in the new multi-scale feature sequence are determined as initial target queries, including:
[0043] The fused features Refined features are generated through residual connections.
[0044]
[0045] After cross-level feature fusion, the query refinement module selects the top k most significant queries as the initialization of the target query.
[0046] According to the present invention, a low-altitude unmanned aerial vehicle (UAV) target detection method is provided, wherein the initial target query and the new multi-scale feature sequence are input into a decoder, and the target detection result is output, including:
[0047] In the decoder, the target query interacts with the encoded features through a multi-head self-attention mechanism to extract the target information corresponding to each query;
[0048] Multi-head self-attention mechanisms use different attention heads to focus on different regions in an image, extracting the spatial location and category information of the target;
[0049] For each attention head, the bounding box and class score corresponding to the query are calculated. The decoder outputs each object, including the bounding box location. and category labels ,in, Indicates the coordinates of the center point of the bounding box. and These represent the width and height of the bounding box, respectively.
[0050] Secondly, the present invention also provides a low-altitude unmanned aerial vehicle (UAV) target detection system, comprising:
[0051] The acquisition module is used to acquire image data collected by the UAV's infrared camera;
[0052] The extraction module is used to extract multi-scale features from the image data through the ResNet backbone network to generate feature maps at different scales.
[0053] An enhancement module is used to flatten the feature maps of different scales into a multi-scale feature sequence, input the multi-scale feature sequence into the encoding layer of the target detection model, and enhance the foreground features of the multi-scale feature sequence by the multi-class semantic enhancement module in the encoding layer to obtain an enhanced multi-scale feature sequence.
[0054] The recovery module is used to restore the enhanced multi-scale feature sequence into a restored multi-scale feature map, and then pass the restored multi-scale feature map to the query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map.
[0055] The query module is used to flatten the enhanced multi-scale feature map again into a new multi-scale feature sequence, and determine the top k queries in the new multi-scale feature sequence as the initial target queries;
[0056] The output module is used to input the initial target query and the new multi-scale feature sequence into the decoder and output the target detection result.
[0057] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the low-altitude unmanned aerial vehicle target detection method as described above.
[0058] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the low-altitude unmanned aerial vehicle target detection method as described above.
[0059] The low-altitude UAV target detection method and system provided by this invention further enhances the expressive power of foreground features by introducing a multi-category semantic enhancement module at the coding layer; and solves the semantic misalignment problem between features of different scales by utilizing cross-level information fusion in the query refinement module, thereby improving the detection accuracy and robustness of small target UAVs. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0061] Figure 1 This is a flowchart illustrating the low-altitude unmanned aerial vehicle (UAV) target detection method provided by the present invention.
[0062] Figure 2 This is a flowchart of the detection network provided by the present invention;
[0063] Figure 3 This is a flowchart of the multi-category semantic enhancement module provided by the present invention;
[0064] Figure 4 This is a flowchart of the query refinement module provided by the present invention;
[0065] Figure 5 This is a comparison chart of the detection performance of the HIT-UAV dataset provided by this invention;
[0066] Figure 6 This is a visualization of the gradient heatmap provided by the present invention.
[0067] Figure 7 This is a schematic diagram of the low-altitude unmanned aerial vehicle target detection system provided by the present invention;
[0068] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0070] Figure 1 This is a flowchart illustrating the low-altitude unmanned aerial vehicle (UAV) target detection method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, it includes:
[0071] Step 100: Acquire image data from the drone's infrared camera;
[0072] Step 200: Extract multi-scale features from the image data using a ResNet backbone network to generate feature maps at different scales;
[0073] Step 300: Flatten the feature maps of different scales into a multi-scale feature sequence, input the multi-scale feature sequence into the encoding layer of the target detection model, and enhance the foreground features of the multi-scale feature sequence by the multi-class semantic enhancement module in the encoding layer to obtain an enhanced multi-scale feature sequence;
[0074] Step 400: Restore the enhanced multi-scale feature sequence to the restored multi-scale feature map, and pass the restored multi-scale feature map to the query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map;
[0075] Step 500: Flatten the enhanced multi-scale feature map again into a new multi-scale feature sequence, and determine the top k queries in the new multi-scale feature sequence as the initial target queries;
[0076] Step 600: Input the initial target query and the new multi-scale feature sequence into the decoder and output the target detection result.
[0077] Specifically, such as Figure 2 As shown in the figure, an embodiment of the present invention proposes a low-altitude UAV target detection method based on Deformable DETR, comprising:
[0078] Acquire image data from the UAV's infrared camera; extract multi-scale features using a ResNet backbone network. ,in L=4 represents feature maps at different scales. Before processing the multi-scale feature maps in the encoder, these feature maps are flattened into a sequence for input into the Transformer structure. The flattened multi-scale feature sequence is input into the encoding layer of the target detection model, and the foreground features are further enhanced by a multi-class semantic enhancement module in adjacent encoding layers. This allows the model to further suppress background noise interference and improve its ability to detect small infrared targets. The feature sequence processed by the encoder is then restored to a multi-scale feature map. The data is passed to the query refinement module for cross-level information interaction to generate enhanced features. The enhanced features are then flattened again into a feature sequence Z. The top k queries are selected as the initialization targets. The initialized targets and feature sequences are then input into the decoder, which uses a multi-head attention mechanism to decode them into bounding boxes and class labels as prediction results.
[0079] Based on the above embodiments, step 200 includes:
[0080] The input image data is fed into the ResNet backbone network for multi-scale feature extraction. The ResNet backbone network generates a set of multi-scale feature maps. , where each feature map This represents features at different scales; L=4 represents feature maps at different scales. It is the number of channels in each feature map. and They are the first The height and width of the layer feature maps. These multi-scale feature maps contain rich spatial and contextual information, providing a foundation for subsequent object detection.
[0081] Based on the above embodiments, step 300, flattening the feature maps of different scales into a multi-scale feature sequence, includes:
[0082] Multi-scale feature maps After flattening using the following formula, feature maps of all scales are concatenated into a long sequence:
[0083]
[0084] The Reshape operation transforms the feature map from... Flattened, it is a sequence with dimensions of The sequence length is The Concat operation concatenates L feature sequences into a single long sequence. After this processing, feature maps at all scales become a unified feature sequence that can be input into the encoder's self-attention mechanism.
[0085] Based on the above embodiments, in step 300, the multi-scale feature sequence is input into the encoding layer of the target detection model, and the foreground features of the multi-class semantic enhancement module in the encoding layer are enhanced to obtain an enhanced multi-scale feature sequence, including:
[0086] In this embodiment of the invention, to improve the detection accuracy of small target UAVs, a multi-class semantic enhancement module is introduced into the encoding layer of Deformable DETR, such as... Figure 3 As shown. The purpose of this module is to dynamically adjust the weight of each token, allowing the model to focus on the foreground target region and suppress background noise interference. The specific processing steps are as follows: The multi-class semantic enhancement module first calculates the predicted score of each token in different categories using a linear classification head, thereby generating a category score matrix. Assume there are... Tokens and Each category has a linear classification head that embeds the token's vector. Mapped to ,in Let be the dimension of the embedded vector. The mapping process is as follows:
[0087]
[0088] in, Indicates the first Each token for the category The predicted score. This step provides category-related score information for subsequent foreground feature enhancement. To focus attention on tokens related to the foreground target, the multi-class semantic enhancement module is based on the category score matrix. Calculate the maximum predicted score for each token across all categories. Specifically, for the i-th token, select the maximum value across all categories as its significance score:
[0089]
[0090] Then, these saliency scores are normalized using the Softmax function to generate a semantic context score vector. The calculation formula is as follows:
[0091]
[0092] Normalized A higher value indicates a stronger correlation between the token and the foreground category. Therefore, this token will be given a higher weight in subsequent processing, thereby enhancing its expressive power in the feature space. Finally, the query embedding is adjusted: the multi-category semantic enhancement module uses semantic context scores... To dynamically adjust query embedding This allows the model to focus more on tokens with high significance. Adjusted query embedding The calculation formula is as follows:
[0093]
[0094] in Represents semantic context score With query embedding Element-wise multiplication. This operation assigns higher weights to tokens that are more relevant to the foreground category, suppressing interference from the background region. and The current level in the encoder The key and value matrix is used to further enhance the relevance between the query and the feature. It is a normalization factor to prevent calculation instability caused by excessively large values.
[0095] Adjusted query embedding This will enhance semantic awareness, enabling the model to prioritize foreground regions and target categories, thereby effectively suppressing background noise interference. In subsequent decoding, this adjustment to query embedding makes the model more accurate in detecting small targets such as low-altitude drones, especially in complex backgrounds, significantly improving the model's focus on and discrimination of target regions.
[0096] Based on the above embodiments, step 400 includes:
[0097] In this embodiment, a query refinement module is set up, such as... Figure 4 As shown, the purpose of the query refinement module is to fuse information between feature maps of different scales, solve the semantic misalignment problem between queries at different levels, and thus optimize the initialization of the object query. The specific implementation is as follows: the encoded features processed by the multi-category semantic enhancement module are passed to the query refinement module. In this module, feature tokens (i.e., units in the feature maps) of different scales need to be fused to establish associations between multi-scale features. The query refinement module includes a cross-level information interaction structure. Specifically, feature tokens at adjacent levels...
[0098] and A RepVGG-based fusion structure is introduced. This structure combines feature information from different levels through path aggregation, effectively performing multi-level fusion and optimization of target features within the feature space. The calculation process is as follows:
[0099]
[0100] Where Conv represents the convolution operation, Concat is the connection operation, and UP is the bilinear interpolation operation, used to transform low-resolution feature maps. Upsampling to high-resolution feature maps The same spatial dimensions allow for spatial alignment of feature maps from two different levels, facilitating information fusion. Subsequent layer-by-layer refinement and fusion are then performed on the aligned features. First, for... conduct The convolution operation calculates the refined features using the following formula.
[0101]
[0102] in, The specific operation of convolution is as follows
[0103]
[0104] GC stands for group convolution. It is the ReLU activation function. These are weighting coefficients used to balance the contributions of input features. BN stands for Batch Normalization, which makes the distribution of input data more stable, thereby mitigating the vanishing or exploding gradient problem. This step segments and fuses features using different groups of convolutional kernels, thereby enhancing the expressiveness of the features.
[0105] Features after fusion Refined features are generated through residual connections.
[0106]
[0107] Through this refined calculation, the query refinement module can effectively fuse feature maps from different levels, thereby obtaining features suitable for initializing the target query.
[0108] Based on the above embodiments, step 500 includes:
[0109] This invention embodiment uses features that have undergone cross-level feature fusion. The tokens are flattened again into a one-dimensional sequence and fed into the decoder as the key and value, serving as the enhanced multi-scale feature sequence. The query refinement module selects the top k most significant queries as the initialization of the object queries. These queries will then serve as initialization features for the target candidate regions during subsequent decoding, thereby improving the model's detection accuracy.
[0110] Based on the above embodiments, step 600 includes:
[0111] In this embodiment of the invention, the result is output through a target decoding module. The purpose of the target decoding module is to decode the initialized target query to generate the target's bounding box and category label. The target query is then processed by the query refinement module. Input is fed into the decoder of Deformable DETR. The target query is then performed in the decoder. A multi-head self-attention mechanism and encoded features Z-axis interaction are used to extract target information corresponding to each query. The multi-head self-attention mechanism extracts the spatial location and category information of the target by having different attention heads focus on different regions in the image. Each attention head calculates the bounding box and category score corresponding to the query. The final decoder output includes the bounding box location for each target. and category labels .in, Indicates the coordinates of the center point of the bounding box. and These represent the width and height of the bounding box, respectively.
[0112] Through the above methods, the improved method of the present invention achieves rapid and accurate small target detection, which is particularly suitable for the real-time requirements of low-altitude UAV detection.
[0113] The following specific experiment illustrates the method of this invention. This experiment uses the Deformable DETR algorithm as a baseline for comparison, employing the HIT-UAV dataset. HIT-UAV, as the first high-altitude UAV infrared acquisition dataset, has significant research value. This dataset contains 2,898 thermal infrared images taken under various environments, covering scenes such as schools and roads, with a resolution of 640 × 512, shooting altitudes between 60 and 130 meters, and shooting angles between 30 and 90 degrees. The dataset is rich in content, containing 24,899 annotations across five categories: "Person," "Car," "Bicycle," "Other Vehicles," and "DontCare," suitable for various aerial monitoring applications. The dataset covers both daytime and nighttime conditions, and the annotations for the five categories are detailed and accurate.
[0114] Figure 5 The results show a comparison between the proposed method and the baseline algorithm Deformable DETR in terms of average accuracy and performance across various categories. Figure 6 The gradient heatmap generated using the GRAM tool for the model proposed in this invention is shown, visualizing the region of interest of the model.
[0115] The low-altitude UAV target detection system provided by the present invention is described below. The low-altitude UAV target detection system described below can be referred to in correspondence with the low-altitude UAV target detection method described above.
[0116] Figure 7 This is a schematic diagram of the structure of the low-altitude unmanned aerial vehicle target detection system provided in an embodiment of the present invention, as shown below. Figure 7 As shown, it includes: an acquisition module 71, an extraction module 72, an enhancement module 73, a recovery module 74, a query module 75, and an output module 76, wherein:
[0117] The acquisition module 71 is used to acquire image data collected by the UAV infrared camera; the extraction module 72 is used to extract multi-scale features from the image data through the ResNet backbone network to generate feature maps of different scales; the enhancement module 73 is used to flatten the feature maps of different scales into a multi-scale feature sequence, input the multi-scale feature sequence into the encoding layer of the target detection model, and the multi-class semantic enhancement module in the encoding layer enhances the foreground features of the multi-scale feature sequence to obtain an enhanced multi-scale feature sequence; the recovery module 74 is used to recover the enhanced multi-scale feature sequence into a recovered multi-scale feature map, and pass the recovered multi-scale feature map to the query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map; the query module 75 is used to flatten the enhanced multi-scale feature map again into a new multi-scale feature sequence, and determine the top k queries in the new multi-scale feature sequence as the initial target query; the output module 76 is used to input the initial target query and the new multi-scale feature sequence into the decoder and output the target detection result.
[0118] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a low-altitude UAV target detection method. This method includes: acquiring image data collected by the UAV's infrared camera; extracting multi-scale features from the image data using a ResNet backbone network to generate feature maps at different scales; flattening the feature maps at different scales into a multi-scale feature sequence, inputting the multi-scale feature sequence into the encoding layer of a target detection model, where a multi-class semantic enhancement module in the encoding layer enhances the foreground features of the multi-scale feature sequence to obtain an enhanced multi-scale feature sequence; restoring the enhanced multi-scale feature sequence into a restored multi-scale feature map, passing the restored multi-scale feature map to a query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map; flattening the enhanced multi-scale feature map again into a new multi-scale feature sequence, determining the top k queries in the new multi-scale feature sequence as initial target queries; inputting the initial target queries and the new multi-scale feature sequence into a decoder, and outputting the target detection result.
[0119] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the low-altitude UAV target detection method provided by the above methods. The method includes: acquiring image data collected by an infrared camera of a UAV; extracting multi-scale features from the image data through a ResNet backbone network to generate feature maps of different scales; flattening the feature maps of different scales into a multi-scale feature sequence, inputting the multi-scale feature sequence into the encoding layer of a target detection model, and strengthening the foreground features of the multi-scale feature sequence by a multi-class semantic enhancement module in the encoding layer to obtain an enhanced multi-scale feature sequence; restoring the enhanced multi-scale feature sequence into a restored multi-scale feature map, passing the restored multi-scale feature map to a query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map; flattening the enhanced multi-scale feature map again into a new multi-scale feature sequence, determining the top k queries in the new multi-scale feature sequence as initial target queries; inputting the initial target queries and the new multi-scale feature sequence into a decoder, and outputting the target detection result.
[0121] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A low-altitude unmanned aerial vehicle target detection method, characterized in that, The method comprises the following steps: obtaining image data collected by an unmanned aerial vehicle infrared camera; performing multi-scale feature extraction on the image data through a ResNet backbone network to generate different scale feature maps; flattening the different scale feature maps into a multi-scale feature sequence, and inputting the multi-scale feature sequence into an encoding layer of a target detection model, and strengthening foreground features of the multi-scale feature sequence through a multi-class semantic enhancement module in the encoding layer to obtain an enhanced multi-scale feature sequence, comprising: the multi-class semantic enhancement module sets a linear classification head to calculate the prediction score of each Token in different categories and generate a category score matrix; It has Tokens and Each category has a linear classification head that embeds the token's vector. Mapped to ,in The mapping process is as follows, depending on the dimension of the embedded vector: where S comprises represents the prediction score of the th Token for the class . Multi-class semantic enhancement module based on class score matrix Compute the maximum predicted score of each Token in all classes, select one maximum value in all classes for the i-th Token as the saliency score of the Token : The saliency scores The semantic context score vector is generated by normalizing through a Softmax function : TokenTotal represents the total number of tokens; by a semantic context score to dynamically adjust query embeddings , resulting in adjusted query embeddings : wherein denotes the semantic context score with the query embedding element-wise multiplication, and are the key and value matrices, respectively, of the current level in the encoder, is a normalization factor; restoring the enhanced multi-scale feature sequence into a restored multi-scale feature map, and passing the restored multi-scale feature map to a query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map, comprising: Feature Tokens at Adjacent Levels and A RepVGG-based fusion structure was introduced, and the calculation process is as follows: wherein Conv denotes a convolution operation, Concat is a concatenation operation, UP is a bilinear interpolation operation for upsampling low-resolution feature maps to the same spatial size as high-resolution feature maps ; Layer-by-layer refinement fusion is performed on the aligned features, and the refined features are calculated by the following formula Group convolution and weighting operation are performed, and the refined features are calculated by the following formula wherein, The specific operation of convolution is GC denotes grouped convolution, BN denotes batch normalization, is a weighting coefficient used to balance the contribution of input features; flattening the enhanced multi-scale feature map into a new multi-scale feature sequence again, and determining the first Topk queries in the new multi-scale feature sequence as initial target queries; inputting the initial target queries and the new multi-scale feature sequence into a decoder to output a target detection result. 2.The low-altitude unmanned aerial vehicle target detection method according to claim 1, characterized in that, performing multi-scale feature extraction on the image data through a ResNet backbone network to generate different scale feature maps, comprising: Feature maps of different scales are extracted from the ResNet backbone network. ,in L=4 represents the feature map at different scales. It is the number of channels in each feature map. and They are the first The height and width of the layer feature map. 3.The low-altitude unmanned aerial vehicle target detection method according to claim 1, characterized in that, flattening the different scale feature maps into a multi-scale feature sequence, comprising: where Reshape operation is to flatten the feature map from to a sequence with dimension and sequence length , and Concat operation concatenates L feature sequences into a long sequence, as multi-scale feature sequence. 4.The low-altitude UAV target detection method of claim 1, wherein, flattening the enhanced multi-scale feature map into a new multi-scale feature sequence again, and determining the first Topk queries in the new multi-scale feature sequence as initial target queries, comprising: fused features generate refined features through residual connection the features fused across the hierarchy levels The flattened one-dimensional token sequence is sent into the decoder as the enhanced multi-scale feature sequence as Key and Value, and the query refinement module selects the top k queries with significant importance as the initialization of the target query. 5.The low-altitude UAV target detection method of claim 1, wherein, inputting the initial target queries and the new multi-scale feature sequence into a decoder to output a target detection result, comprising: in the decoder, the target queries interact with the encoding features through a multi-head self-attention mechanism to extract target information corresponding to each query; the multi-head self-attention mechanism focuses on different regions in the image through different attention heads to extract spatial position and category information of the target; The decoder outputs each target, including the bounding box position, the class label, and the class score, calculated by each attention head corresponding to the query and the class label wherein, denotes the center point coordinates of the bounding box, and denote the width and height of the bounding box, respectively.
6. A low-altitude unmanned aerial vehicle target detection system based on the low-altitude unmanned aerial vehicle target detection method of any one of claims 1 to 5, characterized in that, The method comprises the following steps: an acquisition module is configured to obtain image data collected by an unmanned aerial vehicle infrared camera; an extraction module is configured to perform multi-scale feature extraction on the image data through a ResNet backbone network to generate different scale feature maps; an enhancement module is configured to flatten the different scale feature maps into a multi-scale feature sequence, and input the multi-scale feature sequence into an encoding layer of a target detection model, and strengthen foreground features of the multi-scale feature sequence through a multi-class semantic enhancement module in the encoding layer to obtain an enhanced multi-scale feature sequence; a restoration module is configured to restore the enhanced multi-scale feature sequence into a restored multi-scale feature map, and pass the restored multi-scale feature map to a query refinement module for cross-level information interaction to generate an enhanced multi-scale feature map; a query module is configured to flatten the enhanced multi-scale feature map into a new multi-scale feature sequence again, and determine the first Topk queries in the new multi-scale feature sequence as initial target queries; an output module is configured to input the initial target queries and the new multi-scale feature sequence into a decoder to output a target detection result.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the low-altitude unmanned aerial vehicle target detection method in any of claims 1 to 5 when executing the program.
8. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the low-altitude unmanned aerial vehicle target detection method in any of claims 1 to 5 when executed by the processor.
Citation Information
Patent Citations
Salient target detection method, detection device, and computer-readable storage medium
CN113724286A
Scene text recognition method based on semantic enhancement and graph reasoning
CN116052154A