| It is important to implement vehicle target detection in complex road scenes,and the conventional target detection algorithms are less effective.Therefore,in this work,the YOLOV5 model is improved to achieve accurate vehicle detection.The main research contents are as follows.(1)Collection and compilation of datasets,because the current vehicle detection data are rarely divided into different vehicle models,and the distinction of different vehicle models is beneficial for autonomous driving to judge the distance and target volume.Therefore,in this work,not only public vehicle recognition datasets were used for pretraining,but also 18111 vehicle datasets were recorded and collected in different weather conditions,at different times,and from different viewpoints: including images of vehicles driving on the road from the perspective of the car recorder,vehicles recorded from the perspective of the violation camera,and vehicles parked in the neighborhood or underground parking lot,etc.14710 images were used for training and 3401 images for validation.The images were neatly labeled and mainly contain seven categories(ordered by body type): heavy trucks,busses,light trucks,pickups,SUV or vans,small cars,and motorcycles/electric vehicles/bicycles.(2)In this work,based on the Yolov5 s model,the bottleneck structure is improved by replacing the original 3x3 convolution with multiple number of channels is only 1/1 of the original 3x3 convolution and constructing a multilayer structure that allows more highlevel information to be fused on the same layer and improves the large vehicle detection accuracy,where the accuracy on the vehicle dataset remains almost constant under the condition of 27% reduction in the number of parameters and 32% reduction in computation,and a real-time speed of 30 FPS can be achieved on embedded Nvidia Jeston nano devices.(3)Combined with the characteristics of vehicle target detection,this paper proposes a data enhancement method for vehicle target detection: the method first keys out the vehicle targets in the training set images,does data enhancement operations such as random cropping and stretching transformation on the keyed-out targets,and the transformed targets are randomly incorporated into the training images after transparency changes to achieve the purpose of expanding the data set.In the actual vehicle scenario,the number of small cars is much more than other categories,so it is also possible to balance the unbalanced number of label categories to some extent by this algorithm,and the m AP of Yolov5 s trained with this data enhancement method is 2.6% higher than that of the same model without this method model without this data augmentation method.(4)Using float16 instead of float32 to dequantize the model reduces the memory requirement of the model to 50% of the original value.The trained Pytorch model is inferentially accelerated and deployed with the Tensor RT gas pedal,allowing the algorithm to detect at 30 FPS in real time on embedded devices.In summary,the algorithm in this paper performs the function of real-time vehicle monitoring in complex scenes.The the experimental results show that the method in this paper improves the accuracy of vehicle detection in complex road scenes and reduces false detection and missed detection. |