计算机工程与应用 ›› 2023, Vol. 59 ›› Issue (1): 82-91.DOI: 10.3778/j.issn.1002-8331.2207-0307

• YOLO的改进及应用专题 • 上一篇    下一篇

改进YOLOv5的交通标志检测算法

胡昭华,王莹   

  1. 1.南京信息工程大学 电子与信息工程学院,南京 210044
    2.南京信息工程大学 江苏省大气环境与装备技术协同创新中心,南京 210044
  • 出版日期:2023-01-01 发布日期:2023-01-01

Improved Traffic Sign Detection Algorithm for YOLOv5

HU Zhaohua, WANG Ying   

  1. 1.School of Electronic and Information Engineering, Nanjing University of Information Science and Technology, Nanjing 210044, China
    2.Jiangsu Collaborative Innovation Center on Atmospheric Environment and Equipment Technology, Nanjing University of Information Science and Technology, Nanjing 210044, China
  • Online:2023-01-01 Published:2023-01-01

摘要: 交通标志检测在自动驾驶、辅助驾驶等领域是一个重要的环节,关乎到行车安全问题。针对交通标志中存在目标小、背景复杂等难点,提出一种基于改进YOLOv5的算法。提出区域上下文模块,利用多种扩张率的空洞卷积来获取不同感受野,进而获取到目标及其相邻区域的特征信息,相邻区域的信息对交通标志小目标检测起到重要补充作用,可以有效解决目标小的问题;在主干部分引入特征增强模块,进一步提高主干的特征提取能力,利用注意力机制与原C3模块结合,使网络更能聚焦小目标信息,避免复杂背景的干扰;在多尺度检测部分,将浅层特征层与深层检测层进行特征融合,可以同时兼顾浅层位置信息与深层语义信息,增加目标定位与边界回归的准确度,更有利于小目标检测。实验结果表明,改进后的算法在交通标志检测数据集TT100K上取得了87.2%的小目标检测精度、92.4%的小目标召回率以及91.8%的mAP,与原YOLOv5算法相比较,分别提升了3.5、4.1、2.6个百分点,检测速度83.3?frame/s;在CCTSDB数据集上mAP为98.0%,提升了2.0个百分点,检测速度90.9?frame/s。因此,提出的改进YOLOv5算法可以有效提高交通标志检测精度以及召回率,且检测速度相当。

关键词: 小目标检测, YOLOv5, 交通标志检测, 区域上下文, 特征增强, 多尺度检测

Abstract: Traffic sign detection is an important link in the fields of automatic driving and assisted driving, which is related to driving safety. Aiming at the difficulties of small targets and complex backgrounds in traffic signs, an algorithm based on improved YOLOv5 is proposed. Firstly, a regional context module is proposed, which uses dilated convolutions with various dilation rates to obtain different receptive fields, and then obtains the feature information of the target and its adjacent areas. The information of adjacent areas plays an important role in small objects detection in traffic signs. It can effectively solve the problem of small targets. Secondly, a feature enhancement module is introduced in the backbone part to further improve the feature extraction ability of the backbone, and the attention mechanism is combined with the original C3 module to make the network more focused on small target information and avoid complex backgrounds. Finally, in the multiscale detection part, the feature fusion of the shallow feature layer and the deep detection layer can take into account both the shallow position information and the deep semantic information, increase the target positioning accuracy and boundary regression, and is more conducive to small target detection. The experimental results show that the improved algorithm achieves 87.2% small target detection precision, 92.4% small target recall and 91.8% mAP on the traffic sign detection data set TT100K, which is improved by 3.5, 4.1 and 2.6 percentage points respectively compared with the original YOLOv5 algorithm, detection speed 83.3?frame/s. On the CCTSDB dataset, mAP is 98.0%, increases 2.0 percentage points, and the detection speed is 90.9?frame/s. Therefore, the proposed improved YOLOv5 algorithm can effectively improve the traffic signs detection precision and recall, and the detection speed is comparable.

Key words: small target detection, YOLOv5, traffic sign detection, regional context, feature enhancement, multiscale detection