Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (16): 159-169.DOI: 10.3778/j.issn.1002-8331.2304-0090

• Graphics and Image Processing • Previous Articles     Next Articles

Roadside Target Detection Algorithm for Complex Traffic Scene Based on Improved YOLOv5s

YANG Ruining, HUI Fei, JIN Xin, HOU Ruiyu   

  1. School of Imformation Engineering, Chang’an University, Xi’an 710064, China
  • Online:2023-08-15 Published:2023-08-15

改进YOLOv5s的复杂交通场景路侧目标检测算法

杨睿宁,惠飞,金鑫,侯瑞宇   

  1. 长安大学 信息工程学院,西安 710064

Abstract: To address the problem of low detection accuracy for small targets, such as pedestrians, non-motorized vehicles and obstructed vehicles, as well as the issue of large model size in traditional roadside target detection models, a roadside target detection model based on improved YOLOv5s is proposed. Firstly, the EIoU Loss is used to replace the original CIoU Loss as the regression loss function for target bounding box, which speeds up the convergence of the bounding box regression loss function while improving the regression prediction accuracy of predicted box. Secondly, a lightweight and universal upsampling operator called CARAFE is used to replace the original nearest neighbor interpolation upsampling module, reducing the loss of feature information during upsampling. Then, a small target detection branch with a smaller detection scale is added on the basis of the original three-scale detection layer, and an efficient decoupling prediction head is proposed to decouple the detection layers of different scales, further improving the model’s detection capability for small targets. Finally, channel pruning is performed on the improved model to remove redundant channels that have little impact on detection performance, reducing the model’s size, making it more suitable for roadside target detection tasks under resource-constrained conditions. The experimental results on the roadside target detection dataset DAIR-V2X-I demonstrate that compared with the original YOLOv5s algorithm, the improved algorithm achieves a reduction in model size of 5.7 MB while increasing mAP50 and mAP50:95 by 2.5 percentage points and 3.8 percentage points, respectively, reaching 90.3% and 67.7%. The detection speed also reaches 89 FPS. Compared with other mainstream object detection algorithms, the improved model has certain advantages in detection accuracy, model size, and detection speed, making it suitable for roadside target detection tasks in complex traffic scenes.

Key words: object detection, roadside perception, YOLOv5, EIoU Loss, CARAFE, decoupling prediction head, channel pruning

摘要: 针对传统路侧目标检测模型存在的对于行人、非机动车、受遮挡车辆等小目标检测精度低以及模型体积过大的问题,提出了一种基于改进YOLOv5s的路侧目标检测模型。使用EIoU Loss替换原始的CIoU Loss作为目标边界框的回归损失函数,在加快预测框回归损失函数收敛速度的同时提升了预测框的回归预测精度;使用轻量级的通用上采样算子CARAFE替换原始的最近邻插值上采样模块,减少了上采样过程中特征信息的损失;在原始的三尺度检测层的基础上新添加一层检测尺度更小的小目标检测分支,并提出了一种高效的解耦预测头对不同尺度的检测层进行解耦,进一步提升了模型对于小目标的检测能力;对改进后的模型进行通道剪枝,剪除对于检测效果影响不大的冗余通道,降低模型体积,使得模型更加适用于资源受限条件下的路侧目标检测任务。在路侧目标检测数据集DAIR-V2X-I上的实验结果表明,相较于原始YOLOv5s算法,改进后的算法在模型体积减小5.7?MB的基础上,mAP50、mAP50:95分别提高了2.5个百分点和3.8个百分点,达到了90.3%、67.7%,检测速度也达到了89?FPS。与其他主流的目标检测算法在检测精度、模型体积以及检测速度上相比有一定的优势,改进后的算法适用于复杂交通场景下的路侧目标检测任务。

关键词: 目标检测, 路侧感知, YOLOv5, EIoU Loss, CARAFE, 解耦预测头, 通道剪枝