Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (18): 136-146.DOI: 10.3778/j.issn.1002-8331.2401-0277

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

Improved YOLOv8 Urban Vehicle Target Detection Algorithm

XU Degang, WANG Shuangchen, WANG Zaiqing, YIN Kedong   

  1. 1.School of Information Science & Engineering, Henan University of Technology, Zhengzhou 450001,China
    2.Key Laboratory of Food Information Processing & Control, Ministry of Education, Henan University of Technology, Zhengzhou 450001,China
    3.School of Computer & Communication, Hunan Institute of Engineering, Xiangtan, Hunan 411104, China
  • Online:2024-09-15 Published:2024-09-13

改进YOLOv8算法的城市车辆目标检测

许德刚,王双臣,王再庆,尹柯栋   

  1. 1.河南工业大学 信息科学与工程学院,郑州 450001
    2.河南工业大学 粮食信息处理与控制教育部重点实验室,郑州 450001
    3.湖南工程学院 计算机与通信学院,湖南 湘潭 411104

Abstract: Aiming to address the challenges of missing detection, low precision, and weak generalization ability in urban vehicle target detection algorithms for complex traffic scenes, an enhanced YOLOv8 algorithm is proposed. Firstly, this paper replaces the C2f module in the backbone network with an improved GAM-C2f structure to strike a balance between computational efficiency and model accuracy. Secondly, a SPPFAPGC module is designed to prevent local feature loss caused by maximum pooling operations in the SPPF structure. This enhances the richness of the feature map and combines it with a small target detection head to strengthen distant small target vehicle detection capability while integrating local and global features effectively. Finally, to suppress harmful gradients generated by low-quality images, this paper utilizes WIOU loss function instead of CIoU for improved bounding box regression performance, faster convergence speed, and higher regression accuracy. Experimental results on street vehicle datasets demonstrate that compared to the benchmark model YOLOv8n, the improved algorithm achieves a 1.6 percentage points increase in mAP50 and a 2.0 percentage points increase in Recall respectively , the problem of poor detection performance for small-target vehicles in urban traffic scenes is effectively improved. Verification on VisDrone2019 dataset also shows improvements of 1.1 percentage points in mAP50 and 1.6 percentage points in Recall further confirming the superiority of the enhanced algorithm over others mainstream algorithms regarding accuracy and recall rate specifically tailored for urban vehicle detection tasks.

Key words: vehicle target detection, YOLOv8, C2f module , SPPF module, loss function

摘要: 针对复杂交通场景下城市车辆目标检测算法存在的漏检、精度低、泛化能力弱的问题,提出一种改进的YOLOv8城市车辆目标检测算法。采用一种改进的GAM-C2f结构来代替主干网络中的C2f模块,平衡模型的计算效率和准确性;设计一种SPPFAPGC模块,防止SPPF结构因最大池化操作所导致的局部特征丢失问题,提高特征图的丰富度,并进一步结合小目标检测头来加强对远处小目标车辆的检测能力,加强局部特征与全局特征的融合。为抑制低质量图像产生的有害梯度,使用WIOU损失函数代替CIoU,以提升网络的边界框回归性能,提高模型的收敛速度和回归精度。在Streets车辆数据集上的实验结果表明,与基准模型YOLOv8n相比,改进算法的mAP50和Recall分别提高了1.6和2.0个百分点,有效改善了城市交通场景下小目标车辆检测性能不佳的问题;在VisDrone2019数据集上进行验证,mAP50和Recall也分别提高了1.1和1.6个百分点,充分证明了改进算法的优越性。与其他先进主流算法相比,改进算法表现出了更高的准确率和查全率,表明改进算法在城市车辆检测任务中具有更好的性能。

关键词: 车辆目标检测, YOLOv8, C2f模块, SPPF模块, 损失函数