系统仿真学报 ›› 2025, Vol. 37 ›› Issue (4): 993-1007.doi: 10.16182/j.issn1004731x.joss.23-1562

• 论文 • 上一篇    下一篇

基于改进YOLOv7的交通信号灯检测

郑岚月, 张玉洁   

  1. 中国地质大学(武汉) 数学与物理学院,湖北 武汉 430074
  • 收稿日期:2023-12-23 修回日期:2024-01-22 出版日期:2025-04-17 发布日期:2025-04-16
  • 通讯作者: 张玉洁
  • 第一作者简介:郑岚月(2001-),女,硕士生,研究方向为计算机视觉。
  • 基金资助:
    国家自然科学基金(42374174)

Traffic Signal Detection Based on Improved YOLOv7

Zheng Lanyue, Zhang Yujie   

  1. School of Mathematics and Physics, China University of Geosciences, Wuhan 430074, China
  • Received:2023-12-23 Revised:2024-01-22 Online:2025-04-17 Published:2025-04-16
  • Contact: Zhang Yujie

摘要:

针对通用物体检测算法在信号灯检测方面存在着识别精度较低的问题,提出一种专门针对交通信号灯检测任务的改进的YOLOv7算法。去掉20×20检测尺度,添加160×160的检测尺度,在使模型轻量化的同时增加浅层特征;结合BiFormer中提出的BRA(bi-level routing attention)与坐标轴注意力,针对交通信号灯位置特点提出了ABRA(axially-guided BRA);针对IoU指标对物体尺寸敏感的问题,引入NWD(normalized wasserstein distance)度量,改进物体定位损失与置信度损失。实验结果表明:改进YOLOv7算法的mAP值达到了97.7%,比原始YOLOv7提高了11.4%,检测速度提升了90帧/s,计算复杂度降低了4.5%。

关键词: 交通信号灯检测, 注意力机制, BiFormer, NWD(normalized wasserstein distance), YOLOv7

Abstract:

An improved YOLOv7 is proposed to address the problem of low recognition accuracy in general object detection algorithms for traffic signal detection. The algorithm removes the 20×20 detection scale and adds a 160×160 detection scale to increase shallow features while making the model lightweight. It combines the bi-level routing attention (BRA) proposed in BiFormer with axial attention, and innovatively proposes axially-guided BRA (ABRA). This module is specifically designed for the characteristics of traffic signal positions. To address the issue of object size sensitivity to the IoU metric, the normalized wasserstein distance (NWD) measurement is introduced to improve object location loss and objectness loss. Experimental results show that on the S2TLD dataset, the improved YOLOv7 algorithm achieves a mAP value of 97.7%, which is an improvement of 11.4% over the original YOLOv7. The detection speed is increased by 90 frames/s, and the computational complexity is reduced by 4.5%.

Key words: traffic signal detection, attention mechanism, BiFormer, normalized wasserstein distance (NWD), YOLOv7

中图分类号: