基于轻量化改进型YOLOv5的车辆检测方法
Vehicle Detection Method Based on Lightweight Improved YOLOv5
摘要: 本文建立了一种基于计算机视觉的检测前方车辆模型,实现对前方目标车辆的实时检测。本文提出一种基于YOLOv5算法的轻量化车辆检测模型。首先,搭建了YOLOv5检测网络,针对误检漏检问题,使用ConvNeXt重建YOLOv5的主干网络来进行特征提取,以提升网络的细粒度特征融合能力,提高检测精度;然后,为有效解决图像尺度特征变换较大问题其次,在主干网络中引入坐标注意力机制引入提高了主干特征提取效率,进一步提升了算法的特征提取能力;其次,对模型进行剪枝操作,使模型更加轻量化。实验结果表明,改进YOLOv5算法平均精度均值达到97.41%,较原始算法提升5.3%,剪枝后模型检测速率达到175 f/s,较原速率提升了69.4%,证明了该算法可以满足对车辆的实时检测要求。
Abstract:
In this paper, a vehicle detection model based on computer vision is established to realize real-time detection of the target vehicle in front. This paper proposes a lightweight vehicle detection model based on YOLOv5 algorithm. First, the YOLOv5 detection network is built. For the small target mod-el in the image, the backbone network of YOLOv5 is reconstructed by ConvNeXt to extract features, so as to improve the fine-grained feature fusion ability of the network and improve the detection accuracy; Secondly, in order to effectively solve the problem of image scale feature transformation, the introduction of coordinate attention mechanism in the backbone network improves the effi-ciency of backbone feature extraction and further improves the feature extraction ability of the al-gorithm; Thirdly, prune the model to make it more lightweight. The experimental results show that the average accuracy of the improved YOLOv5 algorithm reaches 97.41%, which is 5.3% higher than the original algorithm. The model detection rate after pruning reaches 175 f/s, which is 69.4% higher than the original rate. It is proved that the algorithm can meet the requirements of real-time vehicle detection.
参考文献
|
[1]
|
桑振. 基于单目视觉的前方车辆测距测速方法研究[D]: [硕士学位论文]. 北京: 北京交通大学, 2020.
|
|
[2]
|
朱英凯, 罗文广, 宾洋. 基于改进车底阴影提取算法的前方运动车辆实时检测[J]. 电子技术应用, 2018, 44(4): 86-89+98.
|
|
[3]
|
Chen, D.Y., Lin, Y.H. and Peng, Y.J. (2012) Nighttime Brake-Light Detection by Nakagami Imaging. IEEE Transactions on Intelligent Transportation Systems, 13, 1627-1637. [Google Scholar] [CrossRef]
|
|
[4]
|
He, K.M., Zhang, X.Y., Ren, S.Q., et al. (2015) Spatial Pyramid Pool-ing in Deep Convolutional Networks for Visual Recognition. IEEE Transactions on Pattern Analysis and Machine Intelli-gence, 37, 1904-1916. [Google Scholar] [CrossRef]
|
|
[5]
|
Lin, T.Y., Dollár, P., Girshick, R., et al. (2017) Feature Pyramid Networks for Object Detection. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, 21-26 July 2017, 936-944.
|
|
[6]
|
Li, H.C., Xiong, P.F., An, J., et al. (2018) Pyramid Attention Network for Semantic Segmentation. British Machine Vision Conference 2018, Newcastle, p. 285.
|