Unmanned aerial vehicle small target detection method based on improved YOLOv8 network
By improving the YOLOv8 network, combining the spatial-to-depth convolutional module and the CSP-OKM module, multi-scale feature extraction is enhanced, and a dynamic alignment detection head is designed to solve the accuracy and real-time problems of small target detection in UAV scenarios, thus achieving efficient and real-time small target detection.
Patent Information
- Application Number
- CN202511090027.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-18
AI Technical Summary
Existing YOLO target detection algorithms suffer from problems such as loss of small target features, sensitivity to background interference, and insufficient real-time performance in drone scenarios, especially in scenarios with small target scale, complex background, and dense target density, where the detection accuracy is not high.
By introducing spatial-to-depth convolutional modules and CSP-OKM modules into the neck network, the multi-scale feature extraction capability is enhanced, and a dynamically aligned detection head is designed to achieve cross-task representation optimization, thereby improving detection accuracy and model efficiency.
It significantly improves the feature extraction capability and detection accuracy of small targets, and can meet the practical application needs in complex scenarios, especially in the UAV scenario to achieve efficient and real-time small target detection.
Smart Images

Figure CN120976573A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual target detection technology, and in particular to a method for detecting small targets on unmanned aerial vehicles based on an improved YOLOv8 network. Background Technology
[0002] Small target detection on drones is an important research area in computer vision. Its aim is to accurately identify and locate small targets in images or videos captured by drones, maintaining high detection accuracy even under challenging conditions such as occlusion, scale changes, and lighting variations. With the rapid development of drone technology, its applications in agriculture, security, logistics, and environmental monitoring are becoming increasingly widespread, making small target detection technology a crucial component in these applications.
[0003] Existing object detection heads are mainly divided into two categories: decoupled detection heads and non-decoupled detection heads. Feng et al. proposed a task-aligned object detector, which significantly improves the consistency between classification and localization through a task alignment learning strategy and a dynamic label allocation mechanism. Ge et al. proposed YOLOX, which separates classification and regression tasks through independent branches and simplifies the process by using an anchor-free design, thus significantly improving task focus.
[0004] In object detection tasks, YOLO models directly predict object bounding boxes and categories through a single forward propagation, enabling efficient processing of image information and maintaining high detection accuracy. However, drone scenarios present challenges such as a high proportion of small targets, dynamic backgrounds, and limited onboard computing resources, leading to shortcomings in traditional YOLO models, including loss of small target features, sensitivity to background interference, and insufficient real-time performance.
[0005] Existing YOLO object detection algorithms typically suffer from the following three problems:
[0006] 1) Insufficient task interaction: The design of the decoupled detection head results in insufficient feature interaction between localization and classification tasks, affecting the detection accuracy of small targets;
[0007] 2) High model complexity: The design of the decoupled detection head increases the number of model parameters and computational load, making it difficult to run efficiently on resource-constrained devices;
[0008] 3) Small target features are difficult to capture: The global attention capability reduces the model's focus on key information, making it difficult to effectively capture the features of small targets. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a method for small target detection in UAVs based on an improved YOLOv8 network. First, a spatial-to-depth convolutional module and a full kernel module are used in the neck network to achieve efficient multi-scale feature transfer and global context awareness, significantly improving the feature extraction capability for small targets. Second, a dynamically aligned detection head is designed, and cross-task representation optimization is achieved through multi-scale feature interaction learning and a dynamic feature selection mechanism, maintaining detection accuracy while reducing model complexity. Experiments show that this method can meet the practical application needs of UAV scenarios with small target scale, complex backgrounds, and dense target density.
[0010] A method for detecting small targets on drones based on an improved YOLOv8 network includes the following steps:
[0011] Step 1: Construct the network model;
[0012] The network model includes a backbone network, a UAV image detection pyramid network, and a dynamic alignment detection head; the backbone network is used for feature extraction; the UAV image detection pyramid network is used to analyze and fuse features from the backbone network; and the dynamic alignment detection head is used to generate preliminary predictions of classification confidence and bounding box coordinates.
[0013] The backbone network includes a C2f module and P2, P3, P4, and P5 detection layers, which are used to output feature maps at different scales.
[0014] The UAV image detection pyramid network includes a spatial-to-depth convolutional module and a CSP-OKM module; the spatial-to-depth convolutional module extracts features of small targets;
[0015] The spatial-to-depth convolution module extends the P2 detection layer in the backbone network to the subsequent pyramid network on the existing YOLOv8 network model, and uses spatial-to-depth convolution to downsample the features of the P2 detection layer.
[0016] The CSP-OKM module is used to preserve high-resolution features;
[0017] The CSP-OKM module, based on the existing YOLOv8 network model, recovers the features missed after the fusion of the P2 and P3 detection layers. It reduces computation and enhances the ability to capture multi-scale features by using depthwise separable convolutions in local, large-scale, and global branches. In the global branch, it introduces a dual-channel attention module for the frequency and spatial domains, and a spatial attention module, and dynamically adjusts the spatial and channel feature weights by combining fast Fourier transform and its inverse transform.
[0018] The dynamic alignment detection head includes a feature extraction module, a deformable convolutional layer, a task decomposition layer, and a decoupled output layer; the feature extraction module includes a shared convolutional layer for extracting joint features of classification and localization tasks.
[0019] The feature extraction module introduces a shared convolution in the feature extraction layer of the detection head on the existing YOLOv8 network model, and performs group normalization on the feature map extracted by the shared convolution.
[0020] The deformable convolutional layer includes a deformable convolution and an attention weight generator; the deformable convolution is used to dynamically adjust the sampling position of the convolution kernel to generate a spatial feature alignment offset that matches the geometric characteristics of the target; the attention weight generator dynamically selects features for the classification branch;
[0021] The deformable convolutional layer introduces a deformable convolutional module into the localization branch of the detection head output layer on top of the existing YOLOv8 network model; and introduces an attention mechanism into the classification branch of the detection head output layer to dynamically select specific features required for classification.
[0022] The task decomposition layer uses a hierarchical attention mechanism to dynamically weight the joint features in terms of spatial and channel dimensions, generating classification and localization-oriented feature maps.
[0023] The decoupled output layer is used to output the target classification confidence and bounding box coordinates respectively, thereby achieving task decoupling optimization.
[0024] Step 2: Process the drone aerial images through the backbone network to output feature maps, and then perform multi-scale feature enhancement on the feature maps through the drone image detection pyramid network;
[0025] Step 2.1: Process the drone aerial images through the backbone network, output the feature map of layer P5, upsample the feature map, and stitch it with the feature map of layer P4;
[0026] Step 2.2: The concatenated feature maps are grouped and local connections are made across stages using the C2f layer;
[0027] Step 2.3: Spatial reconstruction downsampling is performed on the P2 detection layer to extract features of small targets;
[0028] Step 2.3 specifically involves the following: the spatial-to-depth convolution module includes a spatial-to-depth transformation layer and a non-strut convolution layer, wherein the spatial-to-depth transformation layer is used for spatial reconstruction and channel splicing, and the non-strut convolution layer uses a convolution with a stride of 1 for channel compression.
[0029] The space-to-depth transformation layer performs spatial recombination and channel stitching of the feature map through the following process:
[0030] ;
[0031] in, It is the downsampling factor. This represents the sub-feature map generated through the slicing operation. This represents the starting offset of the sub-feature map. The intermediate feature map is the input. The spatial dimensions of the input feature map;
[0032] Step 2.4: The feature map processed by the C2f module is upsampled again and concatenated with the feature map of the P3 layer;
[0033] Step 2.5: The stitched feature map is fed into the CSP-OKM module, and the small target features are recovered through the multi-branch architecture to obtain the final feature map;
[0034] Step 2.5 specifically involves the CSP-OKM module achieving channel separation through existing cross-stage local networks. The input features are first transformed by a 1×1 convolutional layer and then divided into three branches to capture local features, large-scale features, and global features, respectively.
[0035] Step 2.6: The final feature map is processed by two consecutive stitchings, C2f layer processing and convolutional layer transformation to form multi-scale information, and then input into the detection head.
[0036] Step 3: Use a dynamic alignment detection head to achieve feature consistency fusion for classification and localization tasks;
[0037] Step 3.1: Generate a preliminary feature map from the feature map obtained from the UAV image detection pyramid network using the feature extraction module;
[0038] Step 3.1 specifically includes: the feature extraction module includes cascaded shared convolution and group normalization operations;
[0039] The calculation process for shared convolution is as follows:
[0040] ;
[0041] in, It is the output feature map The position above, For the input feature map, To share the convolution kernel.
[0042] Step 3.2: Concatenate the preliminary feature map with the feature map obtained from the UAV image detection pyramid network to form a fused feature map;
[0043] Step 3.3: Feed the fused feature map into the task decomposer and use the hierarchical attention mechanism to process the interactive features generated after channel concatenation;
[0044] Step 3.3 specifically involves the task decomposer performing global average pooling and fully connected layer processing on the fused features, generating a weight vector through Sigmoid activation, and then multiplying it with the original fused features to achieve weighted fusion.
[0045] Step 3.4: Dynamically sample interaction features to optimize feature interactions in the localization branch; input the interaction features into the attention weight generator to dynamically select features for the classification branch;
[0046] The dynamic sampling calculation process is as follows:
[0047] ;
[0048] in, and These represent the input and output feature maps, respectively. Indicates the position on the feature map. It is the size of the convolution kernel. These are the weights of the convolution kernel. Indicates the first Predefined offsets at each position, It adjusts the offset of the sampling position. It is a mask for dynamically adjusting feature weights, and K represents the number of sampling points in the convolution kernel.
[0049] Step 3.5: Decouple the output layer to generate the final detection and classification results.
[0050] Step 4: Optimize the parameters of the network model using the obtained detection results, and detect small targets in the drone aerial photography to obtain the detection results.
[0051] The beneficial effects of adopting the above technical solution are as follows:
[0052] This invention provides a method for small target detection in UAVs based on an improved YOLOv8 network. Addressing the shortcomings of insufficient multi-scale feature fusion and poor task collaboration in existing detection methods, this method achieves efficient multi-scale feature transfer and global context awareness in the neck network through a spatial-to-depth convolutional module and a CSP-OKM module, significantly improving the feature extraction capability for small targets. To address the insufficient interaction between localization and classification features in existing detection heads, a dynamically aligned detection head is designed. Cross-task representation optimization is achieved through multi-scale feature interaction learning and dynamic feature selection mechanisms, maintaining detection accuracy while reducing model complexity. Addressing the challenges of small target scale, complex backgrounds, and dense target density in UAV scenarios, this method significantly improves detection performance by optimizing feature fusion and task collaboration mechanisms, meeting the practical application needs in complex scenarios. Attached Figure Description
[0053] Figure 1 This is a structural diagram of the UAV small target detection method based on the improved YOLOv8 network proposed in this invention;
[0054] Figure 2 This is a comparative schematic diagram of the neck network before and after improvement in an embodiment of the present invention;
[0055] Figure 3 This is a flowchart of the space-to-depth convolution module in an embodiment of the present invention;
[0056] Figure 4 This is a network structure diagram of the CSP-OKM module in an embodiment of the present invention;
[0057] Figure 5 This is a diagram of the dynamic alignment detection head network structure in an embodiment of the present invention;
[0058] Figure 6 This is a flowchart of the task decomposer module in an embodiment of the present invention. Detailed Implementation
[0059] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0060] A method for detecting small targets on drones based on an improved YOLOv8 network includes the following steps:
[0061] Step 1: Construct the network model, such as Figure 1 As shown;
[0062] The network model includes a backbone network, a UAV image detection pyramid network, and a dynamic alignment detection head; the backbone network is used for feature extraction; the UAV image detection pyramid network is used to analyze and fuse features from the backbone network; and the dynamic alignment detection head is used to generate preliminary predictions of classification confidence and bounding box coordinates.
[0063] The backbone network includes a C2f module that can retain richer gradient information, as well as P2, P3, P4, and P5 detection layers, which are used to output feature maps at different scales.
[0064] The UAV image detection pyramid network includes a spatial-to-depth convolutional module and a CSP-OKM module; the spatial-to-depth convolutional module extracts features of small targets and enhances multi-scale expression capabilities.
[0065] The space-to-depth convolution module, as shown below Figure 3 As shown, two optimizations are made to the existing YOLOv8 network model: the P2 detection layer in the backbone network is extended to the subsequent pyramid network, and spatial-to-depth convolution is used to downsample the features of the P2 detection layer, so that the features of small targets can maintain high resolution details in the subsequent network while avoiding parameter inflation.
[0066] The CSP-OKM module, as follows Figure 4 As shown, this is used to preserve high-resolution features and improve the model's sensitivity to small targets;
[0067] The CSP-OKM module makes two optimizations to the existing YOLOv8 network model: it recovers the features missed after the fusion of the P2 and P3 detection layers, and reduces the amount of computation and enhances the ability to capture multi-scale features by using depthwise separable convolutions in local branches, large-scale branches and global branches, thereby improving the accuracy of small target detection; it introduces a dual-channel attention module for the frequency domain and spatial domain and a spatial attention module in the global branch, and dynamically adjusts the spatial and channel feature weights by combining fast Fourier transform and its inverse transform.
[0068] The dynamic alignment detection head, as shown in Figure 5 As shown, it includes a feature extraction module, a deformable convolutional layer, a task decomposition layer, and a decoupled output layer; the feature extraction module includes a shared convolutional layer, which is used to extract joint features of classification tasks and localization tasks, reducing parameter redundancy caused by task decoupling;
[0069] The feature extraction module makes two optimizations to the existing YOLOv8 network model: a shared convolution is introduced into the feature extraction layer of the detection head to avoid parameter redundancy when extracting multi-scale feature maps; and group normalization is performed on the feature maps extracted by the shared convolution to improve the inefficiency of batch normalization in small batch cases and make up for the accuracy loss caused by the shared convolution.
[0070] The deformable convolutional layer includes a deformable convolution and an attention weight generator; the deformable convolution is used to dynamically adjust the sampling position of the convolution kernel to generate a spatial feature alignment offset that matches the geometric characteristics of the target; the attention weight generator dynamically selects features for the classification branch;
[0071] The deformable convolutional layer makes two optimizations to the existing YOLOv8 network model: a deformable convolutional module is introduced into the localization branch of the detector output layer; and an attention mechanism is introduced into the classification branch of the detector output layer to dynamically select the specific features required for classification.
[0072] The task decomposition layer uses a hierarchical attention mechanism to dynamically weight the joint features in terms of spatial and channel dimensions, generating classification and localization-oriented feature maps and suppressing feature interference between tasks.
[0073] The decoupled output layer is used to output the target classification confidence and bounding box coordinates respectively, thereby achieving task decoupling optimization.
[0074] Step 2: Process the drone aerial images through the backbone network to output feature maps, and then perform multi-scale feature enhancement on the feature maps through the drone image detection pyramid network;
[0075] Step 2.1: Process the drone aerial images through the backbone network, output the feature map of layer P5, upsample the feature map, and stitch it with the feature map of layer P4;
[0076] Step 2.2: The concatenated feature maps are grouped and local connections are made across stages using the C2f layer;
[0077] Step 2.3: Spatial reconstruction downsampling is performed on the P2 detection layer to achieve efficient extraction of features from small targets;
[0078] Step 2.3 specifically involves the following: the spatial-to-depth convolution module includes a spatial-to-depth transformation layer and a non-strut convolution layer, wherein the spatial-to-depth transformation layer is used for spatial reconstruction and channel splicing, and the non-strut convolution layer uses a convolution with a stride of 1 for channel compression.
[0079] The space-to-depth transformation layer performs spatial recombination and channel stitching of the feature map through the following process:
[0080] ;
[0081] in, It is the downsampling factor. This represents the sub-feature map generated through the slicing operation. This represents the starting offset of the sub-feature map. The intermediate feature map is the input. The spatial dimensions of the input feature map;
[0082] Step 2.4: The feature map processed by the C2f module is upsampled again and concatenated with the feature map of the P3 layer;
[0083] Step 2.5: The stitched feature map is fed into the CSP-OKM module, and the small target features are recovered through the multi-branch architecture to obtain the final feature map;
[0084] Step 2.5 specifically involves the CSP-OKM module achieving channel separation through existing cross-stage local networks. The input features are first transformed by a 1×1 convolutional layer and then divided into three branches to capture local features, large-scale features, and global features, respectively.
[0085] Step 2.6: The final feature map is processed by two consecutive stitchings, C2f layer processing and convolutional layer transformation to form rich multi-scale information, and then input into the detection head.
[0086] Step 3: Use a dynamic alignment detection head to achieve feature consistency fusion for classification and localization tasks;
[0087] Step 3.1: Generate a preliminary feature map from the feature map obtained from the UAV image detection pyramid network using the feature extraction module;
[0088] Step 3.1 specifically includes: the feature extraction module includes cascaded shared convolution and group normalization operations;
[0089] The calculation process for shared convolution is as follows:
[0090] ;
[0091] in, It is the output feature map The position above, For the input feature map, To share the convolution kernel.
[0092] Step 3.2: Concatenate the preliminary feature map with the feature map obtained from the UAV image detection pyramid network to form a fused feature map;
[0093] Step 3.3: Feed the fused feature map into the task decomposer, such as... Figure 6 As shown, a hierarchical attention mechanism is used to process the interactive features generated after channel concatenation.
[0094] Step 3.3 specifically involves the task decomposer performing global average pooling and fully connected layer processing on the fused features, generating a weight vector through Sigmoid activation, and then multiplying it with the original fused features to achieve weighted fusion.
[0095] Step 3.4: Dynamically sample interaction features to optimize feature interactions in the localization branch; input the interaction features into the attention weight generator to dynamically select features for the classification branch;
[0096] The dynamic sampling calculation process is as follows:
[0097] ;
[0098] in, and These represent the input and output feature maps, respectively. Indicates the position on the feature map. It is the size of the convolution kernel. These are the weights of the convolution kernel. Indicates the first Predefined offsets at each position, It adjusts the offset of the sampling position. It is a mask for dynamically adjusting feature weights, and K represents the number of sampling points in the convolution kernel.
[0099] Step 3.5: Decouple the output layer to generate the final detection and classification results.
[0100] Step 4: Optimize the parameters of the network model using the obtained detection results, and detect small targets in the drone aerial photography to obtain the detection results.
[0101] In this embodiment, a UAV image detection pyramid network is used as the feature fusion architecture. This network integrates spatial-to-depth convolutional modules to efficiently transfer multi-scale features from shallow to deep layers. Subsequently, an Omni-kernel module is introduced into the cross-stage local network to enhance global context awareness and reduce computational complexity. Finally, the processed feature map is input into a dynamically aligned detection head. Through multi-scale feature interaction learning and dynamic feature selection mechanisms, cross-task representation is optimized, and the target detection result is output.
[0102] like Figure 2 As shown, traditional detection layers, such as P3, P4 and P5, often fail to capture the details of small targets due to their low resolution.
[0103] Introducing a P2 detection layer can enhance the description of small target features, but it also increases post-processing time. The UAV image detection pyramid network, however, utilizes a spatial-to-depth convolutional module to fully extract small target features without incurring excessive computational burden. Furthermore, to avoid feature degradation, we employ cross-stage local networks for channel separation and integrate the multi-scale perception capabilities of the Omni-kernel module to achieve efficient feature recovery.
[0104] Wherein, the space-to-depth convolution module is as follows Figure 3 As shown, the spatial-to-depth transformation layer first divides the input feature map into multiple sub-feature maps according to the spatial dimension, and then concatenates them along the channel dimension. This reduces the resolution while expanding the number of channels, fully preserving the spatial details of the original features and avoiding the information loss of traditional downsampling.
[0105] Subsequently, non-stretch convolutional layers compress the stitched features, reducing computational cost while ensuring that each location is sampled only once to prevent information loss caused by asymmetric sampling. This design significantly improves the accuracy of small target detection, making it particularly suitable for real-time processing such as drone aerial photography, balancing lightweight design with detail preservation.
[0106] Among them, such as Figure 4 The CSP-OKM module shown divides the input feature map into four channel slices. One slice is enhanced by the Omni-kernel module and fused with the other slices to preserve the original features in the channel dimensions. The input features are first transformed by a 1×1 convolutional layer and then divided into local, large-scale, and global branches. In the local branch, we use 1×1 depthwise separable convolutions to enhance local image features. In the large-scale branch, we use large odd-number K×K depthwise separable convolutions with low complexity to capture large-scale features and expand the receptive field. Simultaneously, to effectively capture contextual information and manage computational overhead, we use 1×31 and 31×1 depthwise separable convolutions in parallel at bottleneck locations. In the global branch, we introduce dual-channel attention modules for the frequency and spatial domains, and a spatial attention module to enhance global modeling.
[0107] The dynamic alignment detection head dynamically adjusts feature selection through deformable convolution to ensure synergy between classification and localization tasks, effectively improving detection accuracy.
[0108] The network structure diagram of the dynamic alignment detection head is as follows: Figure 5 As shown:
[0109] 1) First, feature extraction is performed through a shared convolutional layer, and group normalization is then performed. The outputs of the two convolutional layers are then concatenated to obtain an intermediate representation that integrates multiple features.
[0110] 2) During the dynamic selection and task decomposition phase, masks and offsets are generated for dynamic selection and adjustment of features, and the features are decomposed into different task branches through the task decomposition module.
[0111] 3) In the localization branch, the task decomposition module is connected to the deformable convolution module for further feature processing;
[0112] 4) In the classification branch, the task decomposition module is multiplied with the weights or masks generated by two convolution operations (the first using the ReLU activation function and the second using the sigmoid activation function);
[0113] 5) Finally, in the task alignment stage of the shared convolutional layer, the outputs of different task branches are fed into the corresponding regression task convolutional layer and classification task convolutional layer to complete the specific task processing.
[0114] The network structure diagram of the task decomposer is as follows: Figure 6 As shown:
[0115] 1) Concatenate the feature maps along the channel dimension to obtain a new feature map;
[0116] 2) Perform average pooling on the feature map to obtain intermediate interactive features;
[0117] 3) The interactive features are input into the first fully connected layer for initial feature transformation. Then, an activation function is applied to enhance the non-linear expressive power. The activated features are then input into the second fully connected layer. Finally, the output is activated using the sigmoid function to generate layer attention weights.
[0118] 4) For each task, multiply the corresponding layer attention weight with its original feature map to obtain task-specific features;
[0119] 5) Input task-specific features into the convolutional layer for dimensionality adjustment, reduce the number of channels, and obtain intermediate features;
[0120] 6) The intermediate features are then input into the convolutional layer for further processing and finally the classification or localization results are obtained.
[0121] To verify the detection accuracy of the proposed method in UAV scenarios, the proposed method was experimentally verified on three datasets, namely Visdrone2019, HIT-UAV, and NWPUVHR-10, along with other mainstream detection algorithms.
[0122] The Visdrone2019 dataset is widely used in drone target detection research. This dataset contains 8,599 images, covering a wide range of drone scenarios (urban, outdoor, indoor, factory, laboratory, etc.), weather conditions (daytime, nighttime, sunny, cloudy, rainy, etc.), and varying light intensities and shooting angles. The dataset is divided into 6,471 training images, 548 validation images, and 1,610 test images.
[0123] The labeling includes 10 target categories: pedestrians, crowds, bicycles, cars, vans, trucks, tricycles, covered tricycles, buses, and motorcycles.
[0124] The HIT-UAV dataset consists of 2,898 infrared thermal images acquired by drones, significantly expanding the scope of drone scenarios in low-light environments. The dataset contains a large number of small targets, broadly categorized into five main groups: pedestrians, vehicles, bicycles, other vehicles, and unrelated areas.
[0125] The dataset consists of 2029 training images, 290 validation images, and 579 test images.
[0126] NWPU VHR-10 is a high-resolution remote sensing image dataset containing 650 labeled images and 150 unlabeled images. These images were extracted from Google Earth and Vaihingen datasets, totaling 3,651 instances. NWPUVHR-10 covers ten different categories, such as tennis courts, airplanes, ships, basketball courts, and athletic tracks.
[0127] The comparison results on the Visdrone2019 dataset are shown in Table 1. This invention achieves a better balance between parameter quantity and detection accuracy, using only 2.49M parameters to achieve the highest mAP0.5 and mAP0.5:0.95 values of 0.317 and 0.180, respectively. This performance surpasses recent YOLO variants such as YOLOv10n and YOLOv11n.
[0128] Meanwhile, the lightweight design of this invention enhances the small target detection capability in UAV scenarios, achieving a real-time performance of 149 frames per second and improving accuracy by 4.5%. This allows it to meet the needs of real-time applications while ensuring high detection accuracy, making it particularly suitable for application scenarios in UAV target detection tasks where both speed and accuracy are highly demanding.
[0129] Table 1: Test results of mainstream object detection methods on the Visdrone2019-DET-Test dataset; Model Params / M P FPS mAP0.5 mAP0.5:0.95 Retina-Net 36.51 0.379 59 0.281 0.161 FCOS 32.13 0.409 60 0.309 0.174 YOLOv5n 1.77 0.349 227 0.233 0.118 YOLOv5s 7.03 0.410 222 0.291 0.156 YOLOX 5.03 0.434 181 0.302 0.163 YOLOv8n 3.01 0.393 277 0.273 0.153 YOLOv9-t 2.62 0.427 106 0.294 0.170 YOLOv10n 2.69 0.399 256 0.273 0.153 YOLOv11n 2.58 0.399 217 0.276 0.153 This invention 2.49 0.438 149 0.317 0.180
[0130] To further verify that the method proposed in this invention has good robustness and accuracy when dealing with complex scenarios, comparative experiments were conducted on HIT-UAV and NWPU VHR-10.
[0131] Table 2 shows the experimental results of the proposed method and mainstream tracking methods on the HIT-UAV dataset.
[0132] The present invention achieved the highest mAP0.5 and mAP0.5:0.95 values of 0.851 and 0.567, respectively. This demonstrates the superior performance of the present invention in infrared UAV target detection.
[0133] Table 2: Test results of mainstream object detection methods on the HIT-UAV dataset; Model Precision mAP0.5 mAP0.5:0.95 RTMDet 0.866 0.823 0.528 YOLOv5n 0.851 0.820 0.514 YOLOv5s 0.882 0.834 0.545 YOLOX 0.831 0.752 0.435 YOLOv8n 0.854 0.825 0.548 YOLOv9-t 0.840 0.820 0.542 YOLOv10n 0.879 0.800 0.526 YOLOv11n 0.875 0.803 0.529 This invention 0.867 0.851 0.567
[0134] Table 3 shows the experimental results of the proposed method and mainstream tracking methods on the NWPU VHR-10 dataset.
[0135] This invention achieved the highest mAP0.5 score, and its accuracy and mAP0.5:0.95 score remain highly competitive.
[0136] The experimental results are as follows: The method proposed in this invention shows good performance in UAV detection scenarios with severe occlusion, changes in lighting and scale, and sudden target movement, and effectively reduces missed detections and false detections.
[0137] Table 3: Test results of mainstream object detection methods on the NWPU VHR-10 dataset; Model Precision mAP0.5 mAP0.5:0.95 DETR 0.885 0.882 0.549 ATSS 0.796 0.822 0.469 YOLOv5n 0.879 0.853 0.499 YOLOX 0.909 0.888 0.543 TOOD 0.803 0.827 0.474 YOLOv8n 0.904 0.880 0.563 YOLOv9-t 0.899 0.878 0.565 YOLOv10n 0.851 0.823 0.511 YOLOv11n 0.872 0.884 0.552 This invention 0.900 0.889 0.545
[0138] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for detecting small targets on unmanned aerial vehicles (UAVs) based on an improved YOLOv8 network, characterized in that, Includes the following steps: Step 1: Construct the network model; The network model includes a backbone network, a UAV image detection pyramid network, and a dynamic alignment detection head; the backbone network is used for feature extraction; the UAV image detection pyramid network is used to analyze and fuse features from the backbone network; and the dynamic alignment detection head is used to generate preliminary predictions of classification confidence and bounding box coordinates. Step 2: Process the drone aerial images through the backbone network to output feature maps, and then perform multi-scale feature enhancement on the feature maps through the drone image detection pyramid network; Step 3: Use a dynamic alignment detection head to achieve feature consistency fusion for classification and localization tasks; Step 4: Optimize the parameters of the network model using the obtained detection results, and detect small targets in the drone aerial photography to obtain the detection results.
2. The method for detecting small targets on a UAV based on an improved YOLOv8 network according to claim 1, characterized in that, The backbone network described in step 1 includes a C2f module and detection layers P2, P3, P4, and P5, which are used to output feature maps at different scales. The UAV image detection pyramid network includes a spatial-to-depth convolutional module and a CSP-OKM module; the spatial-to-depth convolutional module extracts features of small targets; The spatial-to-depth convolution module extends the P2 detection layer in the backbone network to the subsequent pyramid network on the existing YOLOv8 network model, and uses spatial-to-depth convolution to downsample the features of the P2 detection layer. The CSP-OKM module is used to preserve high-resolution features; The CSP-OKM module, based on the existing YOLOv8 network model, recovers the features missed after the fusion of the P2 and P3 detection layers. It reduces computation and enhances the ability to capture multi-scale features by using depthwise separable convolutions in local, large-scale, and global branches. In the global branch, it introduces a dual-channel attention module for the frequency and spatial domains, and a spatial attention module, and dynamically adjusts the spatial and channel feature weights by combining fast Fourier transform and its inverse transform. The dynamic alignment detection head includes a feature extraction module, a deformable convolutional layer, a task decomposition layer, and a decoupled output layer; the feature extraction module includes a shared convolutional layer for extracting joint features of classification and localization tasks. The feature extraction module introduces a shared convolution in the feature extraction layer of the detection head on the existing YOLOv8 network model, and performs group normalization on the feature map extracted by the shared convolution. The deformable convolutional layer includes a deformable convolution and an attention weight generator; the deformable convolution is used to dynamically adjust the sampling position of the convolution kernel to generate a spatial feature alignment offset that matches the target geometric characteristics. The attention weight generator dynamically selects features for the classification branch; The deformable convolutional layer introduces a deformable convolutional module into the localization branch of the detection head output layer on the existing YOLOv8 network model; and introduces an attention mechanism into the classification branch of the detection head output layer to dynamically select specific features required for classification. The task decomposition layer uses a hierarchical attention mechanism to dynamically weight the joint features in terms of spatial and channel dimensions, generating classification and localization-oriented feature maps. The decoupled output layer is used to output the target classification confidence and bounding box coordinates respectively, thereby achieving task decoupling optimization.
3. The method for detecting small targets on a UAV based on an improved YOLOv8 network according to claim 1, characterized in that, Step 2 specifically includes the following steps: Step 2.1: Process the drone aerial images through the backbone network, output the feature map of layer P5, upsample the feature map, and stitch it with the feature map of layer P4; Step 2.2: The concatenated feature maps are grouped and local connections are made across stages using the C2f layer; Step 2.3: Spatial reconstruction downsampling is performed on the P2 detection layer to extract features of small targets; Step 2.4: The feature map processed by the C2f module is upsampled again and concatenated with the feature map of the P3 layer; Step 2.5: The stitched feature map is fed into the CSP-OKM module, and the small target features are recovered through the multi-branch architecture to obtain the final feature map; Step 2.6: The final feature map is processed by two consecutive stitchings, C2f layer processing and convolutional layer transformation to form multi-scale information, and then input into the detection head.
4. The method for detecting small targets on a UAV based on an improved YOLOv8 network according to claim 3, characterized in that, Step 2.3 specifically involves the following: the spatial-to-depth convolution module includes a spatial-to-depth transformation layer and a non-strut convolution layer, wherein the spatial-to-depth transformation layer is used for spatial reconstruction and channel splicing, and the non-strut convolution layer uses a convolution with a stride of 1 for channel compression. The space-to-depth transformation layer performs spatial recombination and channel stitching of the feature map through the following process: ;in, It is the downsampling factor. This represents the sub-feature map generated through the slicing operation. This represents the starting offset of the sub-feature map. This is the intermediate feature map used as input. This represents the spatial size of the input feature map.
5. The method for detecting small targets on a UAV based on an improved YOLOv8 network according to claim 3, characterized in that, Step 2.5 specifically involves the CSP-OKM module achieving channel separation through existing cross-stage local networks. The input features are first transformed by a 1×1 convolutional layer and then divided into three branches to capture local features, large-scale features, and global features, respectively.
6. The method for detecting small targets on a UAV based on an improved YOLOv8 network according to claim 1, characterized in that, Step 3 specifically includes the following steps: Step 3.1: Generate a preliminary feature map from the feature map obtained from the UAV image detection pyramid network using the feature extraction module; Step 3.2: Concatenate the preliminary feature map with the feature map obtained from the UAV image detection pyramid network to form a fused feature map; Step 3.3: The fused feature map is fed into the task decomposer, and the interaction features generated after channel concatenation are processed using the hierarchical attention mechanism; specifically: the task decomposer performs global average pooling and fully connected layer processing on the fused features, generates a weight vector through Sigmoid activation, and then multiplies it with the original fused features to achieve weighted fusion. Step 3.4: Dynamically sample interaction features to optimize feature interactions in the localization branch; input the interaction features into the attention weight generator to dynamically select features for the classification branch; Step 3.5: Decouple the output layer to generate the final detection and classification results.
7. The method for detecting small targets on a UAV based on an improved YOLOv8 network according to claim 6, characterized in that, Step 3.1 specifically includes: the feature extraction module includes cascaded shared convolution and group normalization operations; The calculation process for shared convolution is as follows: ;in, It is the output feature map The position above, For the input feature map, To share the convolution kernel.
8. The method for detecting small targets on a UAV based on an improved YOLOv8 network according to claim 6, characterized in that, The calculation process for dynamic sampling described in step 3.4 is as follows: ;in, and These represent the input and output feature maps, respectively. Indicates the position on the feature map. It is the size of the convolution kernel. These are the weights of the convolution kernel. Indicates the first Predefined offsets at each position, It adjusts the offset of the sampling position. It is a mask for dynamically adjusting feature weights, and K represents the number of sampling points in the convolution kernel.
Citation Information
Cited By
Unmanned aerial vehicle image target detection method based on improved RTDETR model
CN121214280A
Unmanned aerial vehicle image target detection method based on improved RT_DETR model
CN121214280B
Remote sensing small target detection network and method based on frequency domain and space domain adaptive enhancement
CN121437859A