计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (5): 200-209.DOI: 10.3778/j.issn.1002-8331.2306-0293

• 图形图像处理 • 上一篇    下一篇

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

刘海斌,张友兵,周奎,张宇丰,吕圣   

  1. 湖北汽车工业学院 汽车工程师学院 Sharing-X移动服务技术平台联合实验室,湖北 十堰 442000
  • 出版日期:2024-03-01 发布日期:2024-03-01

Traffic Sign Detection Algorithm Based on Improved YOLOv5-S

LIU Haibin, ZHANG Youbing, ZHOU Kui, ZHANG Yufeng, LYU Sheng   

  1. Joint Laboratory of Sharing-X Mobile Service Technology, School of Automotive Engineers, Hubei University of Automotive Technology, Shiyan, Hubei 442000, China
  • Online:2024-03-01 Published:2024-03-01

摘要: 在自动驾驶领域,现有的交通标志检测方法在检测复杂背景中的标志时存在着漏检或误检的问题,降低了智能汽车的可靠性。对此,提出了一种改进YOLOv5-S的实时交通标志检测算法。在特征提取网络中融合坐标注意力机制,通过构建目标的长范围依赖来捕获物体的位置感知,使得算法聚焦于重点的特征区域;引入Focal-EIoU损失函数来取代CIoU,使其更关注高质量的分类样本,提高对难分类样本的学习能力,减少漏检或者误检的问题;在网络中融合轻量级卷积技术GSConv,降低模型的计算量。增加新的小目标检测层,通过更丰富的特征信息提高小尺寸标志的检测效果。实验结果表明,改进方法的mAP@0.5和mAP@0.5:0.95分别为88.1%和68.5%,检测速度达到了83?FPS,能够满足实时可靠的检测需求。

关键词: 交通标志检测, YOLOv5, 坐标注意机制, Focal-EIoU, GSConv

Abstract: In the field of autonomous driving, existing traffic sign detection methods have problems with missed or incorrect sign detection in complex backgrounds, reducing the reliability of intelligent vehicles. To address this issue, a real-time traffic sign detection algorithm is proposed to enhance YOLOv5-S. Firstly, the coordinate attention mechanism is integrated into the feature extraction network to perceive the location of the object by establishing long-term dependencies on the target, making the algorithm focus on high-priority regions. Secondly, the Focal-EIoU loss function is used to replace the CIoU, allowing the network to focus more on high-quality classification samples, improving the network’s ability to learn from difficult samples and reducing the occurrence of missed or false detections. Next, the lightweight convolution technique GSConv is integrated into the network to reduce the complexity of the model. Finally, a new small target detection layer is added to improve the algorithm’s detection of small-sized signs by using richer feature information. The experimental results show that the improves algorithm achieves 88.1% for mAP@0.5 and 68.5% for mAP@0.5:0.95, with a detection speed of 83 FPS, which can meet the requirements of real-time and reliable detection.

Key words: traffic sign detection, YOLOv5, coordinate attention mechanism, Focal-EIoU, GSConv