Improved YOLOv8-Based Aerial Detection Algorithm for China Drone

In this work, we present an enhanced object detection framework tailored specifically for aerial images captured by unmanned aerial vehicles (UAVs) widely deployed across China. With the rapid expansion of China drone applications in agriculture, surveillance, disaster response, and smart city management, the demand for accurate and real-time target detection from UAV platforms has never been greater. However, existing detection models often struggle with small object scales, complex backgrounds, and severe occlusions that are common in drone-captured imagery. To address these challenges, we propose an improved version of the YOLOv8 architecture, termed YOLOv8-A, which incorporates three key innovations: a global channel-spatial attention (GCSA) module, an AIFI module borrowed from the RT-DETR framework, and a Wise-IoU (WIoU) loss function. Extensive experiments conducted on the VisDrone2019 dataset demonstrate that our method achieves a mean average precision (mAP) of 39.4%, surpassing the baseline YOLOv8s by 2.1 percentage points while maintaining a real-time inference speed suitable for edge devices on China drone platforms. Furthermore, comparative studies against state-of-the-art detectors such as YOLOv4, YOLOv5s, YOLOXs, and YOLOv11s confirm the superiority of our approach. A self-collected pedestrian dataset from urban Chinese roads also validates the generalization capability of YOLOv8-A, highlighting its potential for widespread deployment in China drone-based intelligent systems.

1. Introduction

The proliferation of China drone technology has revolutionized numerous sectors, enabling cost-effective and flexible aerial data acquisition. Equipped with high-resolution optical cameras, drones capture images that contain rich spatial details but also pose unique challenges for object detection. Small objects, such as pedestrians, cyclists, and vehicles, often occupy only a few pixels in the image, making them difficult to identify. Additionally, the cluttered backgrounds typical of urban and rural scenes in China further complicate detection. While deep learning-based object detectors, especially the YOLO family, have achieved remarkable success in general visual recognition tasks, their performance on drone imagery remains suboptimal without specialized adaptations.

Our goal is to develop a detection algorithm that can be seamlessly integrated into China drone systems for real-time monitoring and analysis. We aim to improve both the precision and recall of small objects without sacrificing inference speed. By leveraging the strengths of attention mechanisms, advanced feature interaction modules, and a loss function that emphasizes difficult samples, we design YOLOv8-A to overcome the inherent limitations of standard detectors. The main contributions of this paper are threefold:

  • We introduce the Global Channel-Spatial Attention (GCSA) module into the backbone network of YOLOv8s. This module captures long-range dependencies across both channel and spatial dimensions, enhancing the representation of small objects in complex scenes captured by China drone cameras.
  • We replace the conventional Spatial Pyramid Pooling Fast (SPPF) module in the neck with the AIFI (Attention-based Intra-scale Feature Interaction) module from RT-DETR. AIFI employs multi-head self-attention to model context information more effectively, leading to better feature fusion for objects of varying scales in China drone images.
  • We adopt the Wise-IoU (WIoU) loss function to replace the original CIoU loss. WIoU dynamically adjusts the penalty weights based on the quality of bounding box regression, which significantly improves localization accuracy for small and hard-to-detect targets, a common issue in China drone aerial photography.

The remainder of this paper is organized as follows. Section 2 reviews related work in UAV object detection and attention mechanisms. Section 3 details the proposed YOLOv8-A architecture, including the GCSA, AIFI, and WIoU components. Section 4 presents experimental setups, ablation studies, and comparisons with advanced methods. Finally, Section 5 concludes the paper and discusses future directions for China drone detection research.

2. Related Work

2.1 YOLO Series for Drone Detection

The You Only Look Once (YOLO) family has evolved rapidly, with versions from YOLOv1 to YOLOv8 offering increasingly better trade-offs between speed and accuracy. YOLOv8, in particular, adopts an anchor-free design and a decoupled head, making it well-suited for mobile and embedded deployments such as those on China drone platforms. Researchers have proposed numerous enhancements to YOLO for drone images, including attention mechanisms, multi-scale feature fusion, and advanced data augmentation. However, most existing works focus on specific datasets or application scenarios, lacking a comprehensive solution that addresses both small object detection and computational efficiency simultaneously.

2.2 Attention Mechanisms

Attention has become a de facto technique in modern deep learning. The Global Channel-Spatial Attention (GCSA) module used in our work combines channel attention and spatial attention with a channel shuffle operation to improve information flow. This design is inspired by the fact that drone images often contain targets with similar textures but different spatial locations; capturing their interrelationships is crucial for accurate detection.

2.3 Feature Interaction and Loss Functions

The AIFI module from RT-DETR (Real-Time Detection Transformer) leverages transformer encoders to capture long-range dependencies. In contrast to traditional convolutional approaches, AIFI processes high-level features with multi-head self-attention, which is particularly beneficial for distinguishing small objects in cluttered backgrounds—a frequent scenario in China drone surveillance. Meanwhile, Wise-IoU (WIoU) reweights the standard IoU loss based on the overlap between predicted and ground-truth boxes, allowing the model to focus on hard-to-regress bounds. This property is essential for the dense and occluded objects commonly seen in China drone datasets.

3. Proposed Method: YOLOv8-A

Our proposed architecture, YOLOv8-A, is built upon the YOLOv8s baseline. The overall structure consists of four main stages: input preprocessing, backbone feature extraction, neck feature fusion, and detection head. The key modifications are highlighted below.

3.1 Global Channel-Spatial Attention (GCSA) Module

The GCSA module is inserted into the backbone network after the final convolutional stage. Its operation is defined as follows. Given an input feature map \(F_{input} \in \mathbb{R}^{C \times H \times W}\), we first apply a permutation operation to convert it to \(W \times H \times C\) and feed it into a multi-layer perceptron (MLP). After reversing the permutation and applying a sigmoid activation, we obtain a channel attention map. The channel-enhanced feature \(F_{channel}\) is computed as:

\[
F_{channel} = \sigma(\text{MLP}(\text{Permute}(F_{input}))) \odot F_{input}
\]

where \(\sigma\) is the sigmoid function and \(\odot\) denotes element-wise multiplication. Next, we perform a channel shuffle operation to further mix information among groups. Finally, a spatial attention submodule processes the shuffled feature through two \(7 \times 7\) convolutional layers with batch normalization and ReLU, followed by a sigmoid activation to produce the final attention map. The output feature \(F_{spatial}\) is given by:

\[
F_{spatial} = \sigma(\text{Conv2}(\text{BN}(\text{ReLU}(\text{Conv1}(F_{shuffle}))))) \odot F_{shuffle}
\]

This dual attention mechanism enhances the discriminative power for small objects in China drone images.

3.2 AIFI Module for Neck Feature Fusion

We replace the SPPF module in the original neck with the AIFI module. AIFI consists of a multi-head self-attention (MHSA) layer followed by layer normalization and an MLP with residual connections. Given the high-level feature map \(S5\) from the backbone, we first flatten it into a sequence and encode it with sinusoidal positional embeddings. The MHSA captures pairwise interactions across spatial positions, effectively modeling long-range context. The output is then reshaped back to a 2D feature map \(F5\). The process can be summarized as:

\[
F5 = \text{MLP}(\text{Norm}(\text{MHSA}(\text{Embed}(S5)))) + S5
\]

This enriched feature map is subsequently fed into the FPN+PAN structure for multi-scale fusion. Compared to the original SPPF, AIFI reduces the number of parameters while improving the ability to discriminate small objects in cluttered backgrounds—a common challenge for China drone detection.

3.3 Wise-IoU (WIoU) Loss Function

We adopt the WIoUv1 loss to replace the standard CIoU. WIoUv1 examines the regression difficulty of each bounding box and assigns a penalty weight accordingly. The loss is defined as:

\[
L_{IoU} = 1 – \frac{W_i H_i}{w h + w_{gt} h_{gt} – W_i H_i}
\]

