Due to the rapid development of technologies such as artificial intelligence and autonomous driving,as well as people’s yearning for a better life,the number of domestic family car ownership has increased rapidly,but it has also brought frequent traffic accidents.When faced with complex road conditions,the accuracy of the vehicle detection ranging algorithm of the traditional monocular camera has the problem of instability.In addition,deploying deep learning models on embedded edge devices has the problem of difficulty balancing real-time and accuracy.Therefore,how to realize real-time perception of road conditions and obtain the position and distance of the vehicle in front in real time has become an important research topic.The goal of this study is to improve the stability of vehicle target detection algorithms and monocular ranging algorithms in complex scenarios and the inference speed of deep learning models deployed on embedded platforms.The research focuses on improving the vehicle target detection algorithm based on deep learning and the vehicle target geometric ranging algorithm based on monocular camera,and proposes an improvement scheme for the corresponding algorithms.The work of this article is mainly divided into three parts:(1)After comparing different vehicle target detection algorithms,the CBAM attention module is added to the YOLOv5 s network framework to enhance the extraction ability of the model for small target features.At the same time,in order to meet the needs of the model to be deployed in embedded edge devices,a scaling factor is added to the CBL layer to reduce the number of model parameters and model size to accelerate the training speed and convergence speed of the model.The improved YOLOv5s-SV vehicle target detection algorithm achieves a fast detection speed of 7.9ms on the Jetson Xavier NX platform.The improved YOLOv5s-SV vehicle target detection algorithm can accurately identify the vehicle target in front and improve the speed of vehicle target detection.Therefore,the improved detection algorithm is more suitable for deployment in actual scenarios.(2)On the basis of the traditional monocular ranging algorithm and the monocular camera geometric ranging algorithm,aiming at the problem that the ranging accuracy is affected by the change of the attitude of the monocular camera when driving in bumpy roads,the camera horizontal line monocular geometric ranging algorithm is proposed to reduce the ranging error.Experiments show that the average error of the improved ranging algorithm is3.77% within a certain distance,which is 2.58% lower than that of the original ranging method,and is successfully transplanted to embedded devices.(3)The installation and hardware assembly of the system were completed on the edge device NVIDIA Jetson Xavier NX platform,and the deployment and porting of the YOLOv5s-SV vehicle target detection algorithm and the camera horizontal line monocular geometric ranging algorithm were realized. |