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

计算机工程 ›› 2025, Vol. 51 ›› Issue (1): 246-257. doi: 10.19678/j.issn.1000-3428.0069825

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

基于改进YOLOv8的道路交通小目标车辆检测算法

火久元*(), 苏泓瑞, 武泽宇, 王婷娟   

  1. 兰州交通大学电子与信息工程学院, 甘肃 兰州 730000
  • 收稿日期:2024-05-08 出版日期:2025-01-15 发布日期:2024-09-05
  • 通讯作者: 火久元
  • 基金资助:
    甘肃省教育厅优秀研究生“创新之星”项目(2023CXZX-508)

Road Traffic Small Target Vehicle Detection Algorithm Based on Improved YOLOv8

HUO Jiuyuan*(), SU Hongrui, WU Zeyu, WANG Tingjuan   

  1. School of Electronic and Information Engineering, Lianzhou Jiaotong University, Lanzhou 730000, Gansu, China
  • Received:2024-05-08 Online:2025-01-15 Published:2024-09-05
  • Contact: HUO Jiuyuan

摘要:

针对交通道路中小目标车辆存在的识别困难、检测精度低以及误检和漏检等问题, 提出一种基于YOLOv8算法的大内核、多尺度梯度组合的道路交通小目标车辆检测模型RGGE-YOLOv8。首先, 使用RepLayer模型替换YOLOv8网络的主干部分, 引入大内核深度可分离卷积结构, 拓展上下文信息, 以增强模型对小目标的信息捕获能力; 其次, 使用GIoU代替原损失函数, 解决IoU在预测框与真实框没有重叠时存在的无法优化问题; 然后, 引入全局注意力机制(GAM), 通过减少信息丢失并增强全局交互信息来提高网络的特征表达能力; 最后, 引入CSPNet并重参化梯度组合特征金字塔, 使得模型具有较大感受野和高形状偏差。实验结果表明, RGGE-YOLOv8在Visdrone数据集和自有数据集上mAP@0.5指标分别达到34.8%和94.7%, 相较于原始YOLOv8n算法精度分别提高了2.2和5.51百分点, 证明了RGGE-YOLOv8模型对道路小目标车辆检测的有效性。

关键词: YOLOv8, 小目标检测, 深度学习, 多尺度特征金字塔, 注意力机制

Abstract:

To address the issues of identification difficulties, low detection accuracy, misdetection, and missing detection of small target vehicles on traffic roads, this study proposes a road traffic small target vehicle detection model, RGGE-YOLOv8, based on the YOLOv8 algorithm with a large kernel and multi-scale gradient combination. First, the RepLayer model replaces the backbone of the YOLOv8 network, and depthwise separable convolution is introduced to expand the context information, thereby enhancing the ability of the model to capture information on small targets. Second, the Complete IoU loss (GIoU) replaces the original loss function to address the issue where the IoU cannot be optimized when there is no overlap. Subsequently, a Global Attention Mechanism (GAM) is introduced to improve the feature representation capability of the network by reducing information loss and enhancing global interactive information. Finally, CSPNet is incorporated, and the gradient combination feature pyramid is parameterized to ensure that the model achieves a large receptive field and high shape deviation. The experimental results indicate that the mAP@0.5 index of the improved algorithm on the Visdrone dataset and the custom dataset reaches 34.8% and 94.7%, respectively. The overall accuracy of the improved algorithm is 2.2 percentage points and 5.51 percentage points higher than that of the original YOLOv8n algorithm. These findings demonstrate the practicability of the RGGE-YOLOv8 model for small target vehicle detection on traffic roads.

Key words: YOLOv8, small target detection, deep learning, multi-scale feature pyramid, attention mechanism