\[
R_{WIoU} = \exp\left( \frac{(x – x_{gt})^2 + (y – y_{gt})^2}{(W_g^2 + H_g^2)} \right)
\]

\[
L_{WIoUv1} = R_{WIoU} \cdot L_{IoU}
\]

Where \( (x,y) \) and \( (x_{gt}, y_{gt}) \) are the centers of the predicted and ground-truth boxes respectively; \(W_g\) and \(H_g\) define the minimum enclosing box. The exponential term \(R_{WIoU}\) amplifies the loss for poorly localized predictions, making the model pay more attention to hard samples. This property is especially beneficial for small and overlapping objects that are frequently missed in China drone imagery.

4. Experiments

4.1 Dataset and Implementation Details

We evaluate our method on the VisDrone2019 dataset, which contains 6,471 training images, 1,580 test images, and 548 validation images. More than 60% of the annotated targets are small (less than 32×32 pixels), making it an ideal benchmark for China drone detection. All images are resized to 640×640 pixels. The network is trained for 200 epochs using stochastic gradient descent (SGD) with a momentum of 0.937, weight decay of 5×10⁻⁴, initial learning rate of 0.01 (later tuned to 0.1), and a batch size of 16. Early stopping is applied if validation loss does not improve for 20 consecutive epochs. The hardware consists of an Intel Xeon Platinum 8481C CPU and an NVIDIA RTX 4090D GPU (24 GB VRAM). Key hyperparameters for WIoU are α=1.9 and δ=3. Mosaic augmentation is used for the first 190 epochs and disabled for the last 10 epochs.

4.2 Evaluation Metrics

We report precision (P), recall (R), mean average precision (mAP), number of parameters (Params), floating-point operations (FLOPS), and inference speed (FPS). The formulas for P and R are:

\[
P = \frac{TP}{TP+FP}, \quad R = \frac{TP}{TP+FN}
\]

mAP is computed as the average over 10 object categories (pedestrian, people, bicycle, car, van, truck, tricycle, awning-tricycle, bus, motor).

4.3 Ablation Study

We conduct ablation experiments by incrementally adding each proposed component to the YOLOv8s baseline. Results are summarized in Table 1 and Table 2.

Table 1: Ablation study results (overall metrics)
Model P (%) R (%) mAP (%) Params (10⁶) FLOPS FPS (ms)
Baseline (YOLOv8s) 49.1 36.6 37.3 11.12 28.5 33.03
+GCSA 49.4 37.8 38.9 17.68 33.7 29.34
+AIFI 49.8 37.8 38.1 10.57 27.7 26.19
+WIoU 50.8 37.2 38.5 11.13 28.5 30.04
+GCSA+AIFI 49.8 37.4 38.3 17.13 33.0 22.74
YOLOv8-A (full) 50.1 37.9 39.4 17.13 33.0 31.13
Table 2: mAP (%) per category for ablation variants
Category Baseline +GCSA +AIFI +WIoU +GCSA+AIFI Full
Pedestrian 40.4 42.0 40.8 42.9 42.6 42.8
People 31.2 32.5 31.4 30.9 30.4 32.7
Bicycle 11.4 12.3 11.5 11.9 12.9 12.2
Car 76.4 79.3 79.2 78.6 78.7 79.8
Van 42.4 44.3 44.4 44.5 44.1 45.3
Truck 35.2 35.5 35.0 36.0 34.9 37.0
Tricycle 26.1 27.7 27.0 26.5 27.0 27.2
Awning-tricycle 14.1 15.2 14.7 14.2 14.0 14.8
Bus 53.3 55.5 54.3 58.1 56.2 52.3
Motor 41.9 45.1 42.7 41.8 41.0 43.8

