| With the development of deep neural networks,computer vision technology has made great progress in recent years,especially in terms of accuracy improvement.However,most of the current high-precision neural networks have shortcomings such as deep network structure,large model size and slow reasoning speed,which make it difficult to integrate networks on devices with limited memory and computing power.In order to realize the industrial deployment of complex network in vehicle-mounted environment and complete the task of vehicle patrol and control,it is necessary to carry out lightweight processing of complex neural network.Therefore,this thesis studies the lightweight pedestrian detection method based on hybrid pruning and quantization through lightweight pre-processing and post-processing technologies,and realizes the deployment of complex pedestrian network model in the vehicle-mounted environment with limited Android terminal,the specific research content is as follows:First,a preprocessing method for Caltech pedestrian dataset is proposed.This thesis conducts comparative training on COCO2017 dataset for different target detection networks,and makes comprehensive comparison on its performance,etc.Then,YOLOv5 s network is selected as the pre-processing lightweight target network.Then,this thesis selects Caltech pedestrian dataset as the dataset of the network,but the dataset has problems such as undivided training set and test set and does not meet the training format of YOLO network.Then,after solving the above problems through dataset preprocessing,the subsequent pruning backbone network architecture will be obtained.Second,a hybrid pruning and quantification method based on convolutional kernel pruning and channel pruning was proposed.Firstly,this thesis selects an appropriate clipping strategy by studying the channel layer structure of YOLOv5 s network.Then,a hybrid pruning scheme based on channel pruning and convolution kernel pruning is proposed by combining the structural pruning of network,the size pruning optimization of channel pruning and the reasoning speed optimization of convolutional kernel pruning.Based on the hybrid pruning network,the INT8 quantization method to modify the focus structure of the network is proposed,which can significantly reduce the number of parameters in the model and accelerate the model reasoning speed,and provide a network basis for the subsequent deployment on the Android terminal.Third,an inference method for pruning quantization network for Android mobile terminal is proposed.This thesis rewrites the code of YOLOv5 s network inference for the Android file format,and uses the react-native front-end framework for network deployment,and finally this article deploys the hybrid pruning quantization network on the Android side and tests the performance.Finally,the network performance test based on Caltech test set is carried out on Android.The experimental results show that the proposed hybrid pruning quantization scheme of YOLOv5 s network has a m AP0.5 accuracy of 96.75%,a reasoning speed of3.2ms/ image,and a model size of 5.20 MB in pedestrian detection tasks.Compared with the original YOLOv5 s network,the accuracy is increased by 0.15%,the reasoning speed is increased by 52.94%,and the model size is reduced by 62.07%,which proves that the lightening scheme proposed in this thesis can significantly improve the pedestrian detection performance of Android terminal. |