基于改进Yolov12的航拍小目标检测算法
Aerial Small Object Detection via Improved YOLOv12
摘要: 无人机航拍目标检测常受限于微小目标尺度与复杂背景干扰。机载边缘设备显存与算力严苛,难以兼顾精度与实时性;且半精度部署时极易因数值溢出导致网络崩溃。为此,本文提出一种基于YOLOv12的改进DGA-YOLO模型。首先,设计注意力特征融合模块,引入安全极小值与截断机制,解决FP16推理的数值稳定性问题,保障微小目标高频特征的平滑提取。其次,提出动态引导拼接模块,利用极速空间注意力与无重排零初始化残差,以极低内存访问开销实现多尺度特征高效融合。最后,引入无梯度抑制的MPDIoU损失函数,通过角点距离惩罚克服梯度消失,零推理开销下显著提升小目标边界框回归精度。实验表明,DGA-YOLO在保持极低参数量与计算量的同时,难点小目标bicycle、motorcycle精度分别提升2.6%、2.0%。在仅4 GB显存的入门级移动端设备上,模型半精度推理达46 FPS且精度无明显损耗,充分验证了其作为实时检测方案的可行性。
Abstract: Aerial drone-based object detection is often constrained by the small scale of targets and complex background interference. Onboard edge devices have strict limitations in memory and computational power, making it difficult to balance accuracy and real-time performance; furthermore, deploying models in half-precision (FP16) frequently leads to network failure due to numerical overflow. To address these challenges, this paper proposes an improved DGA-YOLO model based on YOLOv12. First, we design an attention-based feature fusion module incorporating a safe minimum value and truncation mechanism to resolve numerical instability issues during FP16 inference, ensuring smooth extraction of high-frequency features for tiny objects. Second, we introduce a dynamic guided concatenation module that leverages fast spatial attention and zero-initialized residual blocks without reordering, enabling efficient multi-scale feature fusion with minimal memory access overhead. Finally, we propose a gradient-free suppression MPDIoU loss function, which mitigates gradient vanishing through corner distance penalties, significantly improving bounding box regression accuracy for small objects at zero inference cost. Experiments show that DGA-YOLO achieves improvements of 2.6% and 2.0% in precision for challenging small targets—bicycles and motorcycles—while maintaining extremely low parameter and computational complexity. On entry-level mobile devices with only 4 GB GPU memory, the model reaches 46 FPS in FP16 inference with no significant loss in accuracy, fully demonstrating its feasibility as a real-time detection solution.
文章引用:秦喜喜, 董骏辉, 丁富强, 薛小维. 基于改进Yolov12的航拍小目标检测算法[J]. 计算机科学与应用, 2026, 16(8): 220-230. https://doi.org/10.12677/csa.2026.168276

参考文献

[1] Wang, A., Chen, H., Liu, L., Chen, K., Lin, Z., Han, J., et al. (2024) YOLOv10: Real-Time End-to-End Object Detection. Advances in Neural Information Processing Systems 37, Vancouver, 10-15 December 2024, 107984-108011.
https://doi.org/10.52202/079017-3429
[2] Wang, C., Yeh, I. and Mark Liao, H. (2024) YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. In: Leonardis, A., et al., Eds., Computer VisionECCV 2024, Springer Nature Switzerland, 1-21.
https://doi.org/10.1007/978-3-031-72751-1_1
[3] Wu, X., Li, W., Hong, D., Tao, R. and Du, Q. (2022) Deep Learning for Unmanned Aerial Vehicle-Based Object Detection and Tracking: A Survey. IEEE Geoscience and Remote Sensing Magazine, 10, 91-124.
https://doi.org/10.1109/mgrs.2021.3115137
[4] Akyon, F.C., Onur Altinuc, S. and Temizel, A. (2022) Slicing Aided Hyper Inference and Fine-Tuning for Small Object Detection. 2022 IEEE International Conference on Image Processing (ICIP), Bordeaux, 16-19 October 2022, 966-970.
https://doi.org/10.1109/icip46576.2022.9897990
[5] Lyu, Y., Zhang, T., Li, X., Liu, A. and Shi, G. (2024) LightUAV-YOLO: A Lightweight Object Detection Model for Unmanned Aerial Vehicle Image. The Journal of Supercomputing, 81, Article No. 105.
https://doi.org/10.1007/s11227-024-06611-x
[6] Zhu, X., Lyu, S., Wang, X. and Zhao, Q. (2021) TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured Scenarios. 2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), Montreal, 11-17 October 2021, 2778-2788.
https://doi.org/10.1109/iccvw54120.2021.00312
[7] Wang, C., He, W., Nie, Y., Guo, J., Liu, C., Wang, Y., et al. (2023) Gold-YOLO: Efficient Object Detector via Gather-And-Distribute Mechanism. Advances in Neural Information Processing Systems 36, New Orleans, 10-16 December 2023, 51094-51112.
https://doi.org/10.52202/075280-2224
[8] Liu, S., Zha, J., Sun, J., et al. (2023) EdgeYOLO: An Edge-Real-Time Object Detector. arXiv:2302.07483.
https://doi.org/10.48550/arXiv.2302.07483
[9] Zhao, Y., Lv, W., Xu, S., et al. (2024) DETRs Beat YOLOs on Real-Time Object Detection. arXiv:2304.08069.
https://doi.org/10.48550/arXiv.2304.08069
[10] Liu, S., Huang, D. and Wang, Y. (2019) Learning Spatial Fusion for Single-Shot Object Detection. arXiv:1911.09516.
https://doi.org/10.48550/arXiv.1911.09516
[11] Chen, Y., Dai, X., Liu, M., Chen, D., Yuan, L. and Liu, Z. (2020) Dynamic Convolution: Attention over Convolution Kernels. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 13-19 June 2020, 11027-11036.
https://doi.org/10.1109/cvpr42600.2020.01104
[12] Ma, S. and Xu, Y. (2023) MPDIoU: A Loss for Efficient and Accurate Bounding Box Regression. arXiv:2307.07662.
https://doi.org/10.48550/arXiv.2307.07662