An Anti-UAV Target Detection Method for Embedded Edge Computing Devices

With the rapid advancement of industrial technology, unmanned aerial vehicles (UAVs) have become mainstream and are widely applied across various domains. In civilian sectors, they monitor crowd flow to enhance public transportation safety; in disaster surveillance, they assess disaster sites and guide rescue operations; in military fields, they facilitate effective reconnaissance and strikes against enemy drones. However, the misuse of UAV technology poses significant security risks to critical infrastructure and flight safety, particularly in sensitive areas like military zones, where illegal or unintentional UAV intrusions severely compromise national information security. Consequently, anti-UAV detection and tracking are crucial. Traditional detection and warning technologies, often based on radar, radio frequency (RF), and acoustic sensors, suffer from high costs, susceptibility to noise interference, and limited reliability.

In recent years, deep learning has advanced rapidly, and computer vision-based UAV detection and monitoring have proven to be a viable solution. These methods offer efficient detection speed, high accuracy, and significantly lower costs compared to traditional approaches. Deploying anti-UAV detection on edge computing devices is essential, as it enables real-time, efficient identification and response to potential UAV threats, reduces data transmission delays, protects critical areas from illegal intrusion or surveillance, and ensures security and privacy. Many researchers have improved upon classical detection frameworks such as RCNN and YOLO, achieving excellent results. However, UAV detection on edge devices still faces several challenges: complex backgrounds where UAVs blend into the environment, small and fast-moving targets that are difficult to locate, motion blur, and the need to balance detection accuracy with speed for real-time processing on resource-constrained devices.

To address these issues, this paper proposes an anti-UAV target detection method based on YOLOv8, tailored for embedded edge computing devices. Given the constraints of limited computational power and storage space on edge devices, we introduce a lightweight dynamic upsampler called DySample to enhance feature fusion by promoting inter-channel information interaction and global context reorganization. Additionally, we apply a three-dimensional attention mechanism, SimAM, which adaptively adjusts feature weights at each spatial position to focus on target regions, thereby improving the accuracy and robustness of anti-UAV detection. Experimental results on the Det-Fly and TIBNet datasets demonstrate that our method achieves improvements of 4.5% and 3.17%, respectively, in mean Average Precision (mAP). When deployed on an edge computing board, it shows enhancements of 4.04% and 4.34%, significantly boosting detection efficiency and meeting the practical needs of real-time anti-UAV detection.

Introduction

The proliferation of UAV technology has led to its widespread adoption in numerous fields, but it also introduces security vulnerabilities that necessitate robust anti-UAV measures. Traditional detection systems, while effective in some scenarios, are often costly, prone to environmental interference, and lack the adaptability required for dynamic environments. In contrast, deep learning-based computer vision approaches provide a cost-effective, accurate, and scalable alternative. The integration of these methods into edge computing devices is particularly promising, as it allows for localized processing, reducing latency and enhancing responsiveness in anti-UAV applications.

However, implementing anti-UAV detection on edge devices presents unique challenges. UAVs often appear as small objects in images, moving rapidly against complex backgrounds, which can lead to missed detections or false alarms. Additionally, edge devices have limited computational resources, necessitating models that balance high accuracy with low computational overhead. Previous studies have explored various enhancements to detection frameworks, such as feature partitioning, differential convolution, and spatial pyramid pooling, but gaps remain in achieving optimal performance on edge platforms. This paper aims to bridge these gaps by refining the YOLOv8 architecture with lightweight components tailored for anti-UAV tasks.

The core contributions of this work include: (1) the integration of DySample, a dynamic upsampler that improves feature representation without significant computational cost; (2) the incorporation of SimAM, a parameter-free 3D attention mechanism that enhances focus on relevant regions; and (3) extensive validation on benchmark datasets and real-world edge hardware, demonstrating superior performance in anti-UAV detection. By addressing the trade-offs between accuracy and speed, our method offers a practical solution for deploying anti-UAV systems in resource-constrained environments.

Proposed Anti-UAV Target Detection Method

Our proposed method, termed DS-YOLOv8, builds upon the YOLOv8 framework with modifications primarily in the neck section to enhance feature fusion and attention mechanisms. The overall architecture is illustrated below, where we replace the standard linear upsampling layer with DySample and incorporate SimAM during downsampling for better semantic feature extraction.

The YOLOv8 model consists of a backbone for feature extraction, a neck for feature aggregation, and a head for detection. In our design, the neck is augmented with DySample to upsample feature maps more effectively, while SimAM is embedded in the convolutional layers to emphasize critical spatial and channel information. This combination allows the model to better handle small UAV targets and complex backgrounds, key challenges in anti-UAV scenarios.

DySample-Based Upsampling Module

DySample is an ultra-lightweight and efficient dynamic upsampler that employs point sampling to resize feature maps. Unlike other dynamic upsamplers that rely on computationally expensive dynamic convolutions or auxiliary networks, DySample uses a simple linear layer to generate offsets, enabling fine-grained control over feature details. Given an input feature map $X$ with dimensions $C \times H_1 \times W_1$ and a scale factor $s$, a linear layer $L$ with output channels $2s^2$ produces offsets $O$ of size $2s^2 \times H \times W$. These offsets are then rearranged to eliminate grid artifacts, forming an intermediate layer of size $2 \times sH \times sW$. The sampling set $S$ is obtained by adding these offsets to a grid $G$ derived from the input feature map through pixel rearrangement. The process can be summarized as:

$$O = \text{Linear}(X)$$

$$S = G + O$$

The final upsampled feature map $X_1$ of size $C \times sH \times sW$ is generated via bilinear interpolation based on $S$:

$$X_1 = \text{grid\_sample}(X, S)$$

This approach ensures that each output pixel is influenced by the content of its corresponding input region, preserving local feature continuity and enhancing global context fusion. By promoting inter-channel information interaction, DySample improves the model’s ability to represent features, which is crucial for detecting small UAV targets in anti-UAV applications.

SimAM: A Parameter-Free 3D Attention Mechanism

Attention mechanisms are vital for focusing on relevant parts of an image, but traditional methods like channel or spatial attention may not suffice for anti-UAV tasks due to the need for combined spatial-channel weighting. SimAM addresses this by estimating 3D weights directly from neuron importance, without adding parameters. It computes attention weights by integrating spatial and channel information through global average pooling and 1D convolution, followed by a Sigmoid activation to generate final weights. The formulation is:

$$w = \sigma(\text{Conv1D}(\text{GAP}(X)))$$

where $\sigma$ denotes the Sigmoid function, GAP is global average pooling, and Conv1D performs channel interaction. These weights are then multiplied with the original features to reweight them, allowing the model to adaptively emphasize target regions. This parameter-free design minimizes computational overhead while boosting feature expressiveness, making it ideal for edge-based anti-UAV detection where efficiency is paramount.

Experimental Results and Analysis

To evaluate our anti-UAV detection method, we conducted experiments on two datasets: Det-Fly and TIBNet. Det-Fly contains aerial images captured by onboard cameras, with 79.86% of UAVs occupying less than 5% of the image area. TIBNet consists of ground-based images for air-to-ground UAV detection, where all targets are below 5% of the image size. These datasets represent challenging scenarios for small object detection, relevant to real-world anti-UAV operations.

Evaluation Metrics

We used mean Average Precision (mAP) to assess detection accuracy, which is standard in object detection tasks. For speed evaluation, we measured frames per second (FPS) on edge hardware, along with parameters (Params) and giga floating-point operations per second (GFLOPs) to gauge model complexity and computational demand.

Experimental Setup

Training was performed on a system with Ubuntu 18.04, two RTX 3060 GPUs, and an i7-11700k CPU. Models were trained for 100 epochs with a batch size of 16, saving results every 20 epochs. For edge deployment, we used an edge computing board with Ubuntu 18.04, an NVIDIA Maxwell GPU, and a quad-core ARM A57 CPU. Models were converted to ONNX format and then to TensorRT engines for efficient inference.

Attention Mechanism Selection Experiment

We compared SimAM with other attention mechanisms—SENet, CBAM, and Non-Local—integrated into YOLOv8. The results, shown in Table 1, indicate that SimAM achieves the highest mAP improvements on both datasets (2.32% on Det-Fly and 2.45% on TIBNet) without increasing parameters, while other methods add computational cost. This highlights SimAM’s effectiveness for anti-UAV detection on edge devices.

Model Det-fly mAP (%) Params FLOPs TIBNet mAP (%) Params GFLOPs
YOLOv8n 91.11 3.01M 8.1G 89.72 3.01M 8.1G
+SENet 91.76 3.27M 8.3G 89.93 3.27M 8.3G
+CBAM 91.45 3.34M 8.4G 89.97 3.34M 8.4G
+Non-Local 92.14 3.46M 8.6G 90.15 3.46M 8.6G
+SimAM 93.43 3.01M 8.2G 92.17 3.01M 8.2G

Comparison with State-of-the-Art Detection Networks

We benchmarked DS-YOLOv8 against leading detection models for anti-UAV tasks. As shown in Table 2, our method outperforms others in mAP on both datasets (95.61% on Det-Fly and 92.89% on TIBNet) while maintaining low parameters and FLOPs. Compared to the base YOLOv8n, it achieves improvements of 4.5% and 3.17%, demonstrating its superiority for real-time anti-UAV applications.

Model Det-fly mAP (%) Params FLOPs TIBNet mAP (%) Params GFLOPs
YOLOv8n 91.11 3.01M 8.1G 89.72 3.01M 8.1G
EdgeYOLO-Tiny 88.84 5.82M 27.2G 87.61 5.82M 27.2G
YOLOv9-Tiny 94.02 2.01M 7.7G 91.43 2.01M 7.7G
EDGS-YOLOv8 93.44 4.31M 9.9G 90.85 4.31M 9.9G
ADMNet 94.82 3.90M 9.1G 89.72 3.90M 9.1G
DS-YOLOv8 95.61 3.04M 8.4G 92.89 3.04M 8.4G

Upsampling Module Performance Comparison

We evaluated DySample against other upsamplers like CARAFE, A2U, SAPA-B, and FADE. Table 3 shows that DySample provides the best mAP gains (2.34% on Det-Fly and 1.32% on TIBNet) with minimal increases in parameters and FLOPs, making it suitable for edge-based anti-UAV systems where resource efficiency is critical.

Model Det-fly mAP (%) Params FLOPs TIBNet mAP (%) Params GFLOPs
YOLOv8n 91.11 3.01M 8.1G 89.72 3.01M 8.1G
+CARAFE 91.89 3.42M 9.8G 90.07 3.42M 9.8G
+A2U 90.46 3.11M 8.5G 89.45 3.11M 8.5G
+SAPA-B 92.70 3.14M 9.1G 90.17 3.14M 9.1G
+FADE 93.31 3.38M 10.8G 90.84 3.38M 10.8G
+DySample 93.45 3.02M 8.3G 91.04 3.02M 8.3G

Edge Device Testing

To validate practical utility, we deployed models on an edge computing board. As shown in Table 4, the base YOLOv8n achieves high accuracy but low FPS (8-9), insufficient for real-time anti-UAV detection. By reducing channels to one-quarter (YOLOv8n-1/4), FPS improves to 25-26, but mAP drops significantly. Our DS-YOLOv8-1/4 restores mAP by 4.04% on Det-Fly and 4.34% on TIBNet while maintaining high FPS, meeting real-time requirements for anti-UAV systems.

Model Dataset mAP (%) FPS Params GFLOPs
YOLOv8n Det-fly 91.11 8 3.01M 8.1G
YOLOv8n-1/4 Det-fly 82.69 25 0.36M 1.4G
DS-YOLOv8-1/4 Det-fly 86.73 25 0.37M 1.5G
YOLOv8n TIBNet 89.72 9 3.01M 8.1G
YOLOv8n-1/4 TIBNet 78.57 26 0.36M 1.4G
DS-YOLOv8-1/4 TIBNet 83.91 26 0.37M 1.5G

The visual detection results on the edge board demonstrate robust performance in identifying UAVs against varied backgrounds, confirming the effectiveness of our anti-UAV method in real-world scenarios.

Conclusion

In this paper, we presented DS-YOLOv8, an anti-UAV target detection network designed for embedded edge computing devices. To tackle challenges such as small targets, complex backgrounds, and resource constraints, we integrated DySample for enhanced feature fusion and SimAM for adaptive attention weighting. These lightweight modifications improve detection accuracy without compromising speed. Experimental results on benchmark datasets and edge hardware show significant advancements over state-of-the-art methods, with mAP improvements of up to 4.5% and real-time FPS on edge platforms. Our work provides a practical solution for deploying efficient anti-UAV systems in critical areas, contributing to enhanced security and surveillance capabilities. Future research could explore further optimizations for multi-UAV tracking and adversarial robustness in anti-UAV applications.

Scroll to Top