OLF-YOLO: An Improved YOLOv8s Model for Drone Technology Target Detection

Drone technology has revolutionized the field of aerial object detection, enabling applications in urban traffic monitoring, power line inspection, and precision agriculture. However, the high flight altitude of unmanned aerial vehicles introduces severe challenges: targets appear extremely small in captured images, their features are ambiguous, and the detection accuracy degrades rapidly under varying lighting conditions and cluttered backgrounds. To address these limitations inherent in drone technology, we propose a novel object detection model named OLF-YOLO, which significantly enhances the performance of the standard YOLOv8s backbone. In this work, we introduce three key innovations: an omni-dimensional dynamic convolution (ODConv) module in the backbone to improve multi-dimensional feature extraction; a large separable kernel attention (LSKA) based reconstruction of the C2f module (L-C2f) in the neck to expand the receptive field; and a novel loss function F-IoU inspired by the dynamic weighting mechanism of Wise-IoU to better focus on hard samples. Comprehensive experiments on the VisDrone2019 dataset demonstrate that our OLF-YOLO achieves substantial gains: 5.9% improvement in mAP@0.50 and 4.0% improvement in mAP@0.50:0.95 over the baseline. The proposed model maintains real-time inference speed, making it highly suitable for practical drone technology deployment.

1. Introduction

In recent years, drone technology has become indispensable for a wide range of vision-based tasks. Unlike ground-level cameras, UAVs capture scenes from bird’s-eye views, where objects often occupy only a few pixels. This small-scale nature makes feature extraction particularly difficult. Traditional deep-learning-based detectors, such as the two-stage Faster R-CNN and the one-stage YOLO series, have been widely adopted for generic object detection. However, when applied directly to drone-captured images, they suffer from severe performance drops due to limited resolution, scale variation, and occlusion. Many researchers have attempted to adapt these models for drone technology: adding extra detection heads for small objects, incorporating attention mechanisms, or redesigning feature pyramid networks. Yet, challenges remain: (1) the standard convolution in the backbone ignores the dynamic nature of different input samples; (2) the limited receptive field of small convolutional kernels fails to capture long-range dependencies crucial for recognizing tiny objects; and (3) conventional loss functions treat all samples equally, leading to under-emphasis on hard examples. Our work aims to systematically address these issues and provide a robust solution tailored for drone technology.

2. Related Work

A large body of research has focused on improving YOLO variants for drone technology. For instance, Drone-YOLO introduced a filtering and separation feature extraction structure, while LW-YOLOv8 employed GhostBlockV2 and Bi-PAN-FPN to enhance feature fusion. TPH-YOLOv5 replaced the prediction head with a transformer to capture global context. CRP-YOLO added a small-object detection head at a higher resolution. DC-YOLOv8 proposed a novel down-sampling strategy. Despite these advances, none of them simultaneously tackles the dynamic convolution, large receptive field, and difficulty-aware loss function in a unified framework. Our OLF-YOLO integrates all three components and demonstrates consistent improvements over existing methods on multiple benchmarks.

3. Proposed Method

3.1 Omni-Dimensional Dynamic Convolution (ODConv) in Backbone

Standard convolution applies a fixed kernel to every input channel and spatial location. In contrast, ODConv applies attention mechanisms across four dimensions: spatial kernel size, input channel, output channel, and the kernel count. This allows the network to adaptively adjust convolutional weights based on the input, thereby enhancing feature extraction capability for drone technology images. The operation of ODConv for multiple kernels can be expressed as:

$$
y = \left( \alpha_{w1} \odot \alpha_{f1} \odot \alpha_{c1} \odot \alpha_{s1} \odot W_1 + \cdots + \alpha_{wn} \odot \alpha_{fn} \odot \alpha_{cn} \odot \alpha_{sn} \odot W_n \right) * x
$$

where \(\alpha_{si} \in \mathbb{R}^{k \times k}\), \(\alpha_{wi} \in \mathbb{R}\), \(\alpha_{fi} \in \mathbb{R}^{c_{in}}\), \(\alpha_{ci} \in \mathbb{R}^{c_{n}}\) are respectively the spatial, output-channel, input-channel, and kernel-level attention weights for the i-th convolution kernel \(W_i\). \(\odot\) denotes element-wise multiplication and \(*\) denotes convolution. In our backbone, we replace several standard Conv modules with ODConv to improve hierarchical feature extraction. The number of parameters is reduced due to the efficient attention design, and the model becomes more lightweight.

3.2 L-C2f Module: Large Separable Kernel Attention in Neck

To enlarge the receptive field without significant computational overhead, we employ LSKA (Large Separable Kernel Attention) and integrate it into the C2f module, resulting in the L-C2f module. LSKA decomposes a large 2D depthwise convolution kernel into two cascaded 1D kernels: first a vertical kernel followed by a horizontal kernel, and then a second stage for dilated kernels. This decomposition drastically reduces parameters while preserving the ability to capture long-range spatial dependencies. The LSKA computation can be summarized as:

$$
\tilde{Z}^C = \sum^{H,W} W^C_{(2d-1)\times 1} * \sum^{H,W} W^C_{1\times (2d-1)} * F^C
$$

$$
\bar{Z}^C = \sum^{H,W} W^C_{\frac{k}{d}\times 1} * \sum^{H,W} W^C_{1\times \frac{k}{d}} * \tilde{Z}^C
$$

$$
A^C = W^{1\times 1} * \bar{Z}^C
$$

$$
\tilde{F}^C = A^C \odot F^C
$$

Here, \(F^C\) is the input feature map for channel \(C\). The first two equations perform depthwise separable convolution with kernel size \((2d-1)\times(2d-1)\) to capture local spatial information, and the second pair further uses dilated separable kernels of size \(k\times k\) to obtain a large receptive field. The final attention map \(A^C\) is obtained by a 1×1 convolution and multiplied with the original feature map. In our L-C2f module, the original Bottleneck within C2f is replaced by a structure containing two LSKA modules. This expansion of the receptive field is particularly beneficial for drone technology, where small objects require context from a wider area to be accurately distinguished from background clutter.

3.3 F-IoU Loss Function

The original YOLOv8s uses CIoU loss for bounding box regression. CIoU considers overlap, center distance, and aspect ratio consistency, but it lacks dynamic weighting for hard samples. In drone technology, many small objects are heavily occluded or have low contrast, making them hard examples. We propose a new loss function, F-IoU, which incorporates a dynamic weighting factor similar to Wise-IoU while also preserving geometric penalties. The formulation is:

$$
R_{\text{FIoU}} = \frac{\theta}{1+\theta} R_{\text{WIoU}} L_{\text{IoU}} + \frac{1}{1+\theta} \left( \frac{(x-x_{gt})^2 + (y-y_{gt})^2}{W_g^2+H_g^2} + \alpha v \right)
$$

where \(\theta \in [0,1]\) is a hyperparameter that balances the first term (dynamic IoU weighting) and the second term (geometric regularization). \(R_{\text{WIoU}}\) is the Wise-IoU modulation factor \(R_{\text{WIoU}} = \exp\left( \frac{(x-x_{gt})^2+(y-y_{gt})^2}{W_g^2+H_g^2} \right)\). The term \(x, y, x_{gt}, y_{gt}\) are center coordinates, \(W_g, H_g\) are the size of the smallest enclosing box. The parameter \(\alpha\) and \(v\) are the same as in CIoU, where \(v = \frac{4}{\pi^2}\big( \arctan\frac{w_{gt}}{h_{gt}} – \arctan\frac{w}{h} \big)^2 \) and \(\alpha = \frac{v}{(1-L_{\text{IoU}})+v}\). By dynamically scaling the IoU loss for low-overlap predictions and later transitioning to geometric refinement, F-IoU effectively forces the model to pay more attention to difficult samples that are common in drone technology imagery. The optimal \(\theta\) was found to be 0.6 after ablation studies.

4. Experiments

4.1 Dataset and Implementation Details

We evaluate our model on the VisDrone2019 dataset, which is specifically designed for drone technology. It contains 8,629 images captured from UAVs under various weather and lighting conditions, with 10 object categories (pedestrian, people, bicycle, car, van, truck, tricycle, awning-tricycle, bus, motor). 67.2% of instances are small (area < 32×32 pixels), and nearly 50% are occluded. The training/validation/test splits consist of 6,471, 548, and 1,610 images respectively. Our experiments are conducted on an NVIDIA GeForce RTX 4080 with PyTorch 2.0 and CUDA 11.9. Images are resized to 640×640, batch size is 4, and training runs for 250 epochs. We use standard data augmentation including Mosaic and mix-up. The baseline model is YOLOv8s.

4.2 Evaluation Metrics

We adopt mean Average Precision at IoU thresholds 0.5 (mAP@0.50) and averaged over 0.50:0.95 (mAP@0.50:0.95). Precision, recall, and model complexity (parameters, FLOPs, FPS) are also reported.

4.3 Ablation Study on F-IoU Hyperparameter \(\theta\)

To determine the best value of \(\theta\) in F-IoU, we conduct experiments on the baseline YOLOv8s with different \(\theta\) values. Results are shown in Table 1.

Table 1: Influence of different \(\theta\) values on model performance

\(\theta\) mAP@0.50 (%) mAP@0.50:0.95 (%)
0.2 38.9 22.7
0.4 39.1 22.9
0.5 39.4 23.8
0.6 39.7 24.2
0.8 39.4 24.0

\(\theta = 0.6\) yields the best performance, achieving 39.7% mAP@0.50 and 24.2% mAP@0.50:0.95. This value is used in all subsequent experiments.

4.4 Ablation Study of Proposed Modules

We conduct systematic ablation experiments by adding each module individually and in combination to the baseline YOLOv8s. The results are summarized in Table 2.

Table 2: Ablation experiments results on VisDrone2019

Method Model Size (MB) FLOPs (109) FPS mAP@0.50 (%) mAP@0.50:0.95 (%)
Baseline (YOLOv8s) 22.5 28.7 89.2 39.2 23.8
+ODConv 21.4 26.7 91.6 40.0 24.6
+L-C2f 23.1 30.1 86.3 41.2 25.1
+F-IoU 22.6 28.7 88.7 39.7 24.2
+ODConv+L-C2f 22.9 28.3 84.5 44.3 25.9
+ODConv+F-IoU 21.4 27.7 86.5 41.5 24.8
+L-C2f+F-IoU 23.0 30.2 83.8 43.8 26.5
OLF-YOLO (All three) 22.0 28.4 78.4 45.1 27.8

Each module brings noticeable improvements. Particularly, the combination of all three yields a 5.9% gain in mAP@0.50 and a 4.0% gain in mAP@0.50:0.95 compared to the baseline, while the FPS remains above 78 frames per second, satisfying real-time requirements for drone technology applications. The model size and FLOPs are comparable or slightly improved, indicating an efficient design.

4.5 Comparison with Mainstream Detectors

We compare our OLF-YOLO with several state-of-the-art detectors, both generic and drone-specific. Results are shown in Table 3 and Table 4.

Table 3: Comparison with mainstream object detectors on VisDrone2019

Model FLOPs (109) FPS mAP@0.50 (%) mAP@0.50:0.95 (%)
YOLOv4 70.8 39.5 33.9 17.8
YOLOv5s 16.0 95.2 32.8 17.4
YOLOv6s 44.0 56.0 31.7 21.7
YOLOv7-tiny 13.3 69.0 24.3 12.1
Cascade-RCNN 31.9 16.1
RetinaNet 56.8 28.7 11.9
Faster R-CNN 33.1 16.8
YOLOv8m 78.7 82.4 43.6 25.5
YOLOv8s 28.7 89.2 39.2 23.8
OLF-YOLO 28.4 78.4 45.1 27.8

Table 4: Comparison with advanced drone-specific models

Model mAP@0.50 (%) mAP@0.50:0.95 (%)
Drone-YOLO 42.8 25.6
LW-YOLOv8 43.3 25.5
TPH-YOLOv5 40.9 23.3
CRP-YOLO 36.8 20.7
DC-YOLOv8 41.5 23.9
OLF-YOLO 45.1 27.8

Our OLF-YOLO outperforms all compared methods in both metrics, including the larger YOLOv8m, while using significantly fewer FLOPs. This demonstrates that our integrated improvements are highly effective for drone technology target detection.

4.6 Generalization Experiments

To verify the generalization capability of our model, we also evaluate on PASCAL VOC 2012 and COCO datasets. The results are shown in Table 5.

Table 5: Generalization performance comparison

Dataset Model mAP@0.50 (%) mAP@0.50:0.95 (%)
PASCAL VOC2012 YOLOv8s 72.1 49.3
OLF-YOLO 74.6 51.7
COCO (val2017) YOLOv8s 44.9 27.3
OLF-YOLO 46.2 28.8

On both general-purpose datasets, OLF-YOLO consistently outperforms the baseline. This indicates that our improvements are not limited to drone technology but also benefit detection tasks with larger objects, demonstrating robust transferability.

5. Conclusion

In this work, we presented OLF-YOLO, a novel detection model specifically optimized for drone technology. By incorporating ODConv in the backbone, LSKA-based L-C2f in the neck, and the F-IoU loss function, we effectively enhanced multi-dimensional feature extraction, enlarged the receptive field for small targets, and improved learning of hard examples. Extensive experiments on VisDrone2019 confirm that OLF-YOLO achieves a significant 5.9% gain in mAP@0.50 and 4.0% gain in mAP@0.50:0.95 over the YOLOv8s baseline, while maintaining real-time inference speed. The model also surpasses state-of-the-art drone-specific detectors and shows good generalization on standard datasets. Our contributions advance the performance of deep-learning-based detection in challenging aerial scenarios, and we believe the proposed techniques will be valuable for future developments in drone technology. Future work will explore further model lightweighting and adaptation to edge devices for real-world drone deployment.

Scroll to Top