| As one of the core research topics in the field of computer vision,object detection technology has been widely concerned and has broad application prospects.Vehicle detection is one of the subdivided research directions of object detection,which is widely used in video surveillance,automatic driving and other fields.In actual urban traffic scenes,due to the wide range of shooting,the size of long-distance objects to be detected is usually relatively small.In addition,when the traffic flow is large in the peak period,serious partial occlusion will occur in the traffic jam,resulting in the multi-scale problem of the object to be detected.In this thesis,YOLOv4 object detection algorithm is selected as the basic algorithm of the precise real-time monitoring task of urban traffic flow,and the multi-scale object detection algorithm is researched.The main work contents and innovations are as follows:First of all,in the object detection method based on deep learning,it is crucial to have a complete dataset for model training.In this thesis,the effective vehicle dataset in urban traffic scenes is established by manual collection and annotation.In the process of data collection,many practical factors are taken into full consideration,and images are taken from various perspectives in different sections and time periods,and the collected image data are preprocessed and labeled.Secondly,an improved k-means++ clustering algorithm is proposed to solve the problem of lack of scale adaptability of prior boxes preseted by model.The algorithm is used to cluster the object boxes of the self-made vehicle dataset,and the size of prior box that is more suitable for the dataset in this thesis is regenerated,thus improving the detection effect of the model.Then,an improved MSYOLOv4 multi-scale object detection algorithm is proposed to solve the problem of small scale object features disappearing with the increase of network layers.A special dilated convolution module is introduced in the backbone feature extraction network to enlarge the receptive field size of the shallow feature map through the dilated convolution of different dilation rates,so as to obtain richer multi-scale features and reduce the missing rate of small scale objects.Finally,the MS-YOLOv4 algorithm proposed in this thesis is deployed to Jetson TX2 embedded platform for verification.Aiming at the problems of limited computing resources and slow detection speed of the platform,a reusable feature extension method is proposed to accelerate the inference of the model,and a lightweight network structure is constructed which is convenient for deployment in TX2.In this thesis,the model is trained and tested on the self-made vehicle dataset.The experimental results show that the m AP of the improved MS-YOLOv4 detection model is improved by 2.84 compared with the original YOLOv4 model.And the model is successfully deployed to Jetson TX2 embedded platform,and the actual detection speed reaches 20 FPS,which can be effectively applied to real-time traffic flow monitoring in urban traffic scenarios. |