Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering ›› 2025, Vol. 51 ›› Issue (2): 335-343. doi: 10.19678/j.issn.1000-3428.0069132

• Graphics and Image Processing • Previous Articles     Next Articles

Improved YOLOv7 Traffic Sign Detection Algorithm in Complex Scenarios

XU Ming, QU Taipeng*(), JIANG Yanji   

  1. School of Software, Liaoning Technical University, Huludao 125105, Liaoning, China
  • Received:2023-12-29 Online:2025-02-15 Published:2024-05-21
  • Contact: QU Taipeng

改进YOLOv7在复杂场景下的交通标志检测算法

许明, 屈泰澎*(), 姜彦吉   

  1. 辽宁工程技术大学软件学院, 辽宁 葫芦岛 125105
  • 通讯作者: 屈泰澎
  • 基金资助:
    辽宁省教育厅项目(LJKZ0338)

Abstract:

To solve the problems of misdetection and omission of traffic signs by existing target detection algorithms in complex scenarios, a traffic sign detection algorithm YOLOv7-MBFE is proposed to improve YOLOv7. First, the proposed multi-branch feature extraction module based on dilated convolution controls the shortest and longest gradient paths, thereby enhancing the feature extraction capability of the model. Second, an asymptotic feature pyramid network is built in the header to fully integrate feature information at different levels and improve the feature expression of the model. A channel attention mechanism is further introduced into the SPPCSPC module to adaptively adjust the weights of the channels, enhance the feature interaction between different channels, and integrate the multi-head self-attention mechanism into the downsampling stage, which enhances the ability of the model to perceive the global contextual information and improves its detection performance in complex scenarios. Finally, Focal-EIoU is used to replace the loss function in the original YOLOv7 model to make the model focus more on high-quality anchor frames, accelerate convergence speed, and improve robustness. In numerous experiments, the algorithm was applied to a Chinese traffic sign detection dataset. The experimental results show that the algorithm improved mean Average Precision (mAP) by 9.25%, accuracy by 3.92%, and recall by 5.19% compared with the YOLOv7 algorithm, significantly mitigating the problems of misdetection and missed detection in complex scenes and achieving better detection performance than those of the original algorithm and classical target detection algorithms.

Key words: target detection, traffic sign recognition, YOLOv7, multi-branch feature extraction, multi-scale feature fusion, attention mechanism

摘要:

为解决现有目标检测算法在复杂场景下对交通标志的误检、漏检等问题, 提出一种改进YOLOv7的交通标志检测算法YOLOv7-MBFE。首先, 提出一种基于膨胀卷积的多分支特征提取模块, 控制最短和最长的梯度路径, 增强模型的特征提取能力; 其次, 在头部网络中构建渐进特征金字塔结构, 充分融合不同层次的特征信息, 改善模型的特征表达能力; 在SPPCSPC模块中引入通道注意力机制, 自适应调整通道的权重, 增强不同通道之间的特征交互, 并将多头自注意力机制融合至下采样阶段, 增强模型对全局上下文信息的感知能力, 提高模型在复杂场景下的检测性能; 最后, 使用Focal-EIoU替换原YOLOv7模型中的损失函数, 使模型更专注于高质量的锚框, 加快模型的收敛速度, 提高模型的鲁棒性。在中国交通标志检测数据集上进行大量实验, 结果表明, 相较于YOLOv7算法, 该算法的平均精度均值(mAP)提升了9.25%, 准确率提升了3.92%, 召回率提升了5.19%。改进后的算法能够显著改善复杂场景下的误检、漏检等问题, 检测效果优于原始算法和经典目标检测算法。

关键词: 目标检测, 交通标志识别, YOLOv7, 多分支特征提取, 多尺度特征融合, 注意力机制