The proliferation of Unmanned Aerial Vehicles (UAVs) across civilian and commercial domains has introduced significant public safety risks due to unauthorized or “rogue” flights. Effectively detecting these intrusive drones, especially when they appear as small targets against complex, cluttered backgrounds, presents a major technical challenge for surveillance systems. Traditional detection methods, such as radar, acoustic sensing, or radio frequency scanning, often struggle with real-time, reliable identification. While deep learning-based computer vision approaches offer promising multi-scale feature extraction capabilities, the detection performance suffers drastically when targets are small, resolution is low, and backgrounds are highly complex, leading to unacceptable rates of false positives and missed detections.

To tackle this critical anti-drone challenge, we propose an enhanced target detection algorithm built upon the YOLOv5s architecture. Our methodology incorporates three synergistic improvements designed specifically to boost performance in low-resolution, small-target scenarios. The core advancements include: the integration of a Slim-Neck paradigm with deep over-parameterized convolution for efficient and powerful feature extraction; the adoption of SPD-Conv modules within the backbone and neck networks to preserve fine-grained spatial information often lost in standard down-sampling operations; and the replacement of the CIoU loss function with the more robust Alpha-CIoU to improve bounding box regression, particularly for small objects. Comprehensive experiments on a dedicated anti-drone dataset and a public benchmark validate the effectiveness of our approach, demonstrating superior detection accuracy compared to baseline and other classic models while maintaining practical inference speeds suitable for real-time anti-drone applications.
Methodology: Architectural Enhancements for Anti-Drone Detection
Our algorithm is engineered to address the specific pain points of visual anti-drone systems: tiny targets, motion blur, low resolution, and background interference. We modify the YOLOv5s framework at three key points: the neck structure, the convolutional building blocks, and the optimization objective.
1. Slim-Neck with Deep Over-Parameterized Convolution (DO-Conv)
A primary goal in anti-drone system design is balancing high accuracy with real-time processing capability. The neck network in object detectors is responsible for multi-scale feature fusion, which is crucial for detecting objects of varying sizes. To optimize this component, we replace the standard neck in YOLOv5s with the Slim-Neck paradigm, which itself is constructed using GSConv (Ghost Shuffle Convolution) and VoV-GSCSP modules. This design significantly reduces computational complexity and model parameters while maintaining rich feature representation capabilities.
The GSConv module is central to this efficiency. It splits a standard convolution operation into two parallel paths. Let an input feature map have dimensions $W \times H \times C_1$. The first path applies a standard convolution with a kernel size of $U_1 \times U_2$ to produce an intermediate feature map with $C_2/2$ channels. The second path applies a depthwise convolution (DWConv) to the same input, followed by a channel shuffle operation. The outputs are then concatenated. This process preserves hidden connections between channels with lower computational cost compared to a full convolution. The approximate time complexity of GSConv can be expressed as:
$$
T_{GSConv} = O\left[W \cdot H \cdot U_1 \cdot U_2 \cdot \frac{C_2}{2}(C_1 + 1)\right]
$$
To further enhance the feature extraction power within this efficient paradigm, we replace some standard convolutions with Deep Over-parameterized Convolution (DO-Conv) modules. Unlike regular convolution, DO-Conv applies an over-parameterized depthwise kernel $D$ before a pointwise kernel $W$. For an input feature $P$, the operation is defined as $O = W * (D \odot P)$, where $\odot$ denotes depthwise convolution and $*$ denotes pointwise convolution. This structure introduces more learnable parameters without proportionally increasing inference time, allowing the model to learn more discriminative features for challenging anti-drone targets.
2. SPD-Conv Module for Small Drone Preservation
Standard CNN building blocks like strided convolutions or pooling layers are detrimental to small object detection, as they irretrievably discard fine-grained spatial information. For a distant or fast-moving drone that may occupy only a few pixels, this information loss is catastrophic. To mitigate this, we integrate the Space-to-Depth (SPD) Conv module into both the backbone and neck networks of our detector, replacing standard down-sampling layers.
The SPD component works by transforming spatial information into depth (channel) information. Given an intermediate feature map $V$ of size $X \times X \times C_1$ and a scale factor $l$, the SPD operation partitions the feature map into $l^2$ sub-feature maps. Each sub-map $f_{(i,j)}$ is obtained by down-sampling with a step of $l$ starting from offset $(i,j)$:
$$
\begin{aligned}
f_{(0,0)} &= V[0:X:l, 0:X:l] \\
f_{(1,0)} &= V[1:X:l, 0:X:l] \\
&\vdots \\
f_{(l-1, l-1)} &= V[l-1:X:l, l-1:X:l]
\end{aligned}
$$
These $l^2$ sub-feature maps are then concatenated along the channel dimension. The resulting feature map $V’$ has spatial dimensions reduced by a factor of $l$ ($\frac{X}{l} \times \frac{X}{l}$) but channel dimensions increased by a factor of $l^2$ ($C_1 \times l^2$). This process preserves all raw information from the original feature map. Finally, a non-strided convolution layer is applied to $V’$ to facilitate learning and reduce channel dimensions to a desired number $C_2$. This module ensures that crucial details of small drones are retained throughout the network’s forward pass, directly enhancing anti-drone detection performance in low-resolution scenarios.
3. Alpha-CIoU Loss for Robust Bounding Box Regression
Accurate localization of small, often partially occluded drones is a non-trivial task. The original YOLOv5s uses CIoU (Complete Intersection over Union) Loss, which considers the overlap area, center-point distance, and aspect ratio difference between the predicted box ($B$) and the ground-truth box ($B^{gt}$). However, for very small targets, the gradient can be unstable, and the aspect ratio term may not be optimal.
We employ Alpha-CIoU Loss, which introduces a power transformation regulated by a parameter $\alpha$ to provide more flexible and effective optimization. It is defined as:
$$
\mathcal{L}_{\alpha-CIoU} = 1 – R^{\alpha}_{IoU} + \frac{\rho^{2\alpha}(b, b^{gt}) + (\beta \nu)^{\alpha}}{c^{2\alpha}}
$$
Where $R_{IoU}$ is the IoU value, $\rho(b, b^{gt})$ is the Euclidean distance between the center points, and $c$ is the diagonal length of the smallest enclosing box covering both $B$ and $B^{gt}$. The terms $\beta$ and $\nu$ control the weight and definition of the aspect ratio component, respectively:
$$
\beta = \frac{\nu}{(1 – R_{IoU}) + \nu}, \quad \nu = \frac{4}{\pi^2}\left(\arctan\frac{w^{gt}}{h^{gt}} – \arctan\frac{w}{h}\right)^2
$$
By tuning $\alpha$, the loss function can emphasize different geometric factors. For small object detection in anti-drone tasks, an $\alpha > 1$ can increase the penalty for poor localization, leading to faster convergence and more precise bounding boxes for tiny drone targets, thereby improving the overall robustness of the model.
Experimental Setup and Dataset
To rigorously evaluate our proposed anti-drone detection algorithm, we constructed a comprehensive dataset and established a robust experimental protocol.
Dataset: Anti-UAV
Our primary evaluation dataset, named Anti-UAV, is a composite collection designed to reflect real-world challenges. It consists of 7,732 images, formed by merging:
- Our-Anti-UAV: 1,732 images created through a sophisticated pipeline. We first extracted drone patches from videos of unauthorized flights. A Generative Adversarial Network (GAN) was then trained to synthesize diverse drone appearances. Finally, these generated drones were seamlessly embedded into various complex background scenes (urban, sky with clouds, wooded areas) using Poisson blending to create realistic composite images.
- DUT-Anti-UAV: 6,000 publicly available images specifically curated for anti-drone research.
The dataset was annotated with bounding boxes and randomly split into a training set (70%) and a validation set (30%).
Following the MS COCO criteria, we define small targets as those with an area less than $32 \times 32$ pixels, medium targets between $32 \times 32$ and $96 \times 96$ pixels, and large targets greater than $96 \times 96$ pixels. Furthermore, we define low-resolution images as those with dimensions below $720 \times 640$ pixels. The distribution of our dataset is summarized below:
| Category | Percentage in Dataset |
|---|---|
| Small Targets in Low-Res Images | 42% |
| Medium Targets in Low-Res Images | 28% |
| Large Targets in Low-Res Images | 10% |
| Targets in High-Res Images | 20% |
This distribution confirms that our dataset is heavily biased towards the most challenging scenario for anti-drone systems: small drones in low-resolution imagery, ensuring that our evaluation is rigorous and practical.
Evaluation Metrics and Implementation Details
We employ standard object detection metrics to assess performance:
- Precision (P) and Recall (R): Measure detection accuracy and completeness.
- Average Precision (AP): The area under the Precision-Recall curve for a specific class.
- mean Average Precision (mAP): The average of AP across all classes. We report mAP@0.5 (IoU threshold=0.5) and mAP@0.5:0.95 (average mAP over IoU thresholds from 0.5 to 0.95 in steps of 0.05).
- Frames Per Second (FPS): Measures inference speed on the test hardware.
All models were trained and evaluated on a system with an NVIDIA GeForce RTX 2080 Ti GPU, using the PyTorch framework. The input image size was set to $640 \times 640$ pixels. Models were trained for 300 epochs with standard data augmentation techniques (mosaic, mixup, random affine transformations).
Results and Analysis
Ablation Study: Contribution of Each Component
We conducted an ablation study on the Anti-UAV dataset to isolate the contribution of each proposed improvement. The baseline model (O) is the standard YOLOv5s. The modifications are: I (SPD-Conv), II (Alpha-CIoU Loss), III (Slim-Neck with DO-Conv).
| Model | I | II | III | P (%) | R (%) | mAP@0.5 (%) | mAP@0.5:0.95 (%) | FPS |
|---|---|---|---|---|---|---|---|---|
| O (Baseline) | × | × | × | 97.1 | 87.4 | 91.2 | 58.1 | 50.0 |
| A | ✓ | × | × | 97.5 | 87.2 | 92.3 | 59.1 | 38.6 |
| B | × | ✓ | × | 97.1 | 88.9 | 92.7 | 59.0 | 49.2 |
| C | × | × | ✓ | 97.1 | 88.0 | 92.1 | 58.5 | 37.1 |
| D | ✓ | ✓ | × | 95.7 | 87.5 | 91.4 | 58.8 | 48.3 |
| E | ✓ | × | ✓ | 96.5 | 88.2 | 92.4 | 59.1 | 38.6 |
| F | × | ✓ | ✓ | 96.5 | 87.2 | 91.5 | 58.5 | 49.4 |
| G (Our Full Model) | ✓ | ✓ | ✓ | 95.3 | 88.5 | 92.3 | 59.0 | 33.4 |
Analysis: Each individual component (A, B, C) provides a clear boost in mAP@0.5 over the baseline, proving their individual efficacy for the anti-drone task. Model B (Alpha-CIoU) achieves the highest single-module mAP of 92.7%. The full combination (Model G) maintains a high mAP of 92.3% while integrating all robustness-enhancing features. The slight drop in FPS from the baseline is an expected trade-off for the significantly improved feature extraction and preservation mechanisms, yet the final speed of 33.4 FPS remains well within the realm of real-time processing for practical anti-drone systems.
Comparison with State-of-the-Art Detectors
We compared our full model (YOLOv5s-AntiUAV) against the original YOLOv5s and other classic object detection architectures on the Anti-UAV dataset.
| Algorithm | Parameters | FPS | mAP@0.5 (%) |
|---|---|---|---|
| SSD | 23.75M | 24.9 | 80.2 |
| Faster R-CNN | 41.12M | 13.0 | 87.4 |
| YOLOv5s (Baseline) | 6.7M | 50.0 | 91.2 |
| YOLOv5s-AntiUAV (Ours) | 8.56M | 33.4 | 92.3 |
Analysis: Our model outperforms all others in detection accuracy (mAP@0.5) on the challenging anti-drone dataset. It surpasses the baseline YOLOv5s by 1.1 percentage points, demonstrating the effectiveness of our targeted modifications. More significantly, it achieves substantial margins over SSD (12.1 points) and Faster R-CNN (4.9 points). While our model has more parameters than the baseline YOLOv5s due to the enhanced modules, it remains far more lightweight than the two-stage Faster R-CNN. The inference speed of 33.4 FPS confirms its suitability for real-time video analysis in anti-drone surveillance.
Loss Function Analysis
To specifically validate the choice of Alpha-CIoU, we trained our model architecture (with components I and III) using different popular bounding box regression losses. Results are shown below.
| Loss Function | P (%) | R (%) | mAP@0.5 (%) | mAP@0.5:0.95 (%) |
|---|---|---|---|---|
| CIoU (Baseline) | 97.1 | 87.4 | 91.2 | 58.1 |
| SIoU | 95.8 | 87.8 | 91.1 | 58.2 |
| WIoU | 96.1 | 87.5 | 91.3 | 58.2 |
| Focal-EIoU | 96.9 | 85.9 | 91.1 | 58.0 |
| Alpha-CIoU (Ours) | 97.1 | 88.9 | 92.7 | 59.0 |
Analysis: The Alpha-CIoU loss consistently delivers the best performance across all key metrics, especially recall and mAP. This indicates its superior ability to guide the model towards accurate localization of small, often difficult-to-detect drones, making it the optimal choice for loss function in this anti-drone context.
Generalization Test: Transfer Learning on VisDrone2019
To evaluate the generalization capability and robustness of our improvements beyond the specific Anti-UAV dataset, we conducted a transfer learning experiment on the large-scale public VisDrone2019 dataset, which contains various object categories in aerial imagery.
| Algorithm | Pedestrian | People | Bicycle | Car | Van | Truck | Tricycle | Awning-Tricycle | Bus | Motor | mAP@0.5 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| YOLOv5s | 40.2 | 32.5 | 12.4 | 74.5 | 37.4 | 32.2 | 21.4 | 11.5 | 47.9 | 38.7 | 34.9 |
| YOLOv5s-AntiUAV | 45.6 | 35.9 | 16.5 | 79.5 | 43.3 | 38.1 | 23.4 | 14.0 | 53.8 | 43.7 | 39.4 |
Analysis: Our model demonstrates strong generalization. It outperforms the baseline YOLOv5s by a significant margin of 4.5 percentage points in overall mAP@0.5 on the VisDrone2019 dataset. Crucially, it shows improvement in every single object category, including small objects like pedestrians and bicycles. This universal enhancement validates that our architectural modifications—the feature-preserving SPD-Conv, the efficient yet powerful Slim-Neck, and the robust Alpha-CIoU loss—fundamentally improve a detector’s ability to handle small and general objects in complex aerial scenes, proving its value not just as a specialized anti-drone tool but as a robust aerial object detector.
Conclusion
This work presented a high-performance target detection algorithm designed to address the critical and growing need for reliable anti-drone surveillance systems. By systematically enhancing the YOLOv5s architecture, we tackled the core challenges of small drone detection: information loss during down-sampling, inefficient multi-scale fusion, and suboptimal bounding box regression for tiny targets. The integration of the SPD-Conv module ensures spatial details of distant drones are preserved. The Slim-Neck paradigm with DO-Conv enables powerful yet efficient feature fusion. The Alpha-CIoU loss provides more precise and stable training guidance for small object localization.
Extensive experimental results on our composite Anti-UAV dataset demonstrate that our model achieves state-of-the-art accuracy, with a mAP@0.5 of 92.3%, while maintaining real-time inference speed. Furthermore, its superior performance on the diverse VisDrone2019 dataset confirms strong generalization capability and robustness. The proposed algorithm provides an effective and practical vision-based solution for the detection of intrusive UAVs, contributing to enhanced public safety and security infrastructure. Future work may explore the integration of temporal information from video sequences to further improve tracking and discrimination capabilities in dynamic anti-drone scenarios.
