[关键词]
[摘要]
为了提升汽车辅助驾驶系统对前方车辆的检测效果,进一步获取精确的距离信息,本文提出一种改进的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%。
[Key word]
[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%.
[中图分类号]
[基金项目]
航空科学基金(201944057001)资助项目