• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2023, Vol. 45 ›› Issue (04): 674-682.

• 图形与图像 • 上一篇    下一篇

基于改进YOLOv5+DeepSort算法模型的交叉路口车辆实时检测

贾志,李茂军,李婉婷   

  1. (长沙理工大学电气与信息工程学院,湖南 长沙 410114)

  • 收稿日期:2021-08-30 修回日期:2022-01-03 接受日期:2023-04-25 出版日期:2023-04-25 发布日期:2023-04-13

Real-time vehicle detection at intersections based on improved YOLOv5+DeepSort algorithm model

JIA Zhi,LI Mao-jun,LI Wan-ting   

  1. (School of Electrical and Information Engineering,Changsha University of Science and Technology,Changsha  410114,China)
  • Received:2021-08-30 Revised:2022-01-03 Accepted:2023-04-25 Online:2023-04-25 Published:2023-04-13

摘要: 针对传统目标检测跟踪算法检测精度低、鲁棒性差的缺点,以及交叉路口图像视频资源冗余的现象和车辆密集程度高的特点,提出了一种基于改进YOLOv5和DeepSort算法模型的交叉路口实时车流量检测方法,在MS COCO和BDD100k相结合的数据集上,采用改进的YOLOv5算法模型实现视频小目标车辆检测,利用深度学习多目标跟踪算法DeepSort对检测的车辆进行实时跟踪计数,实现了交叉路口监控端对端的实时车流量检测。通过分析比较不同参数的模型,最终选定了YOLOv5m模型。实验结果表明,该方法在复杂环境、车辆遮挡和目标密集程度高等环境下检测速度更加快,对车辆的检测效果更好,平均准确度达到96.6%。该方法完全满足目标实时性检测的要求,能充分满足交叉路口车辆检测的有效性,满足实际需要的使用需求。

关键词: YOLOv5算法, 车辆检测, DeepSort算法, 目标检测, 实时检测

Abstract: Aiming at the characteristics of low detection accuracy and poor robustness of traditional target detection and tracking algorithm, as well as the phenomenon of image and video resource redundancy and high vehicle density at the intersection, a real-time traffic flow detection method based on improved YOLOv5 and DeepSort algorithm model is proposed. This experiment uses a data set combin- ing MS COCO  and BDD100k , and uses the improved YOLOv5 algorithm  model to realize the small target vehicle detection in video. Then, the deep learning multi-target tracking algorithm (DeepSort algorithm) is used to carry out real-time tracking and counting of the detected vehicles, and the real-time traffic flow detection of the intersection monitoring end-to-end is realized. By analyzing and comparing models with different parameters, the YOLOv5m model is finally selected. Experimental results show that the proposed method has a faster detection speed and better detection effect for vehicles in complex environments, vehicle occlusion and high target density environments, with an average accuracy of 96.6%. This method can fully meet the requirements of real-time detection of targets, and fully meet the effectiveness of vehicle detection at intersections, and meet the actual requirements of use.

Key words: YOLOv5 algorithm, vehicle detection, DeepSort algorithm, target detection, real-time detection