Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (9): 79-89.DOI: 10.3778/j.issn.1002-8331.2312-0291

• Special Issue on YOLOv8 Improvements and Applications • Previous Articles     Next Articles

Algorithm for Real-Time Vehicle Detection from UAVs Based on Optimizing and Improving YOLOv8

SHI Tao, CUI Jie, LI Song   

  1. 1.School of Electrical Engineering and Automation, Tianjin University of Technology, Tianjin 300384, China
    2.College of Electrical Engineering, North China University of Science and Technology, Tangshan, Hebei 063210, China
  • Online:2024-05-01 Published:2024-04-29

优化改进YOLOv8实现实时无人机车辆检测的算法

史涛,崔杰,李松   

  1. 1.天津理工大学 电气工程与自动化学院,天津 300384
    2.华北理工大学 电气工程学院,河北 唐山 063210

Abstract: To address the problems of low accuracy, easy interference from background environment and difficulty in detecting small target vehicles of existing UAV vehicle detection algorithms, an improved UAV vehicle detection algorithm YOLOv8-CX is proposed based on YOLOv8. By integrating the advantages of Deformable Convolutional Networks v1-3, a C2f-DCN module is proposed to flexibly sample features and better extract features between vehicles of different sizes. Utilizing the idea of large separable kernel attention, a SPPF-LSKA module is proposed with long-range dependency and self-adaptability, which can effectively reduce background interference on vehicle detection. In the neck network, a CF-FPN (ment network for tiny object deteciton) feature fusion structure is adopted to enhance the detection accuracy of small targets by combining contextual information and suppressing conflicts between features at different scales. Finally, the original YOLOv8 head is replaced with a Dynamic Head detection head. By unifying scale, space and task, the three types of attention mechanisms, the model detection performance is further improved. Experimental results show that on the Mapsai dataset, compared with the original algorithm, the improved algorithm increases the accuracy (P), recall (R) and mean average precision (mAP) by 8.5, 11.2 and 6.2 percentage points respectively, and the algorithm detection speed reaches 72.6 FPS, meeting the real-time requirements of UAV vehicle detection. By comparing with other mainstream target detection algorithms, the effectiveness and superiority of this method are validated.

Key words: unmanned vehicle detection, YOLOv8, deformable convolution, attention mechanism, feature fusion

摘要: 针对现有无人机车辆检测算法精度低、易受背景环境干扰、难以检测微小目标车辆问题,提出了一种改进YOLOv8的无人机车辆检测算法YOLOv8-CX。结合Deformable Convolutional Networks v1-3的优点,提出一种能够灵活采样特征的C2f-DCN模块,以更好地提取不同尺寸大小车辆之间的特征。利用Large Separable Kernel Attention的思想,提出了具有长程依赖性和自适应能力的SPPF-LSKA模块,可以有效减少背景对于车辆检测的干扰。在颈部网络,采用CF-FPN(ment network for tiny object deteciton)特征融合结构,通过结合上下文信息和抑制不同尺度特征之间的冲突信息,提升了对小目标的检测精度。最后,将原始YOLOv8的头部替换为Dynamic Head检测头。通过将尺度、空间和任务三种注意力机制结合统一,进一步提升了模型的检测性能。实验结果表明,在Mapsai数据集上,改进算法与原算法相比准确率(P)、召回率(R)、平均精度(mAP)分别提升了8.5、11.2和6.2个百分点,且算法检测速度达到72.6?FPS,满足无人机车辆检测实时性的要求。通过与其他主流目标检测算法比较,验证了该方法的有效性和卓越性。

关键词: 无人机车辆检测, YOLOv8, 可变形卷积, 注意力机制, 特征融合