Journal of Computer Applications ›› 0, Vol. ›› Issue (): 246-250.DOI: 10.11772/j.issn.1001-9081.2024050733

• Multimedia computing and computer simulation • Previous Articles     Next Articles

Crowded pedestrian detection algorithm based on YOLOv5

Jun ZOU1, Jun LI1,2(), Shiyi ZHANG1   

  1. 1.School of Mechatronics and Vehicle Engineering,Chongqing Jiaotong University,Chongqing 400074,China
    2.School of Automobile and Transportation,Chongqing Vocational and Technical University of Mechatronics,Chongqing 402760,China
  • Received:2024-06-04 Revised:2024-07-24 Accepted:2024-07-25 Online:2025-01-24 Published:2024-12-31
  • Contact: Jun LI

基于YOLOv5的密集行人检测算法

邹军1, 李军1,2(), 张世义1   

  1. 1.重庆交通大学 机电与车辆工程学院,重庆 400074
    2.重庆机电职业技术大学 车辆与交通学院,重庆 402760
  • 通讯作者: 李军
  • 作者简介:邹军(1998—),男,重庆人,硕士研究生,主要研究方向:计算机视觉、图像识别
    李军(1964—),男,重庆人,教授,博士,主要研究方向:计算机视觉、智能网联汽车
    张世义(1965—),男,重庆人,教授,博士,主要研究方向:计算机视觉、智能网联汽车。
  • 基金资助:
    国家自然科学基金资助项目(52172381);重庆市技术创新与应用发展专项重大项目(CSTB2022TIAD?STX0003)

Abstract:

Aiming at the problems of low precision and high model complexity of crowded pedestrian detection algorithms, an improved crowded pedestrian detection algorithm YOLOv5_CDA was proposed based on YOLOv5. First, a C3CA module was designed in the backbone network, and the Coordinate Attention (CA) mechanism was introduced in the last layer to improve the network's ability of capturing local important features. Secondly, the α-IoU loss function was introduced to improve the model's focus on the high Intersection over Union (IoU) targets, thus improving regression accuracy of the bounding box. Thirdly, the detection scale in the neck network was changed to improve the algorithm's ability to detect dense small targets. Finally, the decoupled head was used to calculate the different branches respectively to improve the detection accuracy. Experimental results show that the YOLOv5_CDA algorithm has excellent test performance on the representative pedestrian detection dataset WiderPerson. It has the AP0.5 and AP0.5:0.95 of 90.3% and 63.7%, respectively, with improvements of 1.7% and 3.2% over the YOLOv5 algorithm, and the average missed detection rate decreased by 20%, and the number of parameters decreased by 25.3%. It can be seen that after the overall improvement of the network structure, the YOLOv5_CDA algorithm has the performance improved significantly, without consuming too much memory resources, and can be widely used in crowded pedestrian detection.

Key words: YOLOv5, crowded pedestrian detection, loss function, decoupled head, attention mechanism

摘要:

针对当前密集行人检测算法精度低且模型复杂度高的问题,在YOLOv5算法的基础上提出一种改进的密集行人检测算法YOLOv5_CDA。首先在主干网络中设计一种C3CA模块,并在最后一层引入坐标注意力(CA)机制,提高网络对局部重要特征的捕获能力;其次,引入α-IoU损失函数,提高模型对高交并比(IoU)目标的关注,提升边界框的回归精度;再次,在颈部网络中变换检测尺度,提高了算法对密集小目标的检测能力;最后,应用解耦检测头分别计算不同分支,提升检测精度。实验结果表明:YOLOv5_CDA算法在具有代表性的行人检测数据集WiderPerson上测试性能表现优秀,AP0.5和AP0.5:0.95分别达到了90.3%和63.7%,相较于YOLOv5算法分别提升了1.7%和3.2%,且平均漏检率下降了20%,参数量下降了25.3%。可见,经过网络结构的整体改进,YOLOv5_CDA算法的性能得到较大提升,且不会过多消耗内存资源,可广泛应用于密集行人检测。

关键词: YOLOv5, 密集行人检测, 损失函数, 解耦检测头, 注意力机制

CLC Number: