| With the rapid increase in global car ownership,the incidence of traffic accidents has risen rapidly,the issue of car safety has become an important research topic of modern society.This paper develops a vehicle ranging system based on monocular vision depth estimation algorithm.The system uses the improved YOLOv5 s target detection algorithm to detect the vehicle on the video collected by the camera,and calculates the distance between the vehicle and the vehicle in front.The main research contents are as follows:(1)Aiming at the redundancy of multiple activation functions in the YOLOv5 s algorithm and reducing the shortcomings of neural network’s ability to express the model,this paper proposes an improved YOLOv5 s algorithm that uses the Si LU activation function to replace the original two activation functions.At the same time,in view of the poor accuracy and slow convergence speed caused by the GIOU_Loss implementation of bounding box regression,this paper uses CIOU_Loss as the bounding box regression function for predictive regression,which improves the convergence speed and detection accuracy of the loss function.Related experiments were conducted on the COCO data set.The experimental results show that compared with the multi-activation function structure,the improved single activation function structure has a 0.9% increase in m AP,a 1.5% reduction in the total number of feature layer parameters,and a reduction in inference time from 6.9ms to 6.0ms;comparing CIOU_Loss with GIOU_Loss,the convergence speed is increased by 0.8%,and the loss value is reduced by 0.7%.(2)In allusion to the problems of huge computation and low registration efficiency on binocular vision,the use of monocular vision ranging to achieve distance measure is proposed.Because the vehicle distance detection method based on road geometry requires that the two vehicles must be at the same horizontal height and the measurement error is large,the depth estimation method based on monocular vision is used to detect the vehicle distance.By comparing the calculation results of camera calibration,it is verified that the accuracy of the improved camera calibration algorithm is better than traditional camera calibration algorithm.Finally distance of the front vehicle is completed by using the middle point of the rectangular lower frame and distance measure model.(3)The Jetson Nano development board is used as the hardware carrier to achieve the transplantation.In addition,considering the requirements of collision prevention and warning,this paper design the text warning,which automatically starts when the distance between the vehicle and the front vehicle is less than the predefined safe distance.In order to verify the developed system of vehicle target detection and distance measurement of real-time running effect,Three experiments are designed to test its validity.The experimental results show that the system on PC and development board has good effect of vehicle detection and distance measurement. |