From the tables, we observe that each individual component contributes positively to the overall mAP. The GCSA module (+1.6% mAP) excels at capturing spatial relationships, particularly benefiting cars and motor. The AIFI module (+0.8% mAP) reduces parameters while improving context understanding. The WIoU loss (+1.2% mAP) significantly boosts pedestrian and bus detection, which are often occluded or tiny. Combining all three yields the highest mAP of 39.4% with only a slight increase in latency (from 33.03 ms to 31.13 ms), which is acceptable for real-time China drone applications. Notably, the full model achieves better recall (37.9%) than the baseline (36.6%), indicating fewer missed detections of small objects.

4.4 Learning Rate Tuning

We further optimize the learning rate for YOLOv8-A. Results are shown in Table 3. The best performance is obtained at a learning rate of 0.1, achieving a mAP of 41.2% on the validation set (note: this is slightly different from the test set mAP due to dataset split variance).

Table 3: Effect of learning rate on YOLOv8-A
LR 0.001 0.01 0.03 0.05 0.07 0.1
mAP (%) 28.5 39.4 40.3 40.8 40.9 41.2
P (%) 39.3 50.1 51.9 51.2 52.3 52.4
R (%) 29.6 37.9 38.8 39.0 39.1 39.5

4.5 Comparison with State-of-the-Art

We compare YOLOv8-A against several modern detectors on the VisDrone2019 test set. Results are listed in Table 4. Our method outperforms all competitors in mAP (39.4%), surpassing YOLOv4 (38.8%), YOLOv5s (38.5%), YOLOXs (32.5%), and YOLOv11s (38.2%). While YOLOXs has a higher precision (81.7%) due to its conservative detection threshold, its recall is extremely low (18.2%), leading to poor overall mAP. YOLOv8-A achieves a well-balanced trade-off between precision and recall, making it more suitable for practical China drone missions where both false alarms and missed targets should be minimized.

Table 4: Performance comparison of different detectors
Method mAP (%) P (%) R (%)
YOLOv4 38.8 49.6 37.8
YOLOv5s 38.5 49.4 37.9
YOLOXs 32.5 81.7 18.2
YOLOv11s 38.2 50.3 37.0
YOLOv8s 37.3 49.1 36.6
YOLOv8-A 39.4 50.1 37.9

4.6 Generalization on Self-Collected Dataset

To verify the generalization of YOLOv8-A beyond VisDrone, we collected an in-house dataset comprising 1000 aerial images of pedestrians on urban roads in Chinese cities. The dataset contains only one class (pedestrian) and was split into 800 training, 160 test, and 40 validation images. All models were trained under identical settings. As shown in Table 5, YOLOv8-A achieves the highest mAP of 62.1%, outperforming YOLOv4 (59.3%), YOLOv5s (59.0%), YOLOv8s (59.1%), and YOLOv11s (58.9%). This demonstrates the strong adaptation capability of our method to diverse China drone scenarios.

Table 5: Results on self-collected China drone pedestrian dataset
Method mAP (%) P (%) R (%)
YOLOv4 59.3 56.1 58.8
YOLOv5s 59.0 55.0 61.6
YOLOv8s 59.1 57.1 59.0
YOLOv11s 58.9 57.2 59.2
YOLOv8-A 62.1 62.8 58.6

5. Conclusion

In this paper, we presented YOLOv8-A, a novel detection algorithm specifically designed for China drone aerial imagery. By integrating a Global Channel-Spatial Attention module to enhance feature representation, an AIFI module to improve context modeling, and a Wise-IoU loss to focus on difficult samples, we achieved significant gains over the baseline YOLOv8s. On the VisDrone2019 dataset, our method improves mAP by 2.1 percentage points while maintaining real-time performance. Extensive comparisons with existing detectors and additional tests on a self-collected pedestrian dataset confirm the effectiveness and generalization of our approach. The YOLOv8-A architecture is well-suited for deployment on resource-constrained China drone platforms, where both accuracy and speed are critical. Future work will explore further lightweight designs to reduce model parameters and computational cost, enabling even wider adoption in China drone-based intelligent systems. We also plan to incorporate temporal information for video-based detection to handle occlusions more robustly.

Scroll to Top