A hierarchical focusing unmanned aerial vehicle small target detection method
By optimizing feature extraction, semantic modeling, and feature fusion using the TF-DEIM-DFINE model and combining it with a spatial density-aware adaptive label allocation strategy, several technical challenges in small target detection for UAVs were solved, achieving efficient and accurate small target detection.
Patent Information
- Application Number
- CN202611116555.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-11-27
AI Technical Summary
Small target detection by UAVs faces challenges such as small target features being easily obscured by the background, an imbalance between efficiency and accuracy in global semantic modeling, information loss during cross-scale feature fusion, difficulty in balancing model lightweighting and performance, and missed detections and false detections caused by uneven distribution of target spatial density during training.
The TF-DEIM-DFINE hierarchical focusing small object detection model is adopted. By introducing the Convolutional Gated Visual Mamba (CG-VIM) module, the Half-Channel Single-Head Attention (HCSA) module, and the Hierarchical Focusing Feature Pyramid Network (TF-FPN), feature extraction, semantic modeling, and feature fusion are optimized. At the same time, a spatial density-aware adaptive label allocation strategy is adopted to dynamically adjust the matching threshold and loss weight.
It significantly improves the detection accuracy of small targets and the lightweight nature of the model, enhances detection performance and computational efficiency in complex backgrounds, adapts to the detection needs of different density scenarios, and reduces the false detection and missed detection rates.
Smart Images

Figure CN123181798A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection, and more particularly to a hierarchical focusing method for small target detection in unmanned aerial vehicles. Background Technology
[0002] Drone technology has been widely used in many fields due to its high flexibility and wide coverage. However, the sensors carried by drones are limited by weight and power consumption, and they also face problems such as high flight altitude, dynamic perspective and changing lighting when shooting. As a result, ground targets in aerial images are small in size, have complex backgrounds, weak features and are easily interfered with, making small target detection by drones a technical challenge in the field of computer vision.
[0003] Existing small target detection methods are mainly optimized through multi-scale feature learning, generative adversarial networks, and loss reweighting, but they still have inherent defects when applied to UAV platforms. The specific problems are as follows:
[0004] 1. Small target features are easily obscured by the background: Small targets have a low pixel ratio and limited feature information, making them easily interfered with in complex backgrounds, resulting in a high false negative rate.
[0005] 2. Imbalance between efficiency and accuracy in global semantic modeling: When processing complex background semantics in high-resolution UAV images, mainstream Transformer encoders suffer from high computational overhead and insufficient modeling accuracy, making it difficult to balance efficiency and effectiveness.
[0006] 3. Information loss occurs in cross-scale feature fusion: Traditional feature fusion methods are prone to losing high-frequency details related to small targets during cross-scale feature interaction, which further weakens the recognizability of small targets;
[0007] 4. Difficulty in balancing lightweight models and performance: UAV platforms have strict limitations on power consumption and computing resources. Existing detection models often struggle to meet the requirements for lightweight and efficient deployment while ensuring detection accuracy.
[0008] 5. The closest existing technology is the DEIM-DFINE-n model. As a real-time end-to-end detection model, it has certain advantages in detection efficiency through optimized matching strategies and regression task design. However, this model still has shortcomings in small target feature extraction, complex background modeling, and cross-scale feature fusion. Specifically, it is not good at preserving high-frequency details of small targets, has limited semantic encoding capabilities in complex backgrounds, and the balance between model parameters and detection accuracy needs to be improved. It is difficult to meet the stringent requirements of UAV small target detection.
[0009] 6. While the existing DEIM-DFINE-n model employs a Dense O2O matching strategy to increase the number of positive samples through data augmentation, its matching threshold remains fixed throughout the training process, failing to consider the significant variations in target spatial density in UAV aerial images. In high-density scenes, the fixed threshold causes many small targets to fail to match positive samples, resulting in missed detections; in low-density scenes, the fixed threshold may introduce low-quality matches, increasing false detections. Therefore, a method that can perceive the spatial density distribution of targets and adaptively adjust the matching strategy is urgently needed to improve the model's robustness in detection under different density scenarios. Summary of the Invention
[0010] Purpose of the invention: The technical problem to be solved by the present invention is to provide a layered focusing method for small target detection in unmanned aerial vehicles, which addresses the shortcomings of the existing technology.
[0011] To address the aforementioned technical problems, this invention discloses a hierarchical focusing method for small target detection in unmanned aerial vehicles (UAVs). The core technical solution of this invention involves designing a TF-DEIM-DFINE hierarchical focusing small target detection model. This model uses DEIM-DFINE-n as its baseline architecture and introduces three core improved modules: a Convolutional Gated Visual Mamba (CG-VIM) module, a Half-Channel Single-Head Attention (HCSA) module, and a Hierarchical Focusing Feature Pyramid Network (TF-FPN). These modules optimize feature extraction, semantic modeling, and feature fusion while maintaining the model's lightweight nature and high efficiency. The CG-VIM, HCSA, and TF-FPN modules are essential technical features for achieving the core technical objectives; they work synergistically, and none can be omitted to achieve the optimal results of this invention.
[0012] Includes the following steps:
[0013] Step 1: Construct the overall architecture of the TF-DEIM-DFINE hierarchical focused small target detection model. The architecture includes, in order of data flow direction: backbone network, semantic modeling encoder, and feature fusion network.
[0014] Step 2: Train the TF-DEIM-DFINE model based on a spatial density-aware adaptive label assignment strategy;
[0015] Step 3: Input the image to be detected into the trained TF-DEIM-DFINE model for small object detection.
[0016] The backbone network is based on the HgNetv2 network architecture and uses the CG-VIM module to replace the traditional convolutional module, which is used to extract multi-scale features that include small object details and global context.
[0017] The CG-VIM module is built based on the Visual Mamba mechanism and includes an improved state space decomposition layer and a convolutional gated linear unit. The improved state space decomposition layer (SSD layer) is: input features First, the state space parameters are generated through a linear projection layer. C, A; then will The input is discretized by module A, while inputs B and C are processed by a deep convolutional layer for local feature enhancement. The discretized parameters and the enhanced parameters from the deep convolution jointly participate in the hidden state calculation. In the compressed hidden state, a shared global hidden state is generated through linear projection and a gating function, efficiently aggregating feature information. Finally, the output projection layer generates the output features. .
[0018] The Convolutional Gated Linear Unit (CGLU) is configured to: receive input features and divide them into two parallel branches; the first branch sequentially passes through linear projection, a gated activation function, and a 3×3 depthwise convolution; the second branch passes through linear projection; the outputs of the two branches are multiplied element-wise to obtain the final output.
[0019] The feature fusion network consists of a hierarchical focusing (TF) module and a bidirectional feature diffusion path, specifically including:
[0020] Adaptive scale alignment: Deep features (P4 / P5) are upsampled using 2×2 nearest neighbor interpolation, shallow features (P2) are downsampled using dual paths, and mid-level features (P3) are adjusted through 1×1 convolution.
[0021] Multi-receptive field enhancement: Four different kernel sizes of depth convolution branches (3, 3, 5, and 7) are set to extract multi-scale features in parallel, and the output is spliced and fused with the original feature residuals;
[0022] Bidirectional diffusion: Constructing bottom-up and top-down feature transmission paths to achieve deep diffusion and sharing of features.
[0023] The spatial density-aware adaptive label allocation strategy described in step 2 is as follows:
[0024] Step 6-1: Local density estimation. Spatial location encoding is performed on the bounding boxes of each training image. The mean-shift clustering algorithm is used to cluster the center points of all bounding boxes, dividing the image into several spatial clusters. For each cluster, the ratio of the number of targets to the cluster area is calculated to obtain the local target density value of that region. Furthermore, a Gaussian kernel function is used to spatially smooth the local target density value to generate a continuous density field for the entire image. The value at each location represents the target density level of that local area;
[0025] Step 6-2: Density adaptive matching threshold, using the density field generated in step 6-1. Mapping to the center point of the prediction box yields the local density value for each prediction box. ,according to Dynamically calculate the matching threshold of the predicted bounding box. The number of positive sample matches is dynamically adjusted based on the matching threshold.
[0026] Step 6-3: Density-aware loss weighting, introduces the density factor into the classification loss and regression loss to guide the training of the network.
[0027] The step 6-2, which describes dynamically adjusting the number of positive sample matches based on a matching threshold, specifically involves: according to... Dynamically calculate the matching threshold of the predicted bounding box. ,in As the baseline IoU threshold, The average density of the current image. For adjustable coefficients, when > When, matching threshold Reduce, increase the number of positive sample matches to prevent missed detections; when < hour, Increase and decrease low-quality matches to prevent false detections;
[0028] Step 6-3 specifically includes: For each positive sample prediction box, based on the density value at its corresponding location... Calculate weighting factors ,in The maximum density of the current image. This is the adjustment coefficient; Multiplying the predicted bounding box by the GIoU loss and the bounding box loss allows the model to prioritize small targets in high-density regions during training, guiding the network to focus on challenging regions.
[0029] The model training process described in step 2 includes:
[0030] Step 7-1: Initialization: The model parameters are trained from scratch, without using pre-trained weights;
[0031] Step 7-2: Training process: Set the number of training rounds, with the first n rounds being the model convergence phase and the last m rounds being the accuracy optimization phase;
[0032] Step 7-3: Model saving: Save the model weights every k rounds, and select the weight with the highest AP on the validation set as the optimal model;
[0033] Step 7-4: Loss Calculation: GIoU loss and bounding box loss are jointly optimized to supervise the model training process.
[0034] The semantic modeling encoder module is reconstructed based on the MetaFormer architecture and includes a token mixer and a multilayer perceptron. The token mixer adopts a single-head attention mechanism and a half-channel processing strategy, and the multilayer perceptron adopts a convolutional gated linear unit.
[0035] Beneficial effects:
[0036] 1. Significantly improved core detection accuracy. The AP of this invention reaches 22.4%, an improvement of 5.8% compared to the benchmark model; among which, the AP_S for small targets is improved by 4.5%, and the AP_M for medium targets is improved by 7.5%. On the HIT-UAV infrared dataset, the AP is improved by 4.3% compared to the benchmark model, and by 2.51% and 3.73% compared to mainstream models such as YOLOv9s and RT-DETR-R50, respectively. The detection effect of small targets such as pedestrians, bicycles, and tricycles is particularly outstanding, effectively solving the problem that the features of small targets are easily buried by the background.
[0037] 2. Optimized model lightweighting. The model parameters of this invention are only 2.34M, which is 37% less than the benchmark model, and the memory usage is reduced by 110MB (when inferring in ONNX format). While significantly improving detection accuracy, it achieves a lightweight model design, which is more suitable for the resource constraints of UAV platforms.
[0038] 3. Excellent balance between computational efficiency and accuracy. The computational complexity (GFLOPs) of this invention increases by only 6% compared to the baseline model, while maintaining the same FPS (125±2.94), which is far lower than the computational overhead of similar models such as DINO (GFLOPs are about 1 / 36 of DINO). In ONNX format inference, the FPS reaches 21.3, which is basically on par with the baseline model, achieving the optimal balance of "improved accuracy without reduced efficiency".
[0039] 4. Strong adaptability to complex scenes. This invention, through global-local feature capture by the CG-VIM module, complex background modeling by the HCSA module, and high-frequency information retention by the TF-FPN module, can maintain stable detection performance in complex scenes such as low light at night, cluttered backgrounds, and dense small targets. The false negative rate and false positive rate are significantly lower than those of existing models.
[0040] 5. Excellent generalization ability. It achieves improved accuracy on two different datasets, VisDrone2019 (visible light dataset) and HIT-UAV (infrared dataset), proving that the model can be adapted to UAV small target detection tasks with different imaging methods and different scenarios, and has a wide range of applications.
[0041] 6. Significantly Enhanced Adaptiveness of the Training Matching Strategy. This invention employs a spatial density-aware adaptive label allocation strategy, dynamically adjusting the matching threshold and loss weights based on the local target density of the image during the training phase. This increases the number of positive sample matches and reduces the risk of missed detections in high-density areas, while improving matching quality and reducing the risk of false detections in low-density areas. Compared to the fixed-threshold Dense O2O matching strategy in the DEIM framework, this invention achieves dynamic optimization of the matching strategy from the spatial distribution dimension. It is particularly suitable for high-density, small-target scenarios such as urban areas and markets, effectively solving the problem of insufficient adaptability of traditional fixed-threshold strategies in scenarios with uneven density distribution. Attached Figure Description
[0042] Figure 1 This is a structural diagram of the TF-DEIM-DFINE model of the present invention.
[0043] Figure 2 This is a structural diagram of the CG-VIM module of the present invention.
[0044] Figure 3 This is a basic structural diagram of MetaFormer of the present invention.
[0045] Figure 4 This is a structural diagram of the HCSA module of the present invention.
[0046] Figure 5 This is a structural diagram of the TF module of the present invention.
[0047] Figure 6 A comparison diagram of pyramid network structures with different features.
[0048] Figure 7 This is a flowchart illustrating the spatial density-aware adaptive label allocation strategy (DALA) of the present invention.
[0049] Figure 8 is a comparison of the detection results of the present invention and the detection results of the DEIM-DFINE model. Detailed Implementation
[0050] The TF-DEIM-DFINE hierarchical focusing small object detection model of this invention uses the DEIM-DFINE-n model (DFINE-n model under the DEIM training framework) as the baseline architecture. It introduces three core improved modules: Convolutional Gated Visual Mamba (CG-VIM) module, Half-channel Single-Head Attention (HCSA) module, and Hierarchical Focusing Feature Pyramid Network (TF-FPN), optimizing feature extraction, semantic modeling, and feature fusion while maintaining lightweight and high efficiency. The CG-VIM module, HCSA module, and TF-FPN module are essential technical features for achieving the core technical objectives; they work synergistically, and none can be omitted to achieve the optimal effect of this invention.
[0051] Step 1: Dataset Preparation and Preprocessing
[0052] Download the VisDrone2019 dataset and the HIT-UAV dataset, and split them into training, validation, and test sets according to the official partitioning method; resample the images in the dataset to a uniform size and perform data augmentation; convert the annotation labels to a standard format and build a PyTorch data loader.
[0053] Step 2: Construct the overall architecture of the model
[0054] like Figure 1 As shown, the overall architecture of the TF-DEIM-DFINE hierarchical focused small target detection model is constructed. The architecture includes, in order of data flow direction, a backbone network, a semantic modeling encoder, and a feature fusion network (TF-FPN).
[0055] Backbone network: Based on HgNetv2, the traditional convolutional module is replaced by the CG-VIM module to extract multi-scale features that include small object details and global context;
[0056] Semantic Modeling Encoder: The Token Mixer is optimized using the HCSA module to enhance its semantic encoding capabilities in complex contexts.
[0057] Feature Fusion Network: This is a TF-FPN network used for deep fusion of multi-scale features.
[0058] Figure 1 The model construction architecture of this invention is demonstrated: the overall connection relationship of the backbone network, the encoder, and the feature fusion network (TF-FPN), and the positions and feature flow directions of the core modules CG-VIM, HCSA, and TF-FPN are marked, reflecting the complete process of "feature extraction - semantic modeling - feature fusion - detection output".
[0059] Step 3: Construct the backbone network (CG-VIM module)
[0060] like Figure 1 As shown, a backbone network is built based on HgNetv2, replacing the basic convolutional modules of the HgNetv2 backbone network to enhance the feature extraction capability of small objects. This achieves synergistic optimization of global dependency capture and local detail awareness while controlling computational costs. Specifically, in layers P2 and P3 of HgNetv2, the original basic convolutional modules are replaced with CG-VIM modules to build an efficient backbone network, improving the feature extraction capability of small objects while maintaining lightweight characteristics.
[0061] The CG-VIM module is built based on the Vision Mamba mechanism, such as... Figure 2 As shown, it includes an improved state-space decomposition layer and a convolutional gated linear unit, and the specific construction method is as follows:
[0062] Step 3-1: Improve the SSD layer: Redesign the state-space decomposition layer, perform channel mixing operations in the compressed hidden state, generate a shared global hidden state through linear projection and gating functions, efficiently aggregate feature information, and shift the main computational cost from linear projection to hidden state computation, reducing overall complexity; for example Figure 2 As shown, input features First, the state space parameters are generated through a linear projection layer. C, A; then will The input is discretized by module A, while inputs B and C are processed by a deep convolutional layer for local feature enhancement. The discretized parameters and the enhanced parameters from the deep convolution jointly participate in the hidden state calculation. In the compressed hidden state, a shared global hidden state is generated through linear projection and a gating function, efficiently aggregating feature information. Finally, the output projection layer generates the output features. This design shifts the main computational cost from linear projection to hidden state computation, reducing overall complexity.
[0063] Step 3-2: Introducing CGLU Units: Convolutionally gated linear units are used in the FFN layer. Two parallel linear projections are output and multiplied element-wise. One projection is activated by a gating function to provide fine-grained representation, while the other projection performs coarse-grained attention calculations on the features to achieve global perception. A 3×3 depthwise convolution is added before the activation function to align the gating channel attention with neighboring features, enhancing the fine-grained and positional encoding capabilities of feature extraction. Figure 2 As shown, after receiving input features, the CGLU unit divides them into two parallel branches: the first branch sequentially passes through linear projection, a gated activation function, and a 3×3 depthwise convolution; the second branch passes through linear projection; the outputs of the two branches are multiplied element-wise to obtain the final output. The gated channel attention, aligned with nearest-neighbor features through the 3×3 depthwise convolution, enhances the fine-grainedness and positional encoding capability of feature extraction.
[0064] Figure 2 The internal components of the CG-VIM module are shown, including the SSD layer, 3×3 depth convolution, and the connection and processing flow of CGLU units.
[0065] Step 4: Construct the semantic modeling encoder (HCSA module)
[0066] like Figure 1As shown, the HCSA module is constructed as the Token Mixer of the Transformer encoder to enhance the semantic encoding capability of complex backgrounds, thereby reducing computational redundancy and improving the recognition of small target features.
[0067] The HCSA module is reconstructed based on the MetaFormer architecture, such as Figure 3 as well as Figure 4 As shown, it includes two main components: a Token Mixer and an MLP (Multilayer Perceptron). In this invention, the Token Mixer employs a single-head attention mechanism and a half-channel processing strategy, while the MLP component uses the same Convolutional Gated Linear Unit (CGLU) as the CG-VIM module. The specific construction method is as follows:
[0068] Step 4-1: Adopt a single-head attention mechanism: Replace the traditional multi-head attention mechanism to avoid the localization ambiguity problem caused by multi-head feature fusion, while providing a unified global context for UAV targets with large scale changes, which is more conducive to scale-invariant modeling and reduces the computational overhead caused by additional projection layers and stitching operations.
[0069] Step 4-2: Employ a half-channel processing strategy: Split the input features into two equal parts along the channel dimension. Assuming the total number of channels in the input features is C, split the input features into two parts along the channel dimension, with each part having C / 2 channels. Perform single-head attention calculation only on one part, while retaining the original information in the other part. Finally, reassemble the two parts, and use activation functions and convolution operations to spread the attention features to all channels, significantly reducing the computational cost while maintaining the modeling effect.
[0070] Step 4-3: Enhance MLP with CGLU: The MLP component uses the same convolutional gating unit as the CG-VIM module to achieve local spatial awareness, refine the coding granularity, and enhance the model's ability to capture complex dependencies.
[0071] Figure 3 The MetaFormer architecture, which forms the basis of the HCSA module design, is shown, including the composition of the Emb. layer, TokenMixer, Norm normalization layer, and MLP module.
[0072] Figure 4 The internal structure of the HCSA module is shown, including the processing steps of channel splitting, single-head attention calculation, channel splicing, and projection diffusion.
[0073] Step 5: Construct the Feature Fusion Network (TF-FPN module)
[0074] like Figure 1As shown, a TF-FPN feature fusion network is constructed to optimize the cross-scale feature fusion mechanism. The "focus-diffusion" strategy enhances the representation ability of high-frequency information of small targets, suppresses information degradation in the multi-scale fusion process, and controls the growth of model parameters.
[0075] The TF-FPN consists of a hierarchical focusing (TF) module and a bidirectional feature diffusion path, such as... Figure 5 As shown, the specific construction method is as follows:
[0076] Step 5-1: Adaptive scale alignment: Deep features (P4 / P5) are upsampled using 2×2 nearest neighbor interpolation, shallow features (P2) are downsampled using dual paths, and mid-level features (P3) are adjusted through 1×1 convolution.
[0077] Step 5-2: Multi-receptive field enhancement: Set up depthwise convolution branches with four kernel sizes of 3, 3, 5, and 7, extract multi-scale features in parallel, and fuse the output with the original feature residuals after concatenation;
[0078] Step 5-3: Bidirectional diffusion: Construct feature transmission paths from bottom to top and from top to bottom to achieve deep diffusion and sharing of features.
[0079] Figure 5 The internal architecture of the TF hierarchical focusing module is shown, including the specific components and connections of adaptive scale alignment, multi-receptive field feature enhancement, and residual fusion.
[0080] Step 6: Construct a spatial density-aware adaptive label assignment strategy (Density-Aware LabelAssignment, DALA).
[0081] This invention introduces the DALA strategy during the training phase, which dynamically adjusts the positive and negative sample matching thresholds and loss weights based on the local spatial distribution density of targets in the image. The specific implementation is as follows:
[0082] Step 6-1: Local Density Estimation. Spatial location encoding is performed on the bounding boxes of each training image. Mean-shift clustering is used to cluster the center points of all bounding boxes, dividing the image into several spatial clusters. For each cluster, the ratio of the number of targets to the cluster area is calculated to obtain the local target density of that region. Furthermore, a Gaussian kernel function is used to spatially smooth the density values, generating a continuous density field for the entire image. The value at each location represents the target density level of that local area. and These represent the height and width of the image, respectively. In the density estimation above, the Gaussian kernel function is... The bandwidth parameter h follows the Silverman rule. Confirmed, among which Let be the standard deviation of the coordinates of the center point of the bounding box, and n be the total number of bounding boxes in the current image. Based on this kernel function, for any bounding box center point... The density estimate is .
[0083] Step 6-2: Density Adaptive Matching Threshold. During the Hungarian matching process within the DEIM framework, the density field generated in Step 6-1 is used... Mapping to the center point of the prediction box yields the local density value for each prediction box. .according to Dynamically calculate the matching threshold of the predicted bounding box. ,in As the baseline IoU threshold, The average density of the current image. This is an adjustable coefficient. is the mean density value at the center point of all ground truth bounding boxes in the current image, and N is the total number of bounding boxes in the current image; This is the density adaptive adjustment coefficient, with a value range of [0.1, 0.5] and a default value. .when > hour, Reduce, increase the number of positive sample matches to prevent missed detections; when < hour, Increase and decrease low-quality matches to prevent false detections.
[0084] Step 6-3: Density-perceived loss weighting. Weight the density factor (i.e., density value). Weighting factors Introducing classification loss and regression loss, for each positive sample predicted box, based on the density value at its corresponding location... Calculate weighting factors ,in The maximum density of the current image. This is an adjustment coefficient, with a value range of [0.5, 1.5] and a default value. ;Will Multiplying the predicted bounding box by the GIoU loss and the bounding box loss allows the model to prioritize small targets in high-density regions during training, guiding the network to focus on challenging regions.
[0085] Step 7: Model Training Process
[0086] Step 7-1: Initialization: The model parameters are trained from scratch without using pre-trained weights to ensure training fairness;
[0087] Step 7-2: Training process: Set the training rounds to 160 rounds, with the first 80 rounds being the model convergence phase and the last 80 rounds being the accuracy optimization phase;
[0088] Step 7-3: Model saving: Save the model weights every 10 rounds, and select the weight with the highest AP (Average Precision) on the validation set as the optimal model;
[0089] Step 7-4: Loss Calculation: GIoU loss and bounding box loss are jointly optimized to supervise the model training process.
[0090] like Figure 6 As shown, the structural differences between traditional (a) FPN, (b) FPN+P3 (three-layer FPN) and (c) TF-FPN are compared, demonstrating the feature focusing and diffusion structure of TF-FPN.
[0091] To visually verify the improvement effect of this invention on the model's region of interest, a typical complex scene was selected on the VisDrone2019 dataset for heatmap visualization comparison, as shown in Figure 8. Figure 8(a) is the original input image; Figure 8(b) is the heatmap of the baseline DEIM-DFINE-n model; Figure 8(c) is the heatmap of the model of this invention.
[0092] As can be seen from the comparison, the response area of the baseline model's heatmap is concentrated in scattered local locations of the target, failing to form a complete coverage of the target as a whole, and the distinction between the target and the background is insufficient. In contrast, the heatmap of the model of this invention (Figure 8(c)) completely covers the location of the target, and the response distribution is more continuous and uniform. This visualization result fully demonstrates that the present invention enables the model to no longer rely on a few isolated features for judgment, but can perceive the entire target area more comprehensively, significantly enhancing the ability to extract features of small targets and the anti-interference ability in complex backgrounds.
[0093] This invention aims to solve the following technical problems:
[0094] 1. Enhance the ability to extract features from small targets, effectively separate small target features from complex backgrounds, and reduce the risk of feature overload;
[0095] 2. Optimize the global semantic modeling mechanism to reduce computational redundancy while improving the semantic encoding accuracy of complex backgrounds;
[0096] 3. Improve the cross-scale feature fusion method to reduce the loss of high-frequency information of small targets during the fusion process and enhance the consistency and expressive power of multi-scale features;
[0097] 4. Achieve synergistic optimization of detection performance, computational efficiency, and lightweight architecture to meet the resource constraints of the UAV platform, and control model parameters and computational overhead while ensuring detection accuracy.
[0098] This invention provides a layered focusing method for small target detection using unmanned aerial vehicles (UAVs). Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A hierarchical focusing method for small target detection by unmanned aerial vehicles (UAVs), characterized in that, Includes the following steps: Step 1: Construct the overall architecture of the TF-DEIM-DFINE hierarchical focused small target detection model. This architecture includes, in order of data flow direction: backbone network, semantic modeling encoder, and feature fusion network. Step 2: Train the TF-DEIM-DFINE model based on a spatial density-aware adaptive label assignment strategy; Step 3: Input the image to be detected into the trained TF-DEIM-DFINE model for small object detection.
2. The hierarchical focusing UAV small target detection method according to claim 1, characterized in that, The backbone network is based on the HgNetv2 network architecture and uses the CG-VIM module to replace the traditional convolutional module to extract multi-scale features that include small object details and global context.
3. The hierarchical focusing UAV small target detection method according to claim 2, characterized in that, The CG-VIM module is built based on the visual Mamba mechanism and includes an improved state space decomposition layer and convolutional gated linear units. The improved state space decomposition layer consists of input features. First, the state space parameters are generated through a linear projection layer. C, A; then will The input is discretized by module A, while inputs B and C are processed by a deep convolutional layer for local feature enhancement. The discretized parameters and the enhanced parameters from the deep convolution jointly participate in the hidden state calculation. In the compressed hidden state, a shared global hidden state is generated through linear projection and a gating function, efficiently aggregating feature information. Finally, the output projection layer generates the output features. .
4. The hierarchical focusing UAV small target detection method according to claim 3, characterized in that, The convolutional gated linear unit is as follows: after receiving the input features, it is divided into two parallel branches: the first branch passes through linear projection, a gated activation function, and a 3×3 depthwise convolution in sequence; the second branch passes through linear projection; the outputs of the two branches are multiplied element-wise to obtain the final output.
5. The hierarchical focusing UAV small target detection method according to claim 1, characterized in that, The feature fusion network consists of a hierarchical focusing module and a bidirectional feature diffusion path, specifically including: Adaptive scale alignment: Deep features are upsampled using 2×2 nearest neighbor interpolation, shallow features are downsampled using dual-path, and mid-level features are adjusted through 1×1 convolution to adjust channels; Multi-receptive field enhancement: Set up depthwise convolution branches with different kernel sizes to extract multi-scale features in parallel, and fuse the output with the original feature residuals after concatenation; Bidirectional diffusion: Constructing bottom-up and top-down feature transmission paths to achieve deep diffusion and sharing of features.
6. The hierarchical focusing UAV small target detection method according to claim 1, characterized in that, The spatial density-aware adaptive label allocation strategy described in step 2 is as follows: Step 6-1: Local density estimation. Spatial location encoding is performed on the bounding boxes of each training image. The mean-shift clustering algorithm is used to cluster the center points of all bounding boxes, dividing the image into several spatial clusters. For each cluster, the ratio of the number of targets to the cluster area is calculated to obtain the local target density value of that spatial cluster region. Furthermore, a Gaussian kernel function is used to spatially smooth the local target density value to generate a continuous density field for the entire image. The value at each location represents the target density level of that local area; Step 6-2: Density adaptive matching threshold, using the density field generated in step 6-1. Mapping to the center point of the prediction box yields the local density value for each prediction box. ,according to Dynamically calculate the matching threshold of the predicted bounding box. The number of positive sample matches is dynamically adjusted based on the matching threshold. Step 6-3: Density-aware loss weighting, introduces the density factor into the classification loss and regression loss to guide the training of the network.
7. The hierarchical focusing UAV small target detection method according to claim 6, characterized in that, The step 6-2, which describes dynamically adjusting the number of positive sample matches based on a matching threshold, specifically involves: according to... Dynamically calculate the matching threshold of the predicted bounding box. ,in As the baseline IoU threshold, The average density of the current image. For adjustable coefficients, when > When, matching threshold Reduce, increase the number of positive sample matches to prevent missed detections; when < hour, Increase and decrease low-quality matches to prevent false detections.
8. The hierarchical focusing UAV small target detection method according to claim 7, characterized in that, Step 6-3 specifically includes: For each positive sample prediction box, based on the density value at its corresponding location... Calculate weighting factors ,in The maximum density of the current image. This is the adjustment coefficient; Multiplying the predicted bounding box by the GIoU loss and the bounding box loss allows the model to prioritize small targets in high-density regions during training, guiding the network to focus on challenging regions.
9. The hierarchical focusing UAV small target detection method according to claim 1, characterized in that, The model training process described in step 2 includes: Step 7-1: Initialization: Train the model parameters from scratch, without using pre-trained weights; Step 7-2: Training process: Set the number of training rounds, with the first n rounds being the model convergence phase and the last m rounds being the accuracy optimization phase; Step 7-3: Model saving: Save the model weights every k rounds, and select the weight with the highest AP on the validation set as the optimal model; Step 7-4: Loss calculation: GIoU loss and bounding box loss are jointly optimized to supervise the model training process.
10. The hierarchical focusing UAV small target detection method according to claim 1, characterized in that, The semantic modeling encoder module is reconstructed based on the MetaFormer architecture and includes a token mixer and a multilayer perceptron. The token mixer adopts a single-head attention mechanism and a half-channel processing strategy, and the multilayer perceptron adopts a convolutional gated linear unit.
