Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (6): 110-120.DOI: 10.3778/j.issn.1002-8331.2310-0101

• Special Issue on Object Detection • Previous Articles     Next Articles

Vehicle Detection Algorithm Based on Improved YOLOv8 in Traffic Surveillance

ZHOU Fei, GUO Dudu, WANG Yang, WANG Qingqing, QIN Yin, YANG Zhuomin, HE Haijun   

  1. 1.School of Intelligent Manufacturing Modern Industry, Xinjiang University, Urumqi 830017, China
    2.Xinjiang Key Laboratory of Green Construction and Smart Traffic Control of Transportation Infrastructure, Xinjiang University, Urumqi 830017, China
    3.School of Transportation Engineering, Xinjiang University, Urumqi 830017, China
    4.Key Laboratory of Road Traffic Safety and Public Security, Traffic Management Research Institute of the Ministry of Public Security, Wuxi, Jiangsu 214151, China
    5. Xinjiang Uygur Autonomous Region Public Security Department Traffic Police Headquarters, Urumqi 830017, China
  • Online:2024-03-15 Published:2024-03-15

基于改进YOLOv8的交通监控车辆检测算法

周飞,郭杜杜,王洋,王庆庆,秦音,杨卓敏,贺海军   

  1. 1.新疆大学 智能制造现代产业学院,乌鲁木齐 830017
    2.新疆大学 新疆交通基础设施绿色建养与智慧交通管控重点实验室,乌鲁木齐 830017
    3.新疆大学 交通运输工程学院,乌鲁木齐 830017
    4.公安部交通管理科学研究所 道路交通安全公安部重点实验室,江苏 无锡 214151
    5.新疆维吾尔自治区公安厅交通警察总队,乌鲁木齐 830017

Abstract: To address the current problems of insufficient vehicle detection accuracy and slow detection speed in complex traffic monitoring scenarios, a lightweight vehicle detection algorithm based on YOLOv8 model is proposed. Firstly, FasterNet is used to replace the backbone feature extraction network of YOLOv8, which reduces redundant computation and memory access, and improves the detection accuracy and inference speed of the model.Secondly, the SimAM attention module is added to the Backbone and Neck sections, which enhances the important features of the target vehicles without increasing the original network parameters, and improves the feature fusion capability. Then, to address the problem of poor detection of small-sized vehicles under dense traffic flow, a small target detection head is added to better capture the features and contextual information of small-sized vehicles. Finally, Wise-IoU, which can adaptively adjust the weight coefficients, is used as the loss function of the improved model, which enhances the regression performance of the bounding box and the robustness of the detection.The experimental results on the UA-DETRAC dataset show that compared with the original model, the improved method in this paper is able to achieve better detection accuracy and speed in the traffic monitoring system, with the mAP and FPS improved by 3.06 percengtage points and 3.36%, respectively, which effectively improves the problem of the poor detection of small-target vehicles in the complex traffic scenarios, and achieves a good balance between accuracy and speed.

Key words: vehicle detection, traffic surveillance, YOLOv8, small-target detection, attention mechanism

摘要: 针对目前复杂交通监控场景下车辆检测精度不足、检测速度慢的问题,提出一种基于YOLOv8模型的轻量级车辆检测算法。采用FasterNet替换YOLOv8的骨干特征提取网络,减少了冗余计算和内存访问,提高了模型的检测精度和推理速度;在Backbone和Neck部分添加SimAM注意力模块,在不增加原始网络参数的同时增强了目标车辆的重要特征,提高了模型的特征融合能力;针对密集车流下小尺寸车辆检测效果不佳的问题,添加小目标检测头,更好地捕获小尺寸车辆的特征和上下文信息;使用可自适应调整权重系数的Wise-IoU作为改进模型的损失函数,提升了边界框的回归性能和检测的鲁棒性。在UA-DETRAC数据集的实验结果表明,相较于原模型,改进方法在交通监控系统中能够达到较好的检测精度和速度,mAP和FPS分别提高了3.06个百分点和3.36%,有效改善了复杂交通场景下小目标车辆检测效果不佳的问题,并在精度和速度之间取得了很好的平衡。

关键词: 车辆检测, 交通监控, YOLOv8, 小目标检测, 注意力机制