| In recent years,Intelligent Vehicle have achieved extremely rapid development.Environment Perception Technology is the basis for predicting the behavior of motion objects around Intelligent Vehicle,decision-making and control,which largely determines the level of intelligence of the vehicle.Vehicles and pedestrians are the main participants and moving objects in road traffic.Vehicle and pedestrian object detection technology based on deep learning can effectively improve the accuracy of object detection,which in turn improves the intelligence of vehicle and reduces traffic accidents and casualties.However,the object detection algorithm based on YOLOv3 is difficult to meet the real-time requirements of embedded platforms due to its large network model,large amount of calculation,and long operation time.It is necessary to use model compression to reduce the amount of network calculation and increase the speed of network inference.The purpose of this study is to improve the accuracy and speed of the vehicle and pedestrian object detection algorithms.Eventually,the speed indicators of vehicle and pedestrian detection algorithms can be tested on the NVIDIA embedded platform,the Jetson TX2.Firstly,select the required vehicle and pedestrian objects based on the BDD100 K dataset,and the K-means ++ algorithm is used to replace the K-means algorithm to cluster the anchor boxes,and the average intersection ratio of the anchor boxes on the dataset is increased by 2.34%.The vehicle and pedestrian object detection algorithm is trained based on the filtered dataset to implement the detection of vehicles and pedestrians,and the performance of model is analyzed according to the average accuracy and the actual detection results.Improving the proportion of categorical losses and regression losses for each category in the loss function for the unbalanced number of foreground targets in the dataset improved the accuracy of pedestrians by 7.69 percent and reduced the number of missed checks on pedestrians.Secondly,for the problem of large calculation amount and long inference time of the model,This paper proposed an algorithm that uses a global channel pruning threshold combined with L1 norm implement the layer pruning of the Shortcut module in the backbone of vehicle and pedestrian object detection models on the basis of achieving channel pruning based on Batch Normalization layer sparseness.The combination of layer pruning and channel pruning reduced the time consumption of input and output between model layers.The lightweight model with 84% of channels and 15 Shortcut modules pruned reduces the model size by 32%,reduces the amount of calculation by 17%,and decrease the network inference time by 21 ms achieve 1.48 times faster than the model pruned 84% channels.Finally,network layer fusion based on TensorRT is performed,and inference is performed using half-precision floating-point to improve the speed of inference.The lightweight vehicle and pedestrian detection model with 84% of the channels and 15 Shortcut pruned is optimized using TensorRT.Compared with the Pytorch version,the running speed is increased by 30% and the network inference time and post-processing time are added to 41 ms,which can achieve real-time requirements,the accuracy of the model remains basically unchanged.In summary,this paper optimizes the accuracy and speed of the vehicle and pedestrian object detection model,reducing the missed detection caused by the imbalance of the foreground,and finally the inference time and post-processing time of the model on Jetson TX2 meet the real-time requirements. |