作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2024, Vol. 50 ›› Issue (11): 338-349. doi: 10.19678/j.issn.1000-3428.0068742

• 开发研究与工程应用 • 上一篇    下一篇

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

谢竞, 邓月明*(), 王润民   

  1. 湖南师范大学信息科学与工程学院, 湖南 长沙 410081
  • 收稿日期:2023-11-01 出版日期:2024-11-15 发布日期:2024-11-28
  • 通讯作者: 邓月明
  • 基金资助:
    国家自然科学基金(62173140); 国家自然科学基金(62072175); 湖南省重点研发计划项目(2022GK2067); 湖南省自然科学基金(2021JJ30452)

Improved Traffic Sign Detection Algorithm Based on YOLOv8s

XIE Jing, DENG Yueming*(), WANG Runmin   

  1. School of Information Science and Engineering, Hunan Normal University, Changsha 410081, Hunan, China
  • Received:2023-11-01 Online:2024-11-15 Published:2024-11-28
  • Contact: DENG Yueming

摘要:

针对当前主流的交通标志目标检测算法在复杂环境中对小目标检测精度低、存在误检和漏检的问题, 提出一种改进的基于YOLOv8s的交通标志检测算法。该算法在主干网络中使用Pconv卷积并设计C2faster模块, 以实现轻量化网络结构同时维持网络精度。为更好地利用底层和高层特征之间的信息, 并增强区域上下文关联能力, 根据SPPF的思想设计SPPFCSPC模块作为空间金字塔池化模块。通过添加GAM注意力机制进一步增强网络的特征提取能力, 有效提高检测精度。为改善对微小目标的检测能力, 在网络颈部添加四倍下采样分支, 优化目标定位。此外, 使用Focal-EIoU损失函数替换原CIoU损失函数, 对预测框的宽高比进行准确定义, 缓解正负样本不平衡的问题。实验结果表明, 在CCTSDB-2021交通标志数据集上, 改进算法的精确率、召回率和mAP@0.5分别达到86.1%、73.0%和81.2%, 相比原始的YOLOv8s算法分别提高了0.8%、6.3%和6.9%。此外, 该算法在复杂天气和恶劣环境下的误检和漏检问题得到明显改善, 综合检测性能明显优于对比算法, 具有较大的实用价值。

关键词: YOLOv8, 交通标志检测, 注意力机制, Pconv, C2faster

Abstract:

Due to low detection accuracy for small targets in complex environments, along with false and missed detections in mainstream traffic sign detection algorithms, an improved algorithm based on YOLOv8s is proposed. This algorithm uses Pconv convolution in the backbone network and incorporates a C2faster module to achieve a lightweight network structure while maintaining network accuracy. In addition, to better utilize the information between low- and high-level features and enhance the regional context association ability, the SPPFCSPC module is designed as a spatial pyramid pooling module based on the concept of SPPF. In addition, by adding the GAM attention mechanism, the feature extraction capability of the network is further enhanced, and the detection accuracy is effectively improved. To improve the detection ability of small targets, a four-fold downsampling branch is added at the neck of the network to optimize target positioning. In addition, the Focal-EIoU loss function is used to replace the original CIoU loss function to accurately define the aspect ratio of the prediction box, which alleviates the problem of imbalance between the positive and negative samples. Experimental results show that on the CCTSDB-2021 traffic sign dataset, the improved algorithm achieved 86.1%, 73.0%, and 81.2% precision, recall, and mAP@0.5, respectively. Compared with the original YOLOv8s algorithm, increases of 0.8%, 6.3%, and 6.9% were observed, respectively. This algorithm significantly reduces false and missed detections in complex weather and harsh environments, offering better overall detection performance than the comparison algorithm, with strong practical value.

Key words: YOLOv8, traffic sign detection, attention mechanism, Pconv, C2faster