Research on binocular vision vehicle detection and ranging method based on improved YOLOv5s
陈冬冬 1任晓明 1李登攀 1陈坚2
扫码查看
点击上方二维码区域,可以放大扫码查看
作者信息
1. 上海电机学院电气学院,上海 201306
2. 上海交通大学电气工程系,上海 200240
折叠
摘要
为了提升汽车辅助驾驶系统对前方车辆的检测效果,进一步获取精确的距离信息,本文提出一种改进的YOLOv5s的目标车辆检测算法,并用双目对前方车辆进行测距.以YOLOv5s(you only look once v5s,YOLOv5s)检测网络为基础,首先在网络中引入卷积注意力模块(convolutional block attention module,CBAM)有效提取检测目标的轮廓特征;其次将Neck中PANet网络替换为BiFPN提升特征的融合能力,使用DIoU优化损失函数,增强对车辆检测的准确性;采用SURF算法进行立体匹配,并对特征匹配点进行约束获得最优视差值,最后通过双目视觉测距原理求得前车距离信息.测试表明,在20 m的距离范围内,车辆识别率准确率为92.1%,提升了 1.54%,测距平均误差率为2.75%.
Abstract
In order to improve the detection effect of the vehicle assisted driving system on the vehicle ahead,and further obtain accurate distance information,this paper proposes an improved you only look once v5s(YOLOv5s)target vehicle detection algorithm,and uses binocular to measure the distance of the vehicle ahead.Based on the YOLOv5s detection network,firstly,the convolutional block attention module(CBAM)is introduced into the network to effectively extract the contour features of the detection target;secondly,the PANet network in Neck is replaced with BiFPN to improve the feature fusion ability,and DIoU is used to optimize the loss function to enhance the accuracy of vehicle detection.The SURF algorithm is used for stereo matching,and the feature matching points are constrained to obtain the optimal disparity value.Finally,the distance information of the preceding vehicle is obtained through the principle of binocular vision ranging.The test shows that within a distance of 20 m,the accuracy of vehicle recognition rate is 92.1%,increased by 1.54%,and the average error rate of ranging is 2.75%.
关键词
辅助驾驶/YOLOv5s/注意力机制/BiFPN结构/DIoU损失函数/双目视觉测距
Key words
auxiliary driving/you only look once v5s(YOLOv5s)/attention mechanism/BiFPN structure/DIoU loss function/binocular vision ranging