Lightweight small target detection method and system for images shot by unmanned aerial vehicle
By constructing a lightweight neural network architecture and combining attention enhancement and dynamic upsampling, the problem of insufficient detection accuracy and speed in UAV image target detection is solved, achieving efficient small target detection in complex backgrounds, and is suitable for UAV platforms with limited resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF SCI & TECH
- Filing Date
- 2026-01-08
- Publication Date
- 2026-04-24
AI Technical Summary
Existing UAV image target detection technologies suffer from insufficient detection accuracy and speed under low power consumption constraints. In particular, the foreground and background features are often confused in complex backgrounds, making it difficult to achieve real-time and efficient small target detection.
A cascaded optimized overall neural network architecture is constructed, including a backbone network, a feature aggregation network, and a detection head. A lightweight and attention-enhanced approach is adopted, combined with a dynamic upsampling module and a large kernel depthwise separable convolution. End-to-end training is performed through a hybrid loss function to improve feature extraction and object detection capabilities.
It achieves high-precision and rapid small target detection on resource-constrained UAV platforms, possesses strong anti-background interference capabilities and environmental adaptability, improves detection speed and accuracy, and is suitable for real-time target detection on UAVs.
Smart Images

Figure CN121921682A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to a lightweight method and system for detecting small targets in images captured by unmanned aerial vehicles (UAVs). Background Technology
[0002] With the rapid development of artificial intelligence (AI) technology, its application in scenarios such as real-time drone perception, disaster relief, power line inspection, agricultural plant protection, and border and coastal patrol is of great strategic significance. Among these, real-time target detection in drone-captured images, as a core technology for drone visual perception and intelligent decision-making, aims to quickly search for the location of targets of interest in images and identify their category attributes using efficient algorithms with minimal computing resources. In recent years, lightweight target detection technology has been widely applied to consumer and industrial drone platforms, becoming an indispensable key technology for achieving high frame rates and high-precision intelligent perception in low-power embedded devices.
[0003] In the early stages of UAV image target detection development, traditional algorithms, limited by the computing power of embedded platforms, heavily relied on hand-designed lightweight feature extractors, making it difficult to meet real-time requirements. However, the rapid development of deep learning and lightweight model technologies has greatly propelled the advancement of UAV-borne target detection, making it a core pillar in the field of modern UAV edge intelligence.
[0004] While convolutional neural networks possess powerful feature representation capabilities, images captured by drones generally suffer from problems such as dense small targets, varying perspectives, motion blur, drastic lighting changes, and complex background interference. Furthermore, the power consumption and computing power of onboard chips limit the real-time deployment of traditional large models. With technological advancements, researchers have introduced lightweight methods such as model compression, structural reparameterization, large kernel design, and knowledge distillation into the field of drone target detection. These methods include reconstructing efficient feature pyramids, designing lightweight backbones and necks, and lightweight detection heads. However, existing research often overlooks feature loss during information transmission by edge devices and the problem of foreground and background feature confusion in complex outdoor environments. As a result, drone target detection still suffers from insufficient detection accuracy and speed under low power constraints. Summary of the Invention
[0005] The purpose of this invention is to provide a lightweight small target detection method and system for UAV-captured images, which features low loss of feature information transmission, strong resistance to background interference, strong environmental adaptability, high detection accuracy, fast detection speed, and strong real-time performance.
[0006] The technical solution for achieving the objective of this invention is: a lightweight small target detection method for images captured by drones, comprising the following steps:
[0007] Step 1: Construct a cascaded optimized overall neural network architecture, which includes a backbone network, a feature aggregation network, and a detection head in sequence;
[0008] Step 2: Implement a joint improvement of lightweighting and attention enhancement in the backbone network, and use the improved backbone network to extract multi-scale feature layers in the image to obtain multi-scale initial feature maps;
[0009] Lightweighting refers to replacing the feature extraction module C3K2 in the original YOLOv11 backbone network with a lightweight feature extraction module, the improved module being LWGA_Block;
[0010] Attention enhancement refers to embedding the efficient attention mechanism module EAC into the parallel spatial attention convolution block C2PSA;
[0011] Step 3: Combine the dynamic upsampling module EADU and the modules unique to the YOLOv11 network to construct the feature aggregation network Neck, perform cross-level fusion and refinement processing on the multi-scale initial feature map, and output the optimized refined feature map.
[0012] Step 4: Combining the large kernel depth separable convolutional module and the decoupled head structure unique to the YOLOv11 network, a lightweight object detection head is constructed to perform decoupled prediction on the refined feature map;
[0013] Step 5: End-to-end training is performed using a hybrid loss function based on normalized Wasserstein distance and modulation IoU to obtain a lightweight network that has been trained.
[0014] Step 6: Input the image of the drone to be detected into the lightweight network trained in Step 5. The network will then go through the feature extraction in Step 2, the feature fusion and refinement in Step 3, and the head decoupling prediction in Step 4. The network will output the class confidence and bounding box coordinates of each detected target, thus completing the detection of lightweight small targets.
[0015] Furthermore, the construction of the overall neural network architecture described in step 1 includes a backbone network, a feature aggregation network (Neck), and a detection head, as detailed below:
[0016] The backbone network performs multi-scale primary feature extraction.
[0017] The feature aggregation network Neck is used for multi-level feature fusion and refinement.
[0018] The detection head is used for classification and location decoupling output.
[0019] Furthermore, in step 2, the feature extraction module C3K2 in the original YOLOv11 backbone network is replaced with a lightweight feature extraction module, LWGA_Block, as detailed below:
[0020] LWGA_Block integrates four attention variants: Gated Point Attention (GPA) for capturing key points of small targets, Regular Local Attention (RLA) for extracting local details, Sparse Mid-Range Attention (SMA) for modeling mid-range irregular structures, and Sparse Global Attention (SGA) for long-range dependency association. Batch normalization and residual addition are uniformly used at the end of each LWGA_Block.
[0021] LWGA_Block is described as follows:
[0022]
[0023]
[0024]
[0025]
[0026] in, Indicates the input feature map, This represents the intermediate feature map. This represents the convolution operation. This indicates a splicing operation. Indicates a lightweight module. Channel counting is ,and Channel count is Semantic information is processed using the LWGA attention mechanism, followed by 1×1 convolution to recover the number of channels, and batch normalization is applied. Using random deactivation and Dropout to prevent overfitting, the final channel number is generated as follows: of ,in:
[0027]
[0028]
[0029]
[0030]
[0031]
[0032] in, This indicates a splitting operation. The channel count is , The channel count is The four sub-blocks are processed by four attention modules: GPA, SMA, SGA, and RLA, respectively, to finally generate output feature maps. .
[0033] Furthermore, the efficient attention mechanism module EAC described in step 2 includes an initialization convolutional layer, a spatial context aggregation layer, an attention generation and upsampling layer, and a fusion and application attention layer;
[0034] The initial convolutional layer uses 1×1 convolution to perform channel mixing and dimensionality reduction operations on the input feature map;
[0035] The spatial context aggregation layer captures the global context of the entire image through global average pooling and uses large kernel depth separable convolution to process a large receptive field, generating a high-resolution spatial attention map to model the spatial relationships of targets across scales in UAV images.
[0036] The attention generation and upsampling layer converts the generated spatial attention map into a 0~1 weight distribution through activation, and restores it to the same size as the upsampled deep low-resolution features through bilinear upsampling, thereby achieving alignment of multi-scale features.
[0037] The fusion and application attention layer concatenates the attention-enhanced high-resolution features with the directly upsampled deep semantic features along the channel dimension to obtain a fused feature map. The residual original input is then used to highlight key target regions and suppress background interference.
[0038] Furthermore, in the feature aggregation network Neck described in step 3, feature maps of different scales generated by the backbone network are fed into the classic bidirectional PAN structure for deep fusion to generate feature maps with multi-scale information, as follows:
[0039] First, deep features are upsampled layer by layer from top to bottom: after upsampling, the P5 feature is concatenated with the P4 feature, and then the C3k2 module performs channel interaction and feature refinement; the refined features are upsampled again and concatenated with the P3 feature, and then deeply integrated through the C3k2 module, thereby gradually injecting deep semantic information into the high-resolution shallow features.
[0040] Then, it proceeds to the bottom-up path: starting from the shallowest fused features, it passes them down and concatenates them with the backbone features of the corresponding scale in turn. The C3k2 module is used for feature recombination and semantic enhancement, and finally, three complementary and scale-adaptive enhanced feature maps P3′, P4′, and P5′ are generated.
[0041] Finally, the fused features are expanded in the channel dimension, enriching the details and semantic expression, and are ultimately passed to the Head detection head to output the target's category confidence and location information, thus completing the target detection task.
[0042] Furthermore, the dynamic upsampling module EADU described in step 3 is used to fuse multi-scale feature maps, and at the same time improves the feature map's ability to focus on key regions through a very lightweight spatial attention mechanism, as detailed below:
[0043] The Dynamic Upsampling Module (EADU) receives feature maps from the current layer of the backbone network and low-resolution feature maps from deeper layers as dual inputs.
[0044] First, the feature map of the current layer of the backbone is sequentially subjected to 1×1 convolution, global average pooling, and spatial attention generation to obtain high-resolution features with enhanced attention.
[0045] Then, the high-resolution feature is bilinearly upsampled to align the resolution with the low-resolution feature map. Meanwhile, another branch directly bilinearly upsamples the low-resolution feature map from a deeper layer to preserve semantic strength.
[0046] Finally, the attention-enhanced upsampling features and the directly upsampling deep features are concatenated along the channel dimension to obtain a fused feature map that is richer in information and balanced in detail and semantics.
[0047] Furthermore, step 4 describes the construction of a lightweight object detection head by combining a large kernel depthwise separable convolutional module with the decoupled head structure unique to the YOLOv11 network, as detailed below:
[0048] By combining the large kernel depth separable convolution module and the decoupled head structure unique to the YOLOv11 network, a lightweight object detection head is constructed, including the large kernel depth separable convolution LDConv, the lightweight decoupled branch LDB, the dynamic channel recalibration module DCR, the efficient distributed focus regression module EDFH, and the residual shallow feature injection module RMI.
[0049] (1) The large kernel depthwise separable convolution LDConv uses a super large kernel depthwise separable convolution of 13×13~21×21 to capture the axial global context of two or more scales at once, thereby generating deep semantic features with context awareness. Then, a large kernel decomposition function is used to further reduce the computational cost, as follows:
[0050] ① The receptive field in the horizontal and vertical directions is expanded by using two large strip convolutions. First, horizontal strip convolutions are used to expand the horizontal context and adjust the receptive field of each row. Then, the features are normalized by BN and non-linearity is added by SiLU. Finally, the receptive field is expanded by using vertical strip convolutions in the vertical direction. The convolutions in the two directions can be decoupled, thus adapting to targets of any scale.
[0051] ② A shared-separated feature fusion function is adopted to fuse the feature streams of classification and regression tasks. First, a 1×1 point convolution is used to separate the task channels, and the task-specific weights are generated by the Dynamic Channel Recalibration (DCR) module. Then, the recalibrated weights are weighted onto the shared features by Hadamard. Next, batch normalization and SiLU are added after LDConv to refine the features. Finally, the high-resolution features of the P3 layer are directly added to the output of the detection head by the residual shallow feature injection (RMI) module.
[0052] (2) The lightweight decoupling branch LDB shares the feature extraction paths of the classification and regression tasks and achieves task separation through convolution operations, as follows: First, it receives the shared deep semantic feature map output by the large kernel depth separable convolution as input; then the classification branch and the regression branch directly reuse the same shared feature map; then, two independent 1×1 convolutions are used to generate the classification score map and the bounding box regression parameter map respectively; finally, the outputs of the two branches are directly fed into the subsequent loss calculation.
[0053] (3) The Dynamic Channel Recalibration (DCR) module performs task-specific channel weighting on the shared feature map and achieves dynamic separation of classification and regression through a lightweight attention mechanism, as follows: First, it receives the shared feature map before LDB as input; then, it compresses spatial information through global average pooling, and performs channel interaction through two fully connected layers and the SiLU activation function; next, it uses Sigmoid to generate two sets of independent channel attention weights; finally, it adds the generated classification weights and regression weights to the original shared feature map by element-wise multiplication.
[0054] (4) The efficient distribution focal regression module EDFH transforms direct coordinate regression into center-scale distribution prediction, as follows: First, it receives the feature map of the regression branch as input; then, it abandons the prediction of the four independent values of left, top, right, and bottom, and only outputs the prediction map of the four channels of center offset (dx, dy) and width and height scaling factors (ds, dt); then, in the decoding stage, it restores the real bounding box through the distribution focal method; finally, it is optimized in conjunction with Distribution Focal Loss during training.
[0055] (5) The residual shallow feature injection module RMI performs residual fusion of high-resolution shallow features and deep semantic features, and achieves multi-scale detail enhancement through direct addition operation, as follows: First, it receives the high-resolution feature map of the earliest P3 layer of the Backbone and the final output feature map of the detection head as input; then, it performs channel compression on the P3 shallow features using 1×1 convolution; then, it performs size alignment with the output feature maps of the detection head at three scales; finally, it injects the compressed shallow feature residual into the deep features by adding elements one by one.
[0056] Furthermore, step 5 involves end-to-end training using a hybrid loss function based on normalized Wasserstein distance and modulation IoU to obtain a trained lightweight network, as detailed below:
[0057] Normalized Wasserstein distance is introduced to measure the similarity between bounding boxes of small objects. After being converted into a similarity metric, it is used together with the original Intersection over Union (IoU) loss for training of a hybrid loss.
[0058] By bounding box and bounding box Modeling was performed, and the resulting bounding box A was obtained as a Gaussian distribution. Gaussian distribution of bounding box B Simplified to:
[0059]
[0060] in, Represents a constant. and This represents the x-coordinate of the bounding box location point. and This represents the ordinate of the bounding box location point. and Indicates the width of the bounding box. and Indicates the height of the bounding box;
[0061] It is a distance metric, and the normalized Wasserstein distance, obtained using the exponentially normalized form exp, is as follows:
[0062]
[0063] in, It is a constant strongly correlated with the dataset, set Given the average absolute size bounding box of the dataset, the loss formula is as follows:
[0064]
[0065]
[0066] In the formula, For a modulation coefficient, To include the normalized Wasserstein loss, This is the original crossover and union ratio loss of the network.
[0067] A lightweight small target detection system for drone-captured images is disclosed. This system implements the aforementioned lightweight small target detection method for drone-captured images. The system includes...
[0068] The backbone network module implements a joint improvement of lightweighting and attention enhancement in the backbone network. The improved backbone network is used to extract multi-scale feature layers in the image to obtain multi-scale initial feature maps.
[0069] The feature aggregation network module, combined with the dynamic upsampling module EADU and the modules unique to the YOLOv11 network, constructs the feature aggregation network Neck, which performs cross-level fusion and refinement processing on the multi-scale initial feature map, and outputs the optimized refined feature map.
[0070] The detection head module combines a large kernel depthwise separable convolutional module and the decoupled head structure unique to the YOLOv11 network to construct a lightweight object detection head, which performs decoupled prediction on the refined feature map;
[0071] The training module uses a hybrid loss function based on normalized Wasserstein distance and modulation IoU for end-to-end training to obtain a lightweight network after training.
[0072] The target inspection module inputs the image of the drone to be detected into a trained lightweight network. The network then performs feature extraction, feature fusion and refinement, and head decoupling prediction. Finally, it outputs the class confidence and bounding box coordinates of each detected target, thus completing the detection of lightweight small targets.
[0073] A mobile terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the lightweight small target detection method for images captured by a drone.
[0074] Compared with the prior art, the significant advantages of this invention are:
[0075] (1) The design of “group parallelism + selective global interaction” makes full use of the natural redundancy of feature maps, and naturally generates more diverse and directional gradient flows during the training stage. This enables the basic features of each key stage to have stronger local detail preservation capabilities, richer cross-scale semantic depth, and more efficient global context awareness capabilities. At the same time, it introduces almost no additional computational overhead. Batch normalization + residual addition is uniformly used at the end of each LWGA_Block to ensure training stability and excellent inference speed.
[0076] (2) The attention mechanism module is used to obtain a fusion feature map with rich details and balanced semantics. The key target area is highlighted and the background interference is suppressed through the residual original input, thereby improving the model's ability to perceive small targets, dense targets and complex backgrounds.
[0077] (3) The attention-enhanced upsampling features and the directly upsampling deep features are concatenated along the channel dimension to obtain a fusion feature map with richer information and balanced details and semantics, which improves the network’s multi-scale target detection performance in UAV-captured images.
[0078] (4) The normalized Wasserstein distance is used and a hybrid loss function is constructed in conjunction with the modulation coefficient to enhance the robustness and convergence stability of the small target bounding box regression;
[0079] (5) It maintains high detection accuracy while reducing model complexity, and is suitable for real-time detection tasks on resource-constrained platforms such as UAVs. Attached Figure Description
[0080] Figure 1 This is a flowchart illustrating a lightweight small target detection method for images captured by drones according to the present invention.
[0081] Figure 2 This is a schematic diagram of the structure of the improved YOLO network constructed in this invention. Detailed Implementation
[0082] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0083] like Figure 1 , Figure 2 As shown, the present invention provides a lightweight small target detection method for images captured by drones, comprising the following steps:
[0084] Step 1: Construct the overall neural network architecture, including the backbone network, the Neck feature aggregation network, and the head detection head. The drone image to be detected is first input into the backbone network, where features are extracted by the feature module. Then, the extracted feature maps are input into the Neck feature aggregation network for feature concatenation. Finally, the images are input into the head detection head for target detection.
[0085] Step 2: Use an improved feature extraction network as the backbone to extract multi-scale feature layers from the image, as follows:
[0086] Step 2.1: Replace the C3K2 feature extraction module in the YOLOv11 backbone network with a lightweight feature extraction module, LWGA_Block, as follows:
[0087] LWGA_Block collaboratively integrates four attention variants tailored for the multi-scale characteristics of remote sensing: Gated Point Attention (GPA) for fine-grained capture of key points of small targets, Regular Local Attention (RLA) for efficient local detail extraction, Sparse Mid-Range Attention (SMA) for mid-range irregular structure context modeling, and Sparse Global Attention (SGA) for long-range dependency association. This "grouped parallelism + selective global interaction" design fully utilizes the natural redundancy of feature maps, naturally generating more diverse and directional gradient flows during the training phase. This enables the basic features of each key stage to simultaneously possess stronger local detail preservation capabilities, richer cross-scale semantic depth, and more efficient global context awareness capabilities, while introducing almost no additional computational overhead. Batch normalization and residual addition are uniformly used at the end of each LWGA_Block to ensure training stability and excellent inference speed.
[0088] LWGA_Block can be described as follows:
[0089]
[0090]
[0091]
[0092]
[0093] in, Indicates the input feature map, This represents the intermediate feature map. This represents the convolution operation. This indicates a splicing operation. Indicates a lightweight module. Channel counting is ,and Channel count is Semantic information is processed using the LWGA attention mechanism, followed by 1×1 convolution to recover the number of channels, and batch normalization is applied. Using random deactivation and Dropout to prevent overfitting, the final channel number is generated as follows: of ,in:
[0094]
[0095]
[0096]
[0097]
[0098]
[0099] in, This indicates a splitting operation. The channel count is , The channel count is The four sub-blocks are processed by four attention modules: GPA, SMA, SGA, and RLA, respectively, to finally generate output feature maps. .
[0100] Step 2.2: Embed the efficient attention mechanism module EAC into C2PSA to improve the feature extraction capability, as detailed below:
[0101] The attention mechanism module EAC includes an initialization convolutional layer, a spatial context aggregation layer, an attention generation and upsampling layer, and a fusion and application attention layer.
[0102] The initial convolutional layer uses 1×1 convolution to perform efficient channel mixing and dimensionality reduction on the input feature map, while retaining the original features as residual paths. This achieves feature compression and information recombination with almost no increase in parameters, helping the model to quickly focus on high-value channels and provide a more compact input for subsequent spatial attention.
[0103] The spatial context aggregation layer, based on dimensionality reduction features, quickly captures the global context of the entire image through global average pooling, and uses large kernel depth separable convolution to process a large receptive field, generating a high-resolution spatial attention map. This captures local details and long-range dependencies at extremely low computational cost, enabling the modeling of spatial relationships of targets across scales in UAV images.
[0104] The attention generation and upsampling layer converts the generated spatial attention map into a 0~1 weight distribution through activation, and accurately restores it to the same size as the upsampled deep low-resolution features through bilinear upsampling, achieving perfect alignment of multi-scale features.
[0105] The fusion and application of the attention layer concatenates the attention-enhanced high-resolution features with the directly upsampled deep semantic features along the channel dimension to obtain a fusion feature map that is rich in detail and semantically balanced. By using the residual original input, key target regions are highlighted and background interference is suppressed, thereby improving the model's ability to perceive small targets, dense targets and complex backgrounds.
[0106] Step 3: Combining the dynamic upsampling module EADU and the modules unique to the YOLOv11 network, construct the feature aggregation network Neck, as follows:
[0107] In the feature aggregation network Neck, feature maps of different scales generated by the backbone network are fed into a classic bidirectional PAN structure for deep fusion, generating feature maps with multi-scale information to improve the accuracy of object detection, as detailed below:
[0108] First, deep features are upsampled layer by layer from top to bottom: after upsampling, the P5 feature is concatenated with the P4 feature, and then the C3k2 module performs channel interaction and feature refinement; the refined features are upsampled again and concatenated with the P3 feature, and then deeply integrated through the C3k2 module, thereby gradually injecting deep semantic information into the high-resolution shallow features.
[0109] Then, it proceeds to the bottom-up path: starting from the shallowest fused features, it passes them down and concatenates them with the backbone features of the corresponding scale in turn. The C3k2 module is used for feature recombination and semantic enhancement, and finally, three complementary and scale-adaptive enhanced feature maps P3′, P4′, and P5′ are generated.
[0110] Finally, these fused features are fully expanded in the channel dimension, with significantly richer details and semantic expressions. They are then passed to the Head detection head to output the target's category confidence and precise location information, thus completing the target detection task.
[0111] As a specific example, the dynamic upsampling module EADU is used to efficiently fuse multi-scale feature maps, while improving the feature maps' ability to focus on key regions through a very lightweight spatial attention mechanism. This significantly enhances the detection accuracy of small targets and those against complex backgrounds without increasing computational overhead, as detailed below:
[0112] The Dynamic Upsampling Module (EADU) receives the current layer feature map from the backbone network and the low-resolution feature map from a deeper layer as dual inputs. First, it performs 1×1 convolution, global average pooling, and spatial attention generation on the current layer feature map of the backbone network to obtain high-resolution features with enhanced attention.
[0113] Then, the attention feature is bilinearly upsampled to align its resolution with the low-resolution feature map. Meanwhile, another branch directly bilinearly upsamples the low-resolution feature map from a deeper layer to preserve its semantic strength.
[0114] Finally, the attention-enhanced upsampling features and the directly upsampling deep features are concatenated along the channel dimension to obtain a fusion feature map that is richer in information and balanced in detail and semantics, thereby improving the network's multi-scale target detection performance in drone-captured images.
[0115] Step 4: Combining the large kernel depthwise separable convolutional module and the decoupled head structure unique to the YOLOv11 network, a lightweight object detection head is constructed, as follows:
[0116] By combining the large kernel depth separable convolution module and the decoupled head structure unique to the YOLOv11 network, a lightweight object detection head is constructed, including the large kernel depth separable convolution LDConv, the lightweight decoupled branch LDB, the dynamic channel recalibration module DCR, the efficient distributed focus regression module EDFH, and the residual shallow feature injection module RMI.
[0117] The large-kernel depthwise separable convolution LDConv uses ultra-large kernel depthwise separable convolutions of 13×13 to 21×21 to capture axial global context of two or more scales at once, thereby generating deep semantic features with strong context awareness. Then, a large kernel decomposition function is used to further reduce computational overhead, making the number of parameters and computational cost close to the requirements of lightweight computing, as detailed below:
[0118] (1) Two large strip convolutions (k×1 and 1×k) are used to decouple and expand the receptive field in the horizontal and vertical directions. First, horizontal strip convolutions are used to expand the horizontal context and adjust the receptive field of each row so that the horizontal coverage is closer to the distant target. Then, the features are normalized by BN and nonlinearity is added by SiLU. Finally, the receptive field is expanded by using vertical strip convolutions in the vertical direction. In this way, the convolutions in the two directions can be decoupled, and thus can be adapted to targets of any scale.
[0119] (2) The shared-separated feature fusion function is adopted to fuse the feature streams of classification and regression tasks. First, 1×1 point convolution is used to separate the task channels, and task-specific weights are generated through the dynamic channel recalibration module DCR. Then, the recalibrated weights are weighted onto the shared features through Hadamard. Next, batch normalization and SiLU are added after LDConv to refine the features. Finally, the high-resolution features of the P3 layer are directly added to the output of the detection head by the residual shallow feature injection module RMI, which further enhances feature reuse and small target localization accuracy.
[0120] The lightweight decoupling branch LDB highly shares the feature extraction paths of classification and regression tasks, achieving task separation through minimal convolution operations. Specifically: First, it receives a shared deep semantic feature map output from a large-kernel, depth-separable convolution as input; then, the classification and regression branches no longer have independent multi-layer convolutions, but directly reuse the same shared feature map; next, only two independent 1×1 convolutions are used to generate the classification score map and the bounding box regression parameter map, respectively; finally, the outputs of the two branches are directly fed into subsequent loss calculations. This module can significantly reduce the number of detector head parameters and computational overhead, achieving efficient decoupling of classification and regression tasks while maintaining the independence of each task.
[0121] The Dynamic Channel Recalibration (DCR) module performs task-specific channel weighting on the shared feature map and achieves dynamic separation of classification and regression through a lightweight attention mechanism. Specifically: First, it receives the shared feature map before LDB as input; then, it compresses spatial information through global average pooling, followed by channel interaction through two fully connected layers and the SiLU activation function; next, it uses Sigmoid to generate two independent sets of channel attention weights; finally, it adds the generated classification and regression weights to the original shared feature map through element-wise multiplication. This module can suppress channel interference between tasks, enhance the texture discrimination ability of the classification branch and the localization sensitivity of the regression branch, and achieve dynamic task selection of shared features.
[0122] The Efficient Distributed Focal Loss (EDFH) module transforms traditional direct coordinate regression into center-scale distribution prediction. It achieves more stable bounding box regression through parameter simplification and focal loss, specifically as follows: First, it receives the feature map of the regression branch as input; then, it abandons the prediction of four independent values (left, top, right, bottom) and outputs only the predicted map with four channels: center offset (dx, dy) and width / height scaling factors (ds, dt); next, in the decoding stage, it reconstructs the true bounding box using a distributed focal loss method; finally, it optimizes the training process using Distribution Focal Loss. This module significantly reduces the number of parameters and computational cost of the regression branch, enhances robustness to small targets and scale changes, and achieves efficient and stable bounding box prediction.
[0123] The Residual Shallow Feature Injection (RMI) module performs residual fusion of high-resolution shallow features and deep semantic features, achieving multi-scale detail enhancement through direct addition. Specifically, it first receives the high-resolution feature map of the earliest P3 layer of the Backbone and the final output feature map of the detection head as input; then, it performs channel compression on the P3 shallow features using a 1×1 convolution; next, without upsampling or downsampling, it directly aligns the size of the shallow features with the output feature maps of the detection head at three scales; finally, it injects the compressed shallow feature residuals into the deep features through element-wise addition. This module can effectively compensate for the loss of local high-frequency details caused by large kernel convolution, enhance the edge localization capability of small targets, and achieve seamless dynamic fusion of shallow and deep features.
[0124] Step 5: By normalizing the Wasserstein loss, a suitable modulation coefficient is adopted. We will perform mixed loss training as follows:
[0125] Normalized Wasserstein distance is introduced to measure the similarity between bounding boxes of small objects. After being converted into a similarity metric, it is used together with the original Intersection over Union (IoU) loss for training of a hybrid loss.
[0126] By bounding box and bounding box Modeling was performed, and the resulting bounding box A was obtained as a Gaussian distribution. Gaussian distribution of bounding box B Simplified to:
[0127]
[0128] in, Represents a constant. and This represents the x-coordinate of the bounding box location point. and This represents the ordinate of the bounding box location point. and Indicates the width of the bounding box. and Indicates the height of the bounding box;
[0129] It is a distance metric, and the normalized Wasserstein distance, obtained using the exponentially normalized form exp, is as follows:
[0130]
[0131] in, It is a constant strongly correlated with the dataset, set Given the average absolute size bounding box of the dataset, the loss formula is as follows:
[0132]
[0133]
[0134] In the formula, For a modulation coefficient, To include the normalized Wasserstein loss, This is the original crossover and union ratio loss of the network.
[0135] This invention also provides a lightweight small target detection system for images captured by unmanned aerial vehicles (UAVs). This system is used to implement the aforementioned lightweight small target detection method for UAV-captured images. The system includes...
[0136] The backbone network module implements a joint improvement of lightweighting and attention enhancement in the backbone network. The improved backbone network is used to extract multi-scale feature layers in the image to obtain multi-scale initial feature maps.
[0137] The feature aggregation network module, combined with the dynamic upsampling module EADU and the modules unique to the YOLOv11 network, constructs the feature aggregation network Neck, which performs cross-level fusion and refinement processing on the multi-scale initial feature map, and outputs the optimized refined feature map.
[0138] The detection head module combines a large kernel depthwise separable convolutional module and the decoupled head structure unique to the YOLOv11 network to construct a lightweight object detection head, which performs decoupled prediction on the refined feature map;
[0139] The training module uses a hybrid loss function based on normalized Wasserstein distance and modulation IoU for end-to-end training to obtain a lightweight network after training.
[0140] The target inspection module inputs the image of the drone to be detected into a trained lightweight network. The network then performs feature extraction, feature fusion and refinement, and head decoupling prediction. Finally, it outputs the class confidence and bounding box coordinates of each detected target, thus completing the detection of lightweight small targets.
[0141] The present invention also provides a mobile terminal, 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 lightweight small target detection method for images captured by drones.
[0142] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various 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.
Claims
1. A lightweight small target detection method for images captured by unmanned aerial vehicles (UAVs), characterized in that, Includes the following steps: Step 1: Construct a cascaded optimized overall neural network architecture, which includes a backbone network, a feature aggregation network, and a detection head in sequence; Step 2: Implement a joint improvement of lightweighting and attention enhancement in the backbone network, and use the improved backbone network to extract multi-scale feature layers in the image to obtain multi-scale initial feature maps; Lightweighting refers to replacing the feature extraction module C3K2 in the original YOLOv11 backbone network with a lightweight feature extraction module, the improved module being LWGA_Block; Attention enhancement refers to embedding the efficient attention mechanism module EAC into the parallel spatial attention convolution block C2PSA; Step 3: Combine the dynamic upsampling module EADU and the modules unique to the YOLOv11 network to construct the feature aggregation network Neck, which performs cross-level fusion and refinement on the multi-scale initial feature map, and outputs the optimized refined feature map. Step 4: Combining the large kernel depth separable convolutional module and the decoupled head structure unique to the YOLOv11 network, a lightweight object detection head is constructed to perform decoupled prediction on the refined feature map; Step 5: End-to-end training is performed using a hybrid loss function based on normalized Wasserstein distance and modulation IoU to obtain a lightweight network that has been trained. Step 6: Input the image of the drone to be detected into the lightweight network trained in Step 5. The network will then undergo feature extraction in Step 2, feature fusion and refinement in Step 3, and head decoupling prediction in Step 4. The network will output the class confidence and bounding box coordinates of each detected target, thus completing the detection of lightweight small targets.
2. The lightweight small target detection method for UAV-captured images according to claim 1, characterized in that, The construction of the overall neural network architecture described in step 1 includes a backbone network, a feature aggregation network (Neck), and a detection head, as detailed below: The backbone network performs multi-scale primary feature extraction. The feature aggregation network Neck is used for multi-level feature fusion and refinement. The detection head is used for classification and location decoupling output.
3. The lightweight small target detection method for UAV-captured images according to claim 2, characterized in that, In step 2, the feature extraction module C3K2 in the original YOLOv11 backbone network is replaced with a lightweight feature extraction module, LWGA_Block, as detailed below: LWGA_Block integrates four attention variants: Gated Point Attention (GPA) for capturing key points of small targets, Regular Local Attention (RLA) for extracting local details, Sparse Mid-Range Attention (SMA) for modeling mid-range irregular structures, and Sparse Global Attention (SGA) for long-range dependency association. Batch normalization and residual addition are uniformly used at the end of each LWGA_Block. LWGA_Block is described as follows: in, Indicates the input feature map, This represents the intermediate feature map. This represents the convolution operation. This indicates a splicing operation. Indicates a lightweight module. Channel counting is ,and Channel count is Semantic information is processed using the LWGA attention mechanism, followed by 1×1 convolution to recover the number of channels, and batch normalization is applied. Using random deactivation and Dropout to prevent overfitting, the final channel number is generated as follows: of ,in: in, This indicates a splitting operation. The channel count is , The channel count is The four sub-blocks are processed by four attention modules: GPA, SMA, SGA, and RLA, respectively, to finally generate output feature maps. .
4. The lightweight small target detection method for UAV-captured images according to claim 3, characterized in that, The efficient attention mechanism module EAC described in step 2 includes an initialization convolutional layer, a spatial context aggregation layer, an attention generation and upsampling layer, and a fusion and application attention layer. The initial convolutional layer uses 1×1 convolution to perform channel mixing and dimensionality reduction operations on the input feature map; The spatial context aggregation layer captures the global context of the entire image through global average pooling and uses large kernel depth separable convolution to process a large receptive field, generating a high-resolution spatial attention map to model the spatial relationships of targets across scales in UAV images. The attention generation and upsampling layer converts the generated spatial attention map into a 0~1 weight distribution through activation, and restores it to the same size as the upsampled deep low-resolution features through bilinear upsampling, thereby achieving alignment of multi-scale features. The fusion and application attention layer concatenates the attention-enhanced high-resolution features with the directly upsampled deep semantic features along the channel dimension to obtain a fused feature map. The residual original input is then used to highlight key target regions and suppress background interference.
5. The lightweight small target detection method for UAV-captured images according to claim 4, characterized in that, In the feature aggregation network Neck described in step 3, feature maps of different scales generated by the backbone network are fed into a classic bidirectional PAN structure for deep fusion to generate feature maps with multi-scale information, as detailed below: First, deep features are upsampled layer by layer from top to bottom: after upsampling, the P5 feature is concatenated with the P4 feature, and then the C3k2 module performs channel interaction and feature refinement; the refined features are upsampled again and concatenated with the P3 feature, and then deeply integrated through the C3k2 module, thereby gradually injecting deep semantic information into the high-resolution shallow features. Then, it proceeds to the bottom-up path: starting from the shallowest fused features, it passes them down and concatenates them with the backbone features of the corresponding scale in turn. The C3k2 module is used for feature recombination and semantic enhancement, and finally, three complementary and scale-adaptive enhanced feature maps P3′, P4′, and P5′ are generated. Finally, the fused features are expanded in the channel dimension, enriching the details and semantic expression, and are ultimately passed to the Head detection head to output the target's category confidence and location information, thus completing the target detection task.
6. The lightweight small target detection method for UAV-captured images according to claim 5, characterized in that, The dynamic upsampling module EADU described in step 3 is used to fuse multi-scale feature maps, and at the same time improves the feature map's ability to focus on key regions through a very lightweight spatial attention mechanism, as detailed below: The Dynamic Upsampling Module (EADU) receives feature maps from the current layer of the backbone network and low-resolution feature maps from deeper layers as dual inputs. First, the feature map of the current layer of the backbone is sequentially subjected to 1×1 convolution, global average pooling, and spatial attention generation to obtain high-resolution features with enhanced attention. Then, the high-resolution feature is bilinearly upsampled to align the resolution with the low-resolution feature map. Meanwhile, another branch directly bilinearly upsamples the low-resolution feature map from a deeper layer to preserve semantic strength. Finally, the attention-enhanced upsampling features and the directly upsampling deep features are concatenated along the channel dimension to obtain a fused feature map that is richer in information and balanced in detail and semantics.
7. The lightweight small target detection method for UAV-captured images according to claim 6, characterized in that, Step 4 describes the construction of a lightweight object detection head by combining a large kernel depthwise separable convolutional module with the decoupled head structure unique to the YOLOv11 network, as detailed below: By combining the large kernel depth separable convolution module and the decoupled head structure unique to the YOLOv11 network, a lightweight object detection head is constructed, including the large kernel depth separable convolution LDConv, the lightweight decoupled branch LDB, the dynamic channel recalibration module DCR, the efficient distributed focus regression module EDFH, and the residual shallow feature injection module RMI. (1) The large kernel depthwise separable convolution LDConv uses a super large kernel depthwise separable convolution of 13×13~21×21 to capture the axial global context of two or more scales at once, thereby generating deep semantic features with context awareness. Then, a large kernel decomposition function is used to further reduce the computational cost, as follows: ① The receptive field in the horizontal and vertical directions is expanded by using two large strip convolutions. First, horizontal strip convolutions are used to expand the horizontal context and adjust the receptive field of each row. Then, the features are normalized by BN and non-linearity is added by SiLU. Finally, the receptive field is expanded by using vertical strip convolutions in the vertical direction. The convolutions in the two directions can be decoupled, thus adapting to targets of any scale. ② A shared-separated feature fusion function is adopted to fuse the feature streams of classification and regression tasks. First, a 1×1 point convolution is used to separate the task channels, and the task-specific weights are generated by the Dynamic Channel Recalibration (DCR) module. Then, the recalibrated weights are weighted onto the shared features by Hadamard. Next, batch normalization and SiLU are added after LDConv to refine the features. Finally, the high-resolution features of the P3 layer are directly added to the output of the detection head by the residual shallow feature injection (RMI) module. (2) The lightweight decoupling branch LDB shares the feature extraction paths of the classification and regression tasks and achieves task separation through convolution operations, as follows: First, it receives the shared deep semantic feature map output by the large kernel depth separable convolution as input; then the classification branch and the regression branch directly reuse the same shared feature map; then, two independent 1×1 convolutions are used to generate the classification score map and the bounding box regression parameter map respectively; finally, the outputs of the two branches are directly fed into the subsequent loss calculation. (3) The Dynamic Channel Recalibration (DCR) module performs task-specific channel weighting on the shared feature map and achieves dynamic separation of classification and regression through a lightweight attention mechanism, as follows: First, it receives the shared feature map before LDB as input; then, it compresses spatial information through global average pooling, and performs channel interaction through two fully connected layers and the SiLU activation function; next, it uses Sigmoid to generate two sets of independent channel attention weights; finally, it adds the generated classification weights and regression weights to the original shared feature map by element-wise multiplication. (4) The efficient distribution focal regression module EDFH transforms direct coordinate regression into center-scale distribution prediction, as follows: First, it receives the feature map of the regression branch as input; then, it abandons the prediction of the four independent values of left, top, right, and bottom, and outputs only the prediction map of the four channels of center offset (dx, dy) and width and height scaling factors (ds, dt); then, in the decoding stage, it restores the real bounding box through the distribution focal method; finally, it is optimized in conjunction with Distribution FocalLoss during training. (5) The residual shallow feature injection module RMI performs residual fusion of high-resolution shallow features and deep semantic features, and achieves multi-scale detail enhancement through direct addition operation, as follows: First, it receives the high-resolution feature map of the earliest P3 layer of the Backbone and the final output feature map of the detection head as input; then, it performs channel compression on the P3 shallow features using 1×1 convolution; then, it performs size alignment with the output feature maps of the detection head at three scales; finally, it injects the compressed shallow feature residual into the deep features by adding elements one by one.
8. The lightweight small target detection method for UAV-captured images according to claim 7, characterized in that, Step 5 describes the end-to-end training using a hybrid loss function based on normalized Wasserstein distance and modulation IoU to obtain a trained lightweight network, as detailed below: Normalized Wasserstein distance is introduced to measure the similarity between bounding boxes of small objects. After being converted into a similarity metric, it is used together with the original Intersection over Union (IoU) loss for training of a hybrid loss. By bounding box and bounding box Modeling was performed, and the resulting Gaussian distribution of the bounding box A was obtained. Gaussian distribution of bounding box B Simplified to: in, Represents a constant. and This represents the x-coordinate of the bounding box location point. and This represents the ordinate of the bounding box location point. and Indicates the width of the bounding box. and Indicates the height of the bounding box; It is a distance metric, and the normalized Wasserstein distance, obtained using the exponentially normalized form exp, is as follows: in, It is a constant that is strongly correlated with the dataset, set Given the average absolute size bounding box of the dataset, the loss formula is as follows: In the formula, For a modulation coefficient, To include the normalized Wasserstein loss, This represents the original crossover and union ratio loss of the network.
9. A lightweight small target detection system for images captured by unmanned aerial vehicles, characterized in that, This system is used to implement the lightweight small target detection method for UAV-captured images as described in any one of claims 1 to 8, the system comprising: The backbone network module implements a joint improvement of lightweighting and attention enhancement in the backbone network. The improved backbone network is used to extract multi-scale feature layers in the image to obtain multi-scale initial feature maps. The feature aggregation network module, combined with the dynamic upsampling module EADU and the modules unique to the YOLOv11 network, constructs the feature aggregation network Neck, which performs cross-level fusion and refinement processing on the multi-scale initial feature map, and outputs the optimized refined feature map. The detection head module combines a large kernel depthwise separable convolutional module and the decoupled head structure unique to the YOLOv11 network to construct a lightweight object detection head, which performs decoupled prediction on the refined feature map; The training module uses a hybrid loss function based on normalized Wasserstein distance and modulation IoU for end-to-end training to obtain a lightweight network after training. The target inspection module inputs the image of the drone to be detected into a trained lightweight network, which then performs feature extraction, feature fusion and refinement, and head decoupling prediction in sequence. It outputs the category confidence and bounding box coordinates of each detected target, thus completing the detection of lightweight small targets.
10. A mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the lightweight small target detection method for images captured by UAVs as described in any one of claims 1 to 8.
Citation Information
Cited By
Distribution line ground wire strand breakage defect identification method, device, equipment and medium
CN122115448A
Lightweight detection method, device and equipment for unmanned aerial vehicle photoelectric small target and medium
CN122265896A