计算机工程与应用 ›› 2022, Vol. 58 ›› Issue (17): 81-92.DOI: 10.3778/j.issn.1002-8331.2205-0158

• 目标检测专题 • 上一篇    下一篇

改进YOLOv5的复杂道路目标检测算法

王鹏飞,黄汉明,王梦琪   

  1. 广西师范大学 计算机科学与工程学院,广西 桂林 541004
  • 出版日期:2022-09-01 发布日期:2022-09-01

Complex Road Target Detection Algorithm Based on Improved YOLOv5

WANG Pengfei, HUANG Hanming, WANG Mengqi   

  1. School of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi 541004, China
  • Online:2022-09-01 Published:2022-09-01

摘要: 针对复杂道路背景下的密集遮挡目标和小目标导致的误检、漏检问题,提出一种基于改进YOLOv5的复杂道路目标检测算法。引入Quality Focal Loss,将分类得分与位置的质量预测结合,提高了对密集遮挡目标的定位精度;增加一层浅层检测层作为更小目标的检测层,将原始算法的三尺度检测改为四尺度,特征融合部分也作相应改进,提高了算法对小目标特征的学习能力;借鉴加权双向特征金字塔网络(BiFPN)的特征融合思想,提出了去权重的BiFPN,充分利用深层、浅层以及原始的特征信息,加强了特征融合,减少了卷积过程中特征信息的丢失,提高了检测精度;引入卷积块注意模块(CBAM),进一步提升了算法的特征提取能力,让算法更关注有用的信息。实验结果表明,该改进算法在公开的自动驾驶数据集KITTI和自制的骑乘人员头盔数据集Helmet上的检测精度分别达到了94.9%和96.8%,相比原始算法分别提高了1.9个百分点和2.1个百分点的检测精度,检测速度分别达到了69 FPS和68 FPS,具有较好的检测精度与实时性,同时与一些主流的目标检测算法相比,该改进算法也有一定的优越性。

关键词: 复杂道路, YOLOv5, Quality Focal Loss, 双向特征金字塔网络(BiFPN), 卷积块注意模块(CBAM), 遮挡目标, 小目标

Abstract: Aiming at the problem of false detection and missed detection caused by dense occluded targets and small targets in complex road background, a complex road target detection algorithm based on improved YOLOv5 is proposed. Firstly, Quality Focal Loss is introduced, which combines the classification score with the quality prediction of location to improve the positioning accuracy of dense occluded targets. Secondly, a shallow detection layer is added as the detection layer of smaller targets, the three-scale detection of the original algorithm is changed to four-scale detection, and the feature fusion part is also improved accordingly, which improves the learning ability of the algorithm to the features of small targets. Then, based on the feature fusion idea of weighted bidirectional feature pyramid network(BiFPN), a de-weighted BiFPN is proposed, which makes full use of deep, shallow and original feature information, strengthens feature fusion, reduces the loss of feature information in the process of convolution, and improves the detection accuracy. Finally, the convolution block attention module(CBAM) is introduced to further improve the feature extraction ability of the algorithm and make the algorithm pay more attention to useful information. The experimental results show that the detection accuracy of the improved algorithm in this paper on the public autopilot data set KITTI and the self-made rider helmet data set Helmet reaches 94.9% and 96.8% respectively, which is 1.9 percentage points and 2.1 percentage points higher than the original algorithm, and the detection speed reaches 69 FPS and 68 FPS respectively. It has better detection accuracy and real-time performance. At the same time, compared with some mainstream target detection algorithms, the improved algorithm in this paper also has some advantages.

Key words: complex road, YOLOv5, Quality Focal Loss, bidirectional feature pyramid network(BiFPN), convolution block attention module(CBAM), occluded target, small target