Research on Anti-Drone Target Recognition Technology Based on Improved YOLOv7

In recent years, the widespread use of unmanned aerial vehicles (UAVs), or drones, has raised significant security concerns for both national and societal safety. Drones are increasingly employed in various applications, including photography, infrastructure inspection, law enforcement, and military operations. However, their potential for misuse, such as in attacks on critical infrastructure or unauthorized surveillance, highlights the urgent need for effective anti-drone systems. Traditional anti-drone technologies often face legislative bottlenecks in civil deployment and lack mechanisms for simultaneously detecting and recognizing multiple drone targets. To address these challenges, I propose an improved YOLOv7-based target recognition technology for anti-drone applications. This approach leverages deep learning to enhance the detection of drones in complex environments, particularly focusing on small targets at high altitudes. By incorporating feature reuse, attention mechanisms, and expansive convolution with residual theory, the improved model aims to boost accuracy and robustness in anti-drone scenarios.

The proliferation of drones has made anti-drone systems a critical area of research. Current methods often rely on radar, optical, or radio frequency techniques, but these can be limited in civil settings due to cost, legislation, or effectiveness against multiple small targets. Deep learning-based object detection offers a promising alternative, as it can learn visual patterns from large datasets and adapt to diverse scenarios. Among state-of-the-art detectors, YOLOv7 stands out for its balance of speed and accuracy. In this paper, I explore the use of YOLOv7 for anti-drone target recognition and introduce modifications to overcome its limitations, such as limited feature reuse and poor performance on small objects. My contributions include a novel feature reuse module based on concatenation, an ELAN module enhanced with attention mechanisms, and a detection head incorporating expansive convolution and residual theory. These improvements are designed to enhance the model’s ability to detect drones in wide-area, complex environments, making it more suitable for real-world anti-drone applications.

YOLOv7 is a cutting-edge object detection algorithm that builds upon the YOLO (You Only Look Once) series. It consists of three main parts: the input layer, backbone for feature extraction, and head for prediction. The backbone includes convolutional layers, ELAN (Efficient Layer Aggregation Network) modules, and MP (Max Pooling) layers, which gradually reduce spatial resolution to capture multi-scale features. The head combines feature maps from different layers to predict bounding boxes and class probabilities. Key components like SPPCSPC (Spatial Pyramid Pooling with Cross-Stage Partial Connections) help handle varying object sizes and improve gradient flow. However, for anti-drone tasks, where drones can appear as small, distant objects, the standard YOLOv7 may suffer from information loss and limited feature reuse. Thus, I propose enhancements tailored to anti-drone needs.

To improve YOLOv7 for anti-drone target recognition, I introduce three modules. First, the Feature Reuse Based on Concatenation module addresses the backbone’s limited receptive field and feature reuse. In deep networks, sequential processing can lead to information loss due to pooling operations, limited receptive fields, or nonlinear activations. By using concatenation operations, I allow features from earlier layers to be reused in later layers, enhancing the network’s ability to capture spatial relationships and fine details. The concatenation operation is defined as:

$$ \text{Concat}(x_1, x_2) = [x_1; x_2] \in \mathbb{R}^{h_1 \times w_1 \times (c_1 + c_2)} $$

where \( x_1 \) and \( x_2 \) are feature maps from different layers, and \([x_1; x_2]\) denotes stacking along the depth dimension. This helps in detecting drones at different scales and resolutions, which is crucial for anti-drone systems where targets may vary in size due to distance.

Second, the ELAN of Attention Mechanism module enhances feature fusion by incorporating attention mechanisms. ELAN aggregates features from multiple scales, but in noisy environments common in anti-drone scenarios, irrelevant information can degrade performance. By adding a feature re-calibration layer with a gating mechanism, the module learns to weight features based on their importance, suppressing noise and emphasizing discriminative patterns. The attention weights are computed as:

$$ \alpha_{i,j} = \frac{\exp(e_{i,j})}{\sum_{k=1}^{N} \exp(e_{i,k})} $$

where \( e_{i,j} = f_{\text{att}}(x_i, x_j) \) is the output of an attention function. This allows the model to focus on critical features for drone detection, improving accuracy in cluttered scenes.

Third, the HEAD of Expansive Convolution and Residual Theory module tackles the issue of small target detection. Drones often appear as small objects in images, leading to missed detections. Expansive convolution, also known as dilated convolution, increases the receptive field without adding parameters, helping to capture larger context. The operation is defined as:

$$ y_{i,j,k} = \sum_{p,q} w_{p,q,k} x_{i + p \times d, j + q \times d} $$

where \( d \) is the dilation rate. Combined with residual connections, which mitigate vanishing gradients and allow learning of both high- and low-level features, this module enhances the detection head’s capability. Residual connections are expressed as:

$$ y = F(x, W) + x $$

where \( F(x, W) \) is the mapping function of a residual block. By integrating these elements, the model becomes more robust to small drones, a key requirement for effective anti-drone systems.

To evaluate the improved YOLOv7 model, I conducted experiments on a diverse drone dataset. The dataset includes 20,924 images from six drone models (e.g., Anafi-Extended, DJI FPV) captured in various scenarios (cloudy, sunny, evening) at heights ranging from 30 to 100 meters. For training, I randomly selected 3,488 frames and split them into an 80% training set and a 20% validation set. Data augmentation techniques like Mosaic were applied to increase diversity. The training parameters were set consistently across models: 130 epochs, batch size of 20, initial learning rate of 0.001 with cosine decay, Adam optimizer (momentum 0.937), and loss functions including CIoU for regression and BCE for confidence and classification. The confidence threshold was 0.25, and IoU threshold for NMS was 0.45.

The performance was measured using precision (P), recall (R), and mean average precision at IoU 0.5 (mAP@0.5). I compared the original YOLOv7 with the improved version, as well as other models like Faster-RCNN, SSD, and YOLOv5, to demonstrate the effectiveness of the anti-drone enhancements. The results are summarized in the following tables.

Model Precision (P) Recall (R) mAP@0.5
Original YOLOv7 90.9% 80.6% 82.5%
Original + Feature Reuse 90.0% 75.5% 83.1%
Original + Attention ELAN 89.2% 71.9% 84.1%
Original + Expansive Head 87.6% 76.0% 85.3%

This ablation study shows that each improvement contributes to higher mAP@0.5, with the full improved model achieving 85.3%, a 2.8% increase over the original. While precision and recall may slightly decrease due to better handling of challenging cases like small targets, the overall accuracy improves, which is vital for anti-drone applications where missing a drone can have severe consequences.

Model Precision (P) Recall (R) mAP@0.5
Faster-RCNN 78.4% 82.4% 78.0%
SSD 74.3% 62.2% 65.6%
YOLOv5 80.2% 79.2% 79.2%
YOLOv7 90.9% 80.6% 82.5%
Improved YOLOv7 (Ours) 87.6% 76.0% 85.3%

The comparison reveals that the improved YOLOv7 outperforms other models in mAP@0.5, making it a strong candidate for anti-drone systems. Faster-RCNN, a two-stage detector, has good localization but is slower, while SSD and YOLOv5 are faster but less accurate on small objects. YOLOv7 offers a balance, and my enhancements further boost its performance for drone detection. The improved model reduces missed detections of small drones, as shown in visual results where it successfully identifies drones that the original model missed. This capability is crucial for deploying anti-drone technology in civil environments, where legislative and operational constraints demand high reliability.

In conclusion, I have developed an improved YOLOv7-based target recognition technology for anti-drone applications. By incorporating feature reuse via concatenation, attention mechanisms in ELAN, and expansive convolution with residual theory in the detection head, the model achieves higher accuracy and better handling of small targets. Experimental results on a diverse drone dataset demonstrate a 2.8% increase in mAP@0.5 compared to the original YOLOv7, along with improved robustness in complex scenes. This work addresses the limitations of traditional anti-drone systems, such as legislative hurdles and lack of multi-target detection, by providing a deep learning solution that can be deployed in various settings. Future research could explore real-time implementation on edge devices or integration with other sensors for comprehensive anti-drone defense. The advancements presented here contribute to the growing field of anti-drone technology, enhancing safety and security in an era of increasing drone usage.

The mathematical formulations and architectural innovations detailed in this paper underscore the importance of tailored deep learning approaches for anti-drone tasks. For instance, the feature reuse module leverages concatenation to preserve information across layers, which can be expressed in a generalized form for multiple layers:

$$ \text{Concat}(x_1, x_2, \dots, x_n) = [x_1; x_2; \dots; x_n] \in \mathbb{R}^{h \times w \times \sum_{i=1}^n c_i} $$

Similarly, the attention mechanism enhances feature fusion by dynamically weighting contributions, a process that can be modeled as:

$$ \mathbf{y} = \sum_{i=1}^N \alpha_i \cdot \mathbf{x}_i $$

where \( \alpha_i \) are the attention weights. In anti-drone contexts, these weights help filter out background noise, such as clouds or birds, focusing on drone-specific features like propellers or shapes.

Expansive convolution extends the receptive field, which is particularly useful for detecting distant drones. The dilation rate \( d \) controls the spacing between kernel elements, and its effect on output size can be described as:

$$ O = \left\lfloor \frac{I + 2p – d \times (k – 1) – 1}{s} + 1 \right\rfloor $$

where \( I \) is input size, \( p \) is padding, \( k \) is kernel size, and \( s \) is stride. By varying \( d \), the model can capture multi-scale context without increasing computational cost, a key advantage for real-time anti-drone systems.

Residual connections, integral to the detection head, facilitate training deep networks by alleviating vanishing gradients. The residual block can be expanded as:

$$ y = \sigma(W_2 \cdot \sigma(W_1 \cdot x + b_1) + b_2) + x $$

where \( \sigma \) is an activation function, and \( W_1, W_2, b_1, b_2 \) are learnable parameters. This allows the network to retain low-level features critical for small object detection, ensuring that drones are not overlooked.

To further validate the anti-drone capabilities, I analyzed the model’s performance across different drone types and environmental conditions. The dataset included varied scenarios, and the improved model consistently achieved high detection rates, as shown in the following breakdown:

Drone Model Precision Recall mAP@0.5
Anafi-Extended 88.5% 77.2% 84.8%
DJI FPV 86.9% 75.8% 83.5%
DJI Phantom 89.1% 76.5% 85.0%
EFT-E410S 87.3% 74.9% 84.2%
Mavic2-Air 88.0% 76.3% 84.7%
Mavic2-Enterprise 86.5% 75.1% 83.9%

This table indicates that the model performs well across all drone models, with mAP@0.5 above 83.5%, demonstrating its versatility for anti-drone applications. The slight variations may be due to differences in drone size or shape, but the overall high accuracy confirms the effectiveness of the improvements.

In terms of computational efficiency, the improved YOLOv7 maintains a balance suitable for real-time anti-drone systems. The original YOLOv7 processes images at high speeds, and my modifications add minimal overhead. For instance, the feature reuse module primarily involves concatenation operations, which are computationally inexpensive. The attention mechanism adds small fully connected layers, and expansive convolution reduces parameter count compared to standard convolution. Overall, the model can run on GPUs with moderate resources, making it deployable in field settings for anti-drone surveillance.

The anti-drone focus of this research is emphasized throughout the design choices. For example, the dataset includes drones at various altitudes and distances, simulating real-world anti-drone scenarios where targets may be small or obscured. The training incorporates data augmentation to mimic challenging conditions like weather changes, ensuring robustness. By prioritizing small object detection, the model addresses a common weakness in existing anti-drone technologies, which often struggle with distant or miniaturized drones.

Looking ahead, there are several directions for extending this work. One possibility is to integrate the improved YOLOv7 with tracking algorithms for continuous anti-drone monitoring. Another is to explore federated learning for privacy-preserving anti-drone systems in sensitive areas. Additionally, hardware acceleration could be investigated for edge deployment, enabling low-latency responses in critical anti-drone operations. The modular nature of the improvements allows for easy adaptation to other object detection tasks, but the primary goal remains enhancing anti-drone capabilities.

In summary, this paper presents a comprehensive approach to anti-drone target recognition using an improved YOLOv7 model. The technical innovations—feature reuse, attention mechanisms, and expansive convolution with residual theory—collectively boost performance on drone detection, especially for small targets. The experimental results validate the model’s superiority over existing methods, with a significant increase in mAP@0.5. As drone threats continue to evolve, such advanced deep learning solutions will play a vital role in safeguarding airspace and infrastructure. My work contributes to this effort by providing a reliable, accurate, and efficient anti-drone system that can be adapted to various environments and requirements.

Scroll to Top