An Improved YOLOv8 Model for Small Target Detection in UAV Imagery

The rapid proliferation of unmanned aerial vehicles (UAVs), or drones, across military, civilian, and commercial sectors has been nothing short of revolutionary. Their agility, accessibility, and ability to capture high-altitude perspectives have unlocked applications ranging from surveillance and traffic monitoring to agricultural surveying and disaster response. The core technological enabler for many of these advanced applications is robust and reliable computer vision, specifically real-time object detection. While state-of-the-art detection algorithms perform admirably on medium and large-sized objects, they consistently struggle with the persistent challenge of small target detection. In the context of UAV drone aerial photography, targets such as distant vehicles, pedestrians, or cyclists often occupy minuscule regions in the captured imagery, characterized by low resolution, scarce pixel information, and complex, cluttered backgrounds. This leads to frequent false positives and, more critically, missed detections, severely limiting the operational reliability of UAV drone systems. Therefore, developing a detection model that balances high accuracy for small targets with the stringent requirements for real-time performance and lightweight deployment on resource-constrained UAV drone platforms is a problem of significant practical importance.

Contemporary object detection paradigms are primarily dominated by three families of algorithms. The first, inspired by the success in natural language processing, is based on the Transformer architecture. Models like DETR introduced an end-to-end detection framework but often require extensive pre-training and can be computationally heavy for real-time UAV drone applications. The second family is the Anchor-Based approach, which includes two-stage detectors like Faster R-CNN and its enhancements (e.g., Feature Pyramid Networks, or FPN) and single-stage detectors like the YOLO (You Only Look Once) series and SSD. The third family, Anchor-Free detectors like FCOS and CornerNet, simplifies the pipeline by eliminating pre-defined anchor boxes. Among these, the YOLO family, particularly the recent iterations, has emerged as the de facto standard for real-time applications due to an excellent trade-off between speed and accuracy. The latest version, YOLOv8, further advances this by adopting an Anchor-Free detection head, allowing for more direct and potentially more accurate prediction of object properties without anchor box constraints. However, even YOLOv8 in its standard form is not optimized for the specific intricacies of small target detection in UAV drone imagery. Prior attempts to improve small object detection often involve complex multi-scale feature fusion networks, specialized context modules, or density-based cropping techniques. While these methods can boost accuracy, they frequently come at the cost of increased model complexity, parameter count, and inference latency, making them unsuitable for deployment on edge devices carried by a UAV drone.

In this work, we address the dual challenge of improving small target detection accuracy while aggressively pursuing model lightweighting. We propose a novel, efficient modification of the YOLOv8 architecture specifically tailored for UAV drone vision tasks. Our core contributions are twofold and strategically target the two key components of a detector: the feature fusion neck and the feature extraction backbone. First, we radically simplify the neck structure of YOLOv8. Instead of the computationally heavier Path Aggregation Network (PANet), we revert to a more streamlined Feature Pyramid Network (FPN) structure. This simplification alone significantly reduces the model’s parameter footprint and computational load. Crucially, we augment this FPN with an additional, carefully designed feature fusion module that effectively harnesses fine-grained detail from the shallower layers of the network. This module provides the subsequent detection head with richer spatial features that are essential for localizing tiny objects, thereby directly combating the high miss rate associated with small target detection. Second, we enhance the model’s perceptual acuity by integrating an Efficient Local Attention (ELA) mechanism into the backbone. The ELA module allows the network to focus its computational resources on salient regions within the feature maps, suppressing irrelevant background noise and precisely highlighting potential small target locations. Unlike other attention mechanisms that can be computationally expensive, ELA achieves this with a lightweight design involving strip pooling and grouped normalization, making it ideal for a UAV drone deployment scenario. The synergy of these two modifications results in a detector that is not only smaller and faster than the baseline YOLOv8 but also demonstrably more accurate for detecting small objects in challenging UAV drone aerial images.

The evolution of object detection for UAV drone applications has closely followed broader trends in deep learning. Early methods relied heavily on two-stage detectors. The R-CNN family, culminating in Faster R-CNN with its Region Proposal Network (RPN), provided high accuracy but was often too slow for the real-time demands of a flying UAV drone. The introduction of the Feature Pyramid Network (FPN) was a milestone for multi-scale detection, as it enabled better utilization of features from different network depths. For UAV drone imagery, where objects can appear at vastly different scales, such multi-scale reasoning is indispensable. The pursuit of speed led to the dominance of single-stage detectors. YOLO and SSD frameworks achieved remarkable frame rates. The YOLO series, through continuous iterations (v3, v5, v8), has consistently improved in terms of accuracy, speed, and architectural elegance. YOLOv5 popularized a streamlined pipeline and the use of CSPNet-inspired structures in the backbone. YOLOv8’s shift to an Anchor-Free head marked another step towards simplification and efficiency. Concurrently, researchers have proposed numerous specialized techniques for small target detection. Some approaches involve slicing high-resolution UAV drone images into patches or using adaptive zoom-in strategies. Others design complex feature fusion pathways, such as Bi-directional FPN (BiFPN), to enhance feature flow across scales. Attention mechanisms, from Squeeze-and-Excitation to Coordinate Attention, have been integrated to boost feature representation. However, a common drawback among these advanced methods is their increased computational burden. For a system intended to run on-board a UAV drone, where computational power and battery life are limited, model size and inference speed are as critical as accuracy. Our work distinguishes itself by prioritizing this balance. We consciously simplify the overall architecture while injecting efficiency-focused enhancements (the streamlined FPN and the lightweight ELA), ensuring the model remains highly suitable for real-time UAV drone operation.

Our methodological starting point is the YOLOv8 architecture. A standard object detector like YOLOv8 comprises three primary sections: the Backbone, the Neck, and the Head. The Backbone (typically a CSPDarknet variant) is responsible for extracting hierarchical feature maps from the input image. The Neck (PANet in YOLOv8) performs multi-scale feature fusion and aggregation, combining deep, semantically rich features with shallow, high-resolution features. The Head then performs the final task of classification and bounding box regression based on the fused features from the Neck. Our modifications are applied to the Backbone and the Neck to directly improve feature extraction and fusion for small target detection.

Our first major modification targets the Neck. The default PANet in YOLOv8 incorporates both top-down and bottom-up pathways, facilitating rich information exchange. However, this comes with increased depth and parameter count. For the specific challenge of small target detection in UAV drone imagery, we hypothesize that a simpler, more direct fusion of high-resolution features is paramount. Therefore, we replace the PANet with a classic FPN structure. The FPN constructs a feature pyramid via a top-down pathway with lateral connections, effectively merging deep and shallow features. To compensate for the potential loss of some feature refinement and to provide even stronger signals for small objects, we introduce an additional feature fusion block. This block takes outputs from the early stages of the backbone (which have not undergone excessive downsampling) and the FPN pathway, blending them to produce a feature map rich in fine spatial details. The outputs from our modified Neck, denoted as P2, P3, and P4, correspond to feature maps downsampled by factors of 4, 8, and 16 relative to the input image, respectively. In contrast, the original YOLOv8 neck outputs P3, P4, P5 (downsampled by 8, 16, 32). By including the P2 layer (4x downsampling), we provide the detection head with a much higher-resolution feature map specifically tuned for detecting the smallest objects visible to the UAV drone‘s camera. To maintain a lightweight profile, we also reduce the channel dimensions of these neck outputs.

The second major innovation is the integration of the Efficient Local Attention (ELA) module into the Backbone. Small targets in a vast UAV drone scene are often lost in a sea of background information. An attention mechanism helps the model “focus” on relevant regions. ELA is chosen for its balance of effectiveness and efficiency. It improves upon mechanisms like Coordinate Attention (CA) by simplifying the computational flow and using strip pooling and Group Normalization for better stability and localization. The ELA operation can be formalized as follows. For an input feature map $x_t$ at channel $t$, strip pooling is first applied in the horizontal and vertical directions:

$$z_{t}^{h}(g) = \frac{1}{W} \sum_{0 \leq i < W} x_t(g, i),$$
$$z_{t}^{w}(k) = \frac{1}{H} \sum_{0 \leq j < H} x_t(j, k).$$

Here, $z_{t}^{h}(g)$ is the pooled output for height $g$ in the horizontal direction (averaging across width $W$), and $z_{t}^{w}(k)$ is for width $k$ in the vertical direction (averaging across height $H$). These 1D feature vectors are then processed independently by two 1D convolutional layers, $F_h$ and $F_w$, followed by Group Normalization ($Gn$) and a sigmoid activation function ($\sigma$) to generate attention weights:

$$y_g = \sigma(Gn(F_h(z^h))),$$
$$y_k = \sigma(Gn(F_w(z^w))).$$

Finally, the input feature map is recalibrated by element-wise multiplication with the two attention maps:

$$S = x_t \cdot y_g \cdot y_k.$$

This process allows ELA to capture long-range dependencies along the spatial axes with a narrow kernel focus, preventing irrelevant regions from diluting the feature response for a potential small target. By embedding ELA modules at strategic points within the backbone, we enhance the model’s ability to pinpoint regions of interest in the UAV drone feed before the features are passed to the neck for fusion.

The final architecture of our proposed model, incorporating both the simplified FPN with enhanced fusion and the ELA-augmented backbone, is optimized for the UAV drone small object detection task. The model accepts input images resized to $640 \times 640$ pixels. The backbone extracts features, with ELA modules helping to accentuate potential target regions. The modified neck then fuses features from three key stages, producing high-resolution maps (P2, P3, P4) that are passed to the Anchor-Free detection head for final prediction. The overall design philosophy is one of strategic simplification paired with targeted, efficient enhancements.

To validate the effectiveness of our proposed model, we conduct comprehensive experiments on the VisDrone2019 dataset, a widely recognized benchmark for UAV drone vision tasks. This dataset contains over 10,000 images captured by various UAV drones in diverse scenarios, with annotations for 10 object categories like pedestrian, car, van, and truck. The images are characterized by high resolution, complex backgrounds, and a high density of small objects, making it an ideal testbed for our work. We use the standard split for training, validation, and testing. All models are trained from scratch without pre-trained weights to ensure a fair comparison. Key training hyperparameters are summarized below:

Parameter Value
Epochs 250
Batch Size 8
Image Size 640×640
Initial Learning Rate 1e-2
Optimizer SGD with momentum=0.937
Data Augmentation Mosaic, MixUp, etc.

We employ standard evaluation metrics for object detection: mean Average Precision (mAP) at an Intersection-over-Union (IoU) threshold of 0.50 (denoted as mAP@0.5), Precision (P), Recall (R), number of parameters, Giga Floating Point Operations (GFLOPs), model size, and inference speed in Frames Per Second (FPS). Recall is particularly important for UAV drone safety applications, as it measures the model’s ability to avoid missing targets.

We first perform an ablation study to dissect the contribution of each proposed modification. The baseline is YOLOv8s, the small variant which is a common starting point for edge-device deployment. “Model-1” incorporates only the Neck simplification (FPN + fusion module). “Model-2” is our full proposal, integrating both the modified Neck and the ELA modules into the Backbone. The results on the VisDrone2019 test-dev set are compelling:

Model mAP@0.5 (%) Recall (%) Params (M) GFLOPs Size (MB) FPS
YOLOv8s (Baseline) 32.1 33.4 11.13 28.5 21.4 385
Model-1 (Neck Only) 33.1 34.8 5.51 17.1 10.8 400
Model-2 (Full Proposal) 33.4 34.6 5.55 17.2 10.8 400

The ablation results clearly demonstrate the success of our lightweighting strategy. Model-1 reduces the parameter count and model size by approximately 50% compared to the baseline YOLOv8s, while simultaneously improving mAP@0.5 by 1.0% and increasing inference speed (FPS). This proves that a simplified, well-designed neck can be more effective for small target detection than a more complex one. Adding the ELA mechanism in Model-2 provides a further mAP boost to 33.4%, with a negligible increase in parameters and GFLOPs. Our final model achieves a 4% relative improvement in mAP@0.5 over the baseline, alongside a 50% reduction in size and a 4% speedup. This presents an exceptional trade-off: a model that is simultaneously more accurate, much smaller, and faster—a trifecta perfectly aligned with the needs of real-time UAV drone deployment on platforms like NVIDIA Jetson or Raspberry Pi.

We further compare our full model against other prominent members of the YOLO family to contextualize its performance. YOLOv5s represents an earlier generation of efficient detectors, YOLOv8s is our baseline, and the recently released YOLOv9c represents a modern, more complex architecture.

Model mAP@0.5 (%) Params (M) GFLOPs Size (MB) FPS
YOLOv5s 27.0 7.04 15.8 13.7 238
YOLOv8s (Baseline) 32.1 11.13 28.5 21.4 385
YOLOv9c 36.4 25.33 102.4 49.2 256
Our Model (Proposed) 33.4 5.55 17.2 10.8 400

The comparison reveals a clear hierarchy. YOLOv5s, while lightweight, suffers a significant accuracy penalty. YOLOv9c achieves the highest mAP@0.5 (36.4%) but at an enormous computational cost—its parameters, GFLOPs, and size are roughly 4-6x that of our model, and its inference speed is 36% slower. For a UAV drone application where compute resources and power are limited, such a large model is often impractical. Our proposed model strikes what we argue is the optimal balance for this domain. It surpasses YOLOv8s in accuracy and speed while being half the size. It maintains a clear accuracy advantage over YOLOv5s with comparable efficiency. Crucially, it delivers 92% of the accuracy of the much larger YOLOv9c while being over 4.5x smaller and 1.56x faster. This profile makes our model highly attractive for real-world UAV drone integration.

In this work, we have tackled the critical challenge of small target detection for UAV drone vision systems. By rethinking the YOLOv8 architecture with a focus on efficiency and precision, we developed a novel model that simplifies the feature fusion neck and enhances the backbone with a lightweight attention mechanism. The experimental results on the demanding VisDrone2019 benchmark are unequivocal: our model significantly reduces the computational footprint and physical size while improving detection accuracy and frame rate. This combination of attributes—smaller, faster, and more accurate—is precisely what is required for deploying advanced vision capabilities on resource-constrained UAV drone platforms. The proposed modifications are general and could inspire further lightweight designs for other edge-AI vision tasks. Future work will explore the quantization and hardware-specific optimization of this model to push the boundaries of on-board real-time analytics for the next generation of intelligent UAV drones.

Scroll to Top