计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (1): 96-103.DOI: 10.3778/j.issn.1002-8331.2306-0021

• YOLO系列改进及应用专题 • 上一篇    下一篇

改进YOLOv7的复杂道路场景目标检测算法

杜娟,崔少华,晋美娟,茹琛   

  1. 1.太原科技大学 机械工程学院,太原 030024
    2.山西平阳重工机械有限责任公司,山西 临汾 043000
  • 出版日期:2024-01-01 发布日期:2024-01-01

Improved Complex Road Scene Object Detection Algorithm of YOLOv7

DU Juan, CUI Shaohua, JIN Meijuan, RU Chen   

  1. 1.School of Mechanical Engineering, Taiyuan University of Science and Technology, Taiyuan 030024, China
    2.Shanxi Pingyang Industry Machinery Co., Ltd., Linfen, Shanxi 043000, China
  • Online:2024-01-01 Published:2024-01-01

摘要: 虽然基于深度学习的目标检测算法在道路场景中的目标检测方面已经取得了很好的效果,但是对于复杂道路场景中的密集目标,远处的小尺度目标检测精度低,容易出现漏检误检的问题,提出一种改进YOLOv7的复杂道路场景目标检测算法。增加小目标检测层,增加对小目标的特征学习能力;采用K-means++重聚类先验框,使得先验框更贴合目标,增加网络对目标的定位精度;采用WIoU(Wise-IoU)损失函数,增加网络对普通质量锚框的关注度,提高网络对目标的定位能力;在颈部和检测头引入协调坐标卷积(CoordConv),使网络能够更好地感受特征图中的位置信息;提出P-ELAN结构对骨干网络进行轻量化处理,降低算法参数量和运算量。实验结果表明,该改进算法在华为SODA10M数据集下的mAP达到64.8%,比原算法提高2.6个百分点,模型参数量和运算量分别降低12%和7%,达到检测精度和检测速度的平衡。

关键词: YOLOv7, 道路目标检测, CoordConv, K-means++, 轻量化

Abstract: Although the target detection algorithm based on deep learning has achieved good results in the target detection in the road scene, for the dense targets in the complex road scene, the detection accuracy of distant small-scale targets is low, and the problem of missing detection and false detection is easy to occur. An improved YOLOv7 target detection algorithm in the complex road scene is proposed. It adds small target detection layer, increases the feature learning ability of small target; K-means++ is used to reunite the prior frame, which makes the prior frame fit the target better and increases the positioning accuracy of the target. WIoU (Wise-IoU) loss function is used to increase the attention of the network to the common mass anchor frame and improve the ability of the network to locate the target. CoordConv is introduced into the neck and detection head, so that the network can better sense the position information in the feature map. P-ELAN structure is proposed to reduce the number of algorithm parameters and the amount of computation. The experimental results show that the mAP of the improved algorithm under Huawei SODA10M dataset reaches 64.8%, which is 2.6 percentage points higher than the original algorithm. The number of model parameters and the amount of computation are reduced by 12% and 7% respectively, to achieve the balance of detection accuracy and detection speed.

Key words: YOLOv7, road target detection, CoordConv, K-means++, lightweight