Dense small target detection method for unmanned aerial vehicle aerial photography scene
By introducing an attention scale selection module and a dynamic local self-attention module into the drone aerial photography scenario, the technical shortcomings of small target detection methods in terms of scale adaptability and dense target recognition are solved, achieving efficient and reliable small target detection and improving detection accuracy and recall.
Patent Information
- Application Number
- CN202511516191.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-01-30
AI Technical Summary
Existing methods for small target detection in drone aerial photography scenarios have shortcomings in scale adaptability and dense target recognition. They are difficult to balance real-time performance and accuracy on resource-constrained embedded platforms, which limits the reliability and practical value of the detection system.
By introducing the Attention Scale Selection Module (AGSS) and the Dynamic Local Self-Attention Module (DPSA), we can effectively model the dynamic changes of the target scale, enhance the feature representation ability, and improve the detection accuracy and robustness.
While maintaining high detection efficiency, it significantly improves the recall rate and detection accuracy of small targets in complex scenarios, providing an effective solution for UAV intelligent monitoring systems.
Smart Images

Figure CN121438142A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a kind of dense small target detection method for unmanned aerial vehicle aerial scene, belong to computer vision and target detection technical field. BACKGROUND
[0002] Unmanned aerial vehicle has become the key platform for promoting the development of "low-altitude economy" with the unique advantages of low cost, strong mobility and wide field of view, and has shown broad application prospects in military and civilian fields such as intelligent traffic management, public safety monitoring, disaster rescue and crop patrol. With the popularization and application of unmanned aerial vehicle technology, the problem of small target detection in aerial images has become increasingly prominent, becoming a core technical bottleneck restricting the intelligent application of unmanned aerial vehicles. In aerial scenes, due to frequent changes in flight height and viewing angle, the size of the same target in the image often fluctuates significantly, and the pixel ratio of small targets is extremely low, resulting in insufficient feature representation. Especially in typical scenes such as traffic monitoring and urban security, the target distribution is dense, the background interference is complex, and interference factors such as occlusion and overlap make small targets prone to missed detection or false detection, seriously affecting the reliability and practical value of the detection system.
[0003] In existing target detection algorithms, the multi-scale modeling method based on feature pyramid network (FPN) improves the adaptability to targets of different scales to some extent, but its feature fusion strategy is relatively fixed and cannot flexibly cope with the dynamic size changes and high-density distribution characteristics of targets in aerial images caused by changes in height. The introduction of attention mechanism provides a new way for feature selection and weight allocation, which helps to enhance the model's attention to small target regions, but such solutions usually involve high computational overhead, making it difficult to achieve an effective balance between detection accuracy and model efficiency. Therefore, it is difficult to balance real-time performance and accuracy on resource-constrained embedded platforms such as unmanned aerial vehicles, limiting its practical promotion and application in real-time detection tasks.
[0004] To solve the above technical problems, the present application proposes a dense small target detection method for unmanned aerial vehicle aerial scene, which is particularly suitable for intelligent traffic management, urban security monitoring and other fields. By introducing an attention scale selection module and a dynamic local self-attention module, effective modeling of target size dynamic changes is achieved, and the recall rate and detection accuracy of small targets in complex scenes are significantly improved while maintaining high detection speed, providing an effective technical solution for unmanned aerial vehicle intelligent monitoring systems. SUMMARY
[0005] Invention purposes: The present application aims to solve the technical deficiencies of the existing unmanned aerial vehicle aerial small target detection method in scale adaptability and dense target recognition. Through the construction of a dual optimization mechanism of scale selection and channel sparse attention cooperation, the detection performance is significantly improved. Among them, the scale selection module performs adaptive re-labeling on multi-scale features, so that the model can dynamically adjust the feature weight according to the scene target distribution; the channel sparse attention mechanism selectively enhances the feature channels sensitive to small targets and suppresses background interference, effectively improving the feature expression ability. This method maintains high detection efficiency while significantly improving the detection accuracy and robustness of dense small targets in complex aerial scenes.
[0006] Technical scheme: A dense small target detection method for unmanned aerial vehicle aerial scenes, the method comprising the following steps:
[0007] (1) Image input and preprocessing: After the preprocessing operation of the original aerial image, input to the backbone network (Backbone), and extract multi-scale feature maps with different receptive fields.
[0008] (2) Multi-scale feature enhancement: Introduce the attention scale selection (AGSS) module in the feature fusion network (Neck), and perform adaptive weighted fusion of multi-scale features through a dynamic weight distribution mechanism to enhance the feature expression ability of key targets.
[0009] (3) Sparse channel modeling: Introduce the dynamic local self-attention (DPSA) module after the AGSS module, and model the sparse selection of the feature channels, and concentrate the computing resources on the channels sensitive to small targets.
[0010] (4) Detection result output: Through the detection head, realize the output of the target detection and positioning result.
[0011] In step (1), multi-scale feature maps are extracted, and the specific steps are as follows:
[0012] The original aerial image I is input to the Backbone network after standardization and data enhancement operation. The network extracts multi-scale features based on convolution and residual structure, and obtains a group of output feature maps {F1, F2,..., FN}, wherein N is the number of feature maps, corresponding to the feature representation under different receptive fields. 3×H×W N
[0013] In step (2), the features are enhanced, and the specific steps are as follows:
[0014] (21) Global average pooling processing: The input feature map F is processed by global average pooling, and the output feature map F is obtained. C×H×W Performing global average pooling compresses the spatial dimension while preserving channel statistics, achieving preliminary dimensionality reduction and key information extraction, resulting in the channel feature vector z. c This process can be represented as:
[0015]
[0016] Where H and W are the height and width of the feature map, respectively, C is the number of channels, and F is the width and height of the feature map. c Let F be the feature on the c-th channel.
[0017] (22) Scale weight generation: To extract and reconstruct scale-related information, the pooling feature z is weighted... c Two linear transformations are performed sequentially. The first layer uses the ReLU activation function to enhance the nonlinear expressive power, and the second layer uses the Sigmoid function to constrain the output to the interval [0, 1], thereby adaptively generating the scale weight vector s. c This process can be represented as:
[0018] s=σ(W2·δ(W1·z)) (2)
[0019] Where δ(·) is the ReLU activation function, σ(·) is the Sigmoid function, and W1 and W2 are the weight matrices of the linear transformation.
[0020] (23) Feature recalibration: The scale weights s c As a modulation factor, the original feature F c Channel-by-channel weighting is performed to achieve adaptive recalibration of multi-scale features, resulting in the modulated feature map. This process can be represented as:
[0021]
[0022] Among them, s c With F c Let represent the scale weight and input feature of the c-th channel, respectively.
[0023] In step (3), sparsity channel modeling is performed on the features. The specific steps are as follows:
[0024] (31) Local context extraction: Input features X∈R C×H×W By using depthwise separable convolution, local contextual information is extracted to obtain the enhanced feature X′. This process can be represented as:
[0025] X′=DWConv(X) (4)
[0026] Where DWConv(·) is the depthwise separable convolution operator.
[0027] (32) Channel attention generation: Channel attention modeling is performed on feature X′. First, channel statistics are obtained through global average pooling, and then channel attention weights g are generated through group normalization and Sigmoid activation function. c ∈[0,1], the process can be represented as:
[0028]
[0029] Where GN is the group normalization operation and σ(·) is the Sigmoid function.
[0030] (33) Sparse channel selection: based on channel attention weight g c Based on a preset threshold τ, sparse selection is performed on feature channels, applying only the importance weights g. c Channels >τ are computed using multi-head self-attention (MHSA), while the remaining channels retain their original features. This process can be represented as:
[0031]
[0032] Among them, R c These are the channel features after sparse selection.
[0033] (34) Feature Fusion and Output: The features of each channel R C The data is concatenated along the channel dimension, and feature fusion and compression are achieved through convolutional layers to obtain the final output Y. This process can be represented as follows:
[0034] Y = Conv([R1, R2, ..., R...) C (7)
[0035] In step (4), the target detection and localization results are output. The specific steps are as follows:
[0036] (41) Classification probability calculation: The fused feature f(x) is processed by classification branching. The predicted probability of each category is calculated through a fully connected layer and a softmax function to achieve multi-class classification. This process can be expressed as:
[0037]
[0038] Where f(x) is the fusion feature corresponding to the input sample x, W c W is the weight vector for class c. k This is the weight vector for all categories.
[0039] (42) Bounding box regression optimization: The Distribution Focusing Loss (DFL) is introduced. By discretizing the bounding box distribution and optimizing its shape, the regression accuracy and training stability are improved. The loss function is defined as:
[0040]
[0041] Among them, y i For real labels, p i γ represents the probability distribution predicted by the model, and γ is an adjustment coefficient used to control the degree of penalty for easily classified samples.
[0042] (43) Total Loss Function Design: The total loss function is composed of the classification loss L cls Bounding box regression loss L box With distribution focusing loss L dfl Composed of three parts, it achieves multi-task collaborative optimization through weighted summation. This process can be expressed as:
[0043] L=λ1L cls +λ2L boxx +λ3L dfl (10)
[0044] Wherein, λ1, λ2 and λ3 are the weighting coefficients of each loss term.
[0045] The beneficial effects of this invention are as follows:
[0046] This invention significantly enhances the ability to perceive and model the features of small targets in UAV aerial images by introducing the Attention Scale Selection (AGSS) module and the Dynamic Local Self-Attention (DPSA) module, while basically maintaining the original detection efficiency.
[0047] The AGSS module can dynamically adjust the weights of multi-scale features based on the scale distribution of targets in an image, effectively enhancing the saliency of small target features. This module achieves adaptive fusion of multi-scale features through a lightweight weight generation mechanism, overcoming the limitations of fixed-weight fusion in traditional feature pyramid networks. It achieves effective collaboration between global context and local features without introducing significant computational overhead.
[0048] The DPSA module introduces a dynamic channel routing mechanism, which adaptively activates channels sensitive to small targets based on the input content, significantly reducing redundant computation. This module employs a lightweight path selection strategy based on mean and threshold values, avoiding the parameter overhead of traditional fully connected MLP channel selection methods. Simultaneously, through a unique dual-path processing structure, it enhances the representation of key channel features while preserving the original channel information, ensuring the model has good adaptability and generalization ability for multi-scale targets.
[0049] In summary, this invention provides an efficient and reliable solution for small target detection in UAV aerial photography scenarios, and has good practical application value and promotion prospects. Attached Figure Description
[0050] Figure 1This is a diagram illustrating the overall algorithm architecture of an embodiment of the present invention.
[0051] Figure 2 This is a diagram of the AGSS architecture according to an embodiment of the present invention;
[0052] Figure 3 This is a diagram of the DSPA architecture according to an embodiment of the present invention;
[0053] Figure 4 This is a graph showing the changes in metrics during the training process according to an embodiment of the present invention;
[0054] Figure 5 The image shown is a PR graph representing the training results of an embodiment of the present invention. Detailed Implementation
[0055] This invention provides a method for detecting dense small targets in UAV aerial photography scenarios, aiming to solve the problem of small target scale variation caused by changes in flight altitude, differences in imaging resolution, and scene complexity. The main flowchart of the method is as follows. Figure 1 As shown, the specific implementation steps are as follows:
[0056] Step (1) Extract multi-scale feature maps. The specific steps are as follows:
[0057] The original aerial image I∈R 3×H×W After standardization and data augmentation, the data is input into the Backbone network. This network extracts multi-scale features based on convolutional and residual structures, resulting in a set of output feature maps {F1, F2, ..., F...}. N}, where N is the number of feature maps, corresponding to the feature representations under different receptive fields.
[0058] In the preprocessing stage, the input data is normalized to enhance feature stability. This process can be represented as:
[0059]
[0060] Where μ is the mean of image pixels, σ is the standard deviation, and ε is a minimal constant used for numerical stability.
[0061] Step (2) enhances the features using the Attention Scale Selection Module (AGSS), whose structure is as follows: Figure 2 As shown, the specific steps are as follows:
[0062] Step (21) Global average pooling: For the input feature map F∈R C×H×W Performing global average pooling compresses the spatial dimension while preserving channel statistics, achieving preliminary dimensionality reduction and key information extraction, resulting in the channel feature vector z. c This process can be represented as:
[0063]
[0064] Where H and W are the height and width of the feature map, respectively, C is the number of channels, and F is the width and height of the feature map. c Let F be the feature on the c-th channel.
[0065] Step (22) Scale weight generation: In order to extract and reconstruct scale-related information, the pooling feature z is weighted... c Two linear transformations are performed sequentially. The first layer uses the ReLU activation function to enhance the nonlinear expressive power, and the second layer uses the Sigmoid function to constrain the output to the interval [0, 1], thereby adaptively generating the scale weight vector s. c This process can be represented as:
[0066] s c =σ(W2·δ(W1·z) c (3)
[0067] Where δ(·) is the ReLU activation function, σ(·) is the Sigmoid function, and W1 and W2 are the weight matrices of the linear transformation.
[0068] Step (23) Feature recalibration: Adjust the scale weights s c As a modulation factor, the original feature F c Channel-by-channel weighting is performed to achieve adaptive recalibration of multi-scale features, resulting in the modulated feature map. This process can be represented as:
[0069]
[0070] Among them, s c With F c These represent the scale weight and input feature of the c-th channel, respectively.
[0071] In the feature fusion stage, to establish a unified multi-scale feature representation, a spatial resampling and channel adjustment mechanism is introduced. Let F be the feature from level l. l It is mapped to a unified dimension through linear interpolation and convolution operations:
[0072]
[0073] in, φ and φ represent the spatial adjustment and channel mapping functions, respectively. This indicates a feature splicing operation.
[0074] The fused multi-scale features are then input into the AGSS module to achieve dynamic scale weight allocation. Unlike traditional static feature pyramids, AGSS represents features at different scales as a weighted combination, a process that can be expressed as:
[0075]
[0076] Where, α l For the dynamic weights generated through global pooling and linear mapping, satisfy...
[0077] Step (3) involves sparse channel modeling of the features, implemented using a Dynamic Local Self-Attention Module (DPSA), the structure of which is as follows: Figure 3 As shown, the specific steps are as follows:
[0078] Step (31) Local context extraction: Input feature X∈R C×H×W By using depthwise separable convolution, local contextual information is extracted to obtain the enhanced feature X′. This process can be represented as:
[0079] X′=DWConv(X) (7)
[0080] Where DWConv(·) is the depthwise separable convolution operator.
[0081] Step (32) Channel attention generation: Channel attention modeling is performed on feature X′. First, channel statistics are obtained through global average pooling, and then channel attention weights g are generated through group normalization and Sigmoid activation function. c ∈[0,1], the process can be represented as:
[0082]
[0083] Where GN is the group normalization operation and σ(·) is the Sigmoid function.
[0084] Step (33) Sparse channel selection: based on channel attention weights g c Based on a preset threshold τ, sparse selection is performed on feature channels, applying only the importance weights g. c Channels >τ are computed using multi-head self-attention (MHSA), while the remaining channels retain their original features. This process can be represented as:
[0085]
[0086] Among them, R c These are the channel features after sparse selection.
[0087] Furthermore, a multi-head attention mechanism is applied to the selected channel, and its attention matrix is calculated as follows:
[0088]
[0089] Where Q and K are the query and key vectors, respectively, and d kM is the dimension of the key vector. g This is a channel mask matrix used to preserve the gated channels, and its definition is:
[0090] M c =1[R c =MHSA(X′)] (11)
[0091] The attention output is then fused with the value vector V to obtain the output Y:
[0092] Y = AV (12)
[0093] Step (34) Feature Fusion and Output: After concatenating the attention output Y with the side-channel feature X, it is mapped back to the original channel dimension through a 1×1 convolution:
[0094] Z = Conv 1×1 ([Y, X]) (13)
[0095] In step (4), the target detection and localization results are output. The specific steps are as follows:
[0096] Step (41) Classification probability calculation: For the fused feature f(F) agg The classification branching process is performed, and the predicted probabilities of each category are calculated through a fully connected layer and a temperature-scaling softmax function to achieve multi-class classification. The prediction result of each candidate box is jointly represented by the classification probability and the location regression. This process can be expressed as:
[0097]
[0098] Among them, W c M is the weight vector for class c. k This is the weight vector for all categories, and T > 0 is the temperature coefficient used to adjust the smoothness of the predicted distribution.
[0099] The classification task uses the cross-entropy loss function, which is calculated as follows:
[0100]
[0101] Among them, y c The true label for category c.
[0102] Step (42) Bounding box regression optimization: The distribution focusing loss (DFL) is introduced to improve regression accuracy and training stability by discretizing the bounding box distribution and optimizing its shape. At the same time, the generalized IoU loss is used as a constraint for bounding box regression, which is defined as follows:
[0103]
[0104] Among them, B pTo predict the bounding box, B gt C represents the actual bounding box, and C is the smallest bounding rectangle of the two.
[0105] Step (43) Design of the total loss function: The total loss function is composed of the classification loss L cls Bounding box regression loss L GIoU With distribution focusing loss L sparse Composed of three parts, it achieves multi-task collaborative optimization through weighted summation. This process can be expressed as:
[0106] L=λ1L cls +λ 2GIoU +λ3L sparse (17)
[0107] in, To improve the stability of channel selection, λ1, λ2, and λ3 are the weighting coefficients of each loss term.
[0108] The experiment verified the following:
[0109] After the model inference verification is completed, this embodiment further clarifies the training settings and parameter configurations during the experiment to ensure that the technical solution is repeatable and verifiable. The hardware and software environment used in the specific implementation, as well as the key hyperparameters involved in model training, are described below. Parameters such as data partitioning ratio, batch size, number of training rounds, learning rate, and optimization strategy have a direct impact on the model's convergence behavior and final performance. The following configuration provides a clear experimental benchmark for model training and evaluation, and the relevant parameters are detailed in Table 1.
[0110] This embodiment uses the VisDrone-DET2019 dataset for model training and performance evaluation. This dataset is specifically designed for drone aerial photography scenarios, covering various typical and complex environments such as city streets, squares, parks, and main traffic arteries. Its target categories mainly include common objects such as pedestrians, cars, public transportation vehicles, bicycles, and motorcycles, with particular emphasis on fine-grained annotation of small and dense targets. It fully reflects the practical challenges of drone aerial photography tasks, such as small target scale, dense distribution, and complex backgrounds. This dataset provides high-resolution aerial images and accurate target annotation information, including bounding box positions and category labels. Some subsets also provide annotation formats suitable for target tracking and segmentation tasks. The image acquisition covers different weather conditions, lighting variations, and shooting angles, exhibiting good diversity. This allows the model to better adapt to the complexity of real-world scenes during training, providing a reliable experimental basis for the verification and optimization of small target detection algorithms.
[0111] Table 1 Experimental Parameter Configuration Table
[0112]
[0113]
[0114] In small object detection tasks, a series of evaluation metrics are typically used to comprehensively measure model performance, reflecting the accuracy and robustness of the detection results from different perspectives. Precision and recall evaluate the accuracy and coverage of the detection results, respectively, and are fundamental performance metrics. mAP@50 and mAP@50-95 are average precision calculated based on different IoU thresholds, providing a comprehensive assessment of the model's overall detection capability. mAP@50 focuses on more lenient matching conditions, reflecting the model's coarse-grained detection capability, while mAP@50-95, by combining the average precision across multiple IoU thresholds, better reflects the model's comprehensive performance in both precise localization and robust detection, fully reflecting the model's performance under different localization requirements. The calculation formulas for each metric are as follows:
[0115] Precision is defined as the proportion of correctly detected targets out of all detected targets.
[0116]
[0117] Recall is defined as the proportion of correctly detected targets out of all true targets:
[0118]
[0119] Where TP represents the number of correctly identified targets, FP represents the number of incorrectly identified targets, and FN represents the number of missed targets.
[0120] mAP@50 represents the average precision of each category at an IoU threshold of 0.5.
[0121]
[0122] mAP@50-95 is the combined mean of the average accuracy for each category across multiple IoU threshold settings ranging from 0.5 to 0.95 (in steps of 0.05).
[0123]
[0124] Where N is the total number of target categories, AP i This represents the average accuracy of the i-th class at an IoU threshold of 0.5.
[0125] Table 2 shows the performance comparison results of this invention with several existing mainstream detection models on the VisDrone-DET2019 dataset.
[0126] Table 2 compares the detection performance on the VisDrone-DET2019 dataset.
[0127]
[0128] Experimental results show that traditional detection models SSD and Mask R-CNN are significantly deficient in terms of accuracy and recall, with mAP@50-95 metrics of 0.214 and 0.236, respectively, reflecting their weak adaptability and robustness to multi-scale targets. In contrast, the YOLO series models significantly outperform traditional methods, with YOLOv8 and YOLOv10 achieving mAP@50 of 0.447 and 0.451, respectively, representing a substantial improvement over SSD and Mask R-CNN and demonstrating a good balance between speed and accuracy in single-stage detectors. Furthermore, the RT-DETR series models based on the Transformer architecture exhibit excellent accuracy, with RT-DETR and RT-DETRV2 achieving mAP@50 of 0.452 and 0.454, respectively, showcasing their advantages in global feature modeling.
[0129] It is worth noting that this invention achieves optimal performance in three key metrics: recall, mAP@50, and mAP@50-95. In particular, mAP@50 and mAP@50-95 reach 0.485 and 0.298 respectively, representing improvements of 6.8% and 10.4% compared to the best-performing comparative model. While maintaining a precision comparable to mainstream methods, this invention achieves a recall of 0.595, significantly higher than other comparative methods. This indicates that by introducing the AGSS and DPSA modules, the model can more effectively capture the feature representations of small targets, significantly reducing the false negative rate. In summary, this invention significantly improves the recall capability for small targets while maintaining high detection accuracy, demonstrating superior overall performance in complex UAV aerial photography scenarios.
[0130] To evaluate the impact of key hyperparameters on model performance, this invention further conducted sensitivity experiments, performing tuning experiments on the learning rate and optimizer respectively. Performance comparisons under different learning rates are shown in Table 3.
[0131] Table 3 Comparison of detection performance at different learning rates
[0132]
[0133] Experimental results show that as the learning rate decreases from 0.0005 to 0.0001, the model exhibits a steady improvement in precision, recall, mAP@50, and mAP@50-95. A higher learning rate may lead to excessively large parameter updates, affecting model convergence stability; therefore, when the learning rate is 0.0005, the metrics are relatively low. With an appropriate decrease in the learning rate, the model's gradient optimization process becomes more thorough and stable, gradually improving performance. When the learning rate is set to 0.0001, the model reaches its optimal level across all metrics, indicating that in the task scenario of this embodiment, a lower learning rate helps balance convergence speed and training stability, thereby achieving better detection results.
[0134] In addition, this invention also compared the impact of different optimizers on model performance, and the experimental results are shown in Table 4.
[0135] Table 4 Comparison of detection performance under different optimizers
[0136]
[0137] Experimental results show that optimizer selection has a significant impact on model performance. The AdaGrad optimizer performed poorly, with all metrics at the lowest levels, indicating its inability to adapt to the training requirements of complex datasets. The SGD optimizer showed some improvement, but was still limited by convergence speed and local optima. The Adam optimizer, with its adaptive learning rate mechanism, achieved further improvements in training stability and detection accuracy. In contrast, the AdamW optimizer outperformed the other optimizers in all four metrics, demonstrating that its weight decay mechanism effectively controlled overfitting and achieved a better balance between regularization constraints and optimization efficiency, making it the optimal choice for the task in this embodiment.
[0138] The above description is a further detailed explanation of the present invention in conjunction with specific / preferred embodiments. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0139] The parts of this invention not described in detail are well-known to those skilled in the art.
Claims
1. A method for detecting small dense targets in aerial scenes using unmanned aerial vehicles, comprising the following steps: (1) Image input and preprocessing: After preprocessing the original aerial image, input it into the backbone network to extract multi-scale feature maps with different receptive fields. (2) Multi-scale feature enhancement: Introduce the attention scale selection (AGSS) module in the feature fusion network (Neck), and use the dynamic weight distribution mechanism to adaptively weight and fuse multi-scale features to enhance the feature expression ability of key targets. (3) Sparse channel modeling: Introduce the dynamic local self-attention (DPSA) module after the AGSS module to select and model the feature channels, and concentrate computing resources on channels sensitive to small targets. (4) Output of detection results: Through the detection head, realize the output of target detection and positioning results. 2.The method of claim 1, wherein In step (1), multi-scale feature maps are extracted, and the specific steps are as follows: The original aerial image I ∈ R 3×H×W After standardization and data augmentation operations, it is input to the Backbone network. This network extracts multi-scale features based on convolution and residual structure, obtaining a set of output feature maps {F1, F2,..., FN}, where N is the number of feature maps, corresponding to the feature representation under different receptive fields, respectively. N} 3.The method of claim 1, wherein In step (2), the features are enhanced, and the specific steps are as follows: (21) Global average pooling processing: the input feature map F ∈ R C×H×W Global average pooling operation is performed to compress the spatial dimension and retain channel statistical information, realize preliminary dimension reduction and key information extraction, and obtain a channel feature vector z c The process can be represented as: where H and W are the height and width of the feature map, respectively, C is the number of channels, and F c is the feature on the Fth channel. (22) Scale weight generation: To extract and reconstruct scale-related information, the pooled feature z c Two linear transformations are sequentially performed, the first layer uses the ReLU activation function to enhance the non-linear expression ability, and the second layer uses the Sigmoid function to constrain the output to the interval [0, 1], thereby adaptively generating a scale weight vector s c The process can be represented as: s c = σ(W2·δ(W1·z c )) (2) Where δ(·) is the ReLU activation function, σ(·) is the Sigmoid function, and W1 and W2 are the weight matrices of linear transformation. (23) Feature re-scaling: scale the weights s c As the modulation factor, the original feature F c The adaptive re-scaling of multi-scale features is achieved by channel-wise weighting, and the modulated feature map F This process can be represented as: where s c with F c denote the scale weight and input feature of the c-th channel, respectively.
4. The method of claim 1, wherein In step (3), the features are modeled by sparse channels, and the specific steps are as follows: (31) Local context extraction: input feature X ∈ R C×H×W By deep separable convolution, the local context information is extracted to obtain the enhanced feature X′, and the process can be represented as: X' = DWConv(X) (4) Where DWConv(·) is the depth separable convolution operator. (32) Channel attention generation: Channel attention modeling is performed on the feature X′, first by obtaining channel statistics through global average pooling, and then by group normalization and Sigmoid activation function to generate channel attention weight g c ∈ [0, 1], the process can be represented as: Where GN is the group normalization operation, and σ(·) is the Sigmoid function. (33) Sparse channel selection: based on channel attention weights g c and a preset threshold τ, the feature channels are sparsely selected, and multi-head self-attention (MHSA) is applied to the channels with importance weights g c >τ, and the remaining channels retain the original features. This process can be represented as: wherein R c is the channel feature after sparse selection. (34) Feature fusion and output: Fuse the channel features R C along the channel dimension, and realize feature fusion and compression through the convolution layer to obtain the final output Y. This process can be represented as: Y = Conv([R1, R2,..., R c ]) (7) 5. The method of claim 1, wherein In step (4), the target detection and positioning results are output, and the specific steps are as follows: (41) Classification probability calculation: Perform classification branch processing on the fused features f(x), calculate the prediction probability of each class through the fully connected layer and the Softmax function, and realize multi-class classification. This process can be represented as: where f(x) is the fusion feature corresponding to the input sample x, W c is the weight vector of the class c, W k is the weight vector of all classes. (42) Boundary box regression optimization: Introduce the distribution focus loss (DFL), optimize the shape of the distribution by discretizing the boundary box distribution, and improve the regression accuracy and training stability. The loss function is defined as: where y i is the true label, p i is the model's predicted probability distribution, and γ is a tuning coefficient that controls the degree of penalty for easy-to-classify samples. (43) Total loss function design: The total loss function is composed of classification loss L cls , bounding box regression loss L box and distribution focusing loss L dfl , and the multi-task collaborative optimization is realized by weighted summation, and the process can be represented as: L = λ1L cls + λ2L box + λ3L dfl (10) Where λ1, λ2 and λ3 are the weight coefficients of each loss term.
Citation Information
Cited By
Unmanned aerial vehicle overlooking small target detection method based on density perception and spatial hierarchy
CN121640326A
Unmanned aerial vehicle top-view small target detection method based on density perception and spatial hierarchy
CN121640326B
Light-weight aerial photography target detection method and system based on recursive attention fusion
CN121767890A