In recent years,with the rapid development of deep learning,convolutional neural networks have achieved the most advanced results in the field of vehicle recognition.However,due to the insufficient computational complexity and huge model parameters of traditional convolutional neural network models,it is difficult to deploy them on mobile devices with limited resources.It’s significant to develop a vehicle identification model that can be transplanted to mobile devices.The main work of this article is to build a real-time mobile model recognition system.The system mainly includes the development,compression of lightweight model recognition models,and calculation acceleration based on the ARM platform.The main work in this thesis is as follows:(1)Comparing the advantages and disadvantages of the current mainstream lightweight convolutional neural networks MobileNet,SqueezeNet,and ShuffleNet in vehicle recognition tasks,MobileNet is selected as the basic network for vehicle recognition based on the results.Aiming at the disadvantage that triple loss is difficult to train,a comprehensive use of softmax loss and center loss is proposed for training.Aiming at the shortcomings of the weak feature extraction capability of lightweight networks,a dense connection structure is proposed to enhance the flow of information between convolutional layers,which effectively improves the effect of the model.(2)A layer-by-layer pruning framework based on channel information entropy is proposed.By calculating the entropy value of the feature tensor of each channel in each layer,and based on this,the channel is included to evaluate the amount of information,and then the channel is evaluated.Importance,sort the entropy values,and cut out the channels with lower entropy values.In order to reduce the impact of pruning on the accuracy of the model,this paper proposes pruning in a layer-by-channel manner,that is,starting from the bottom layer,comparing the change in model accuracy before and after pruning each channel,setting a threshold.When the accuracy rate This channel is restored when the drop exceeds the threshold,so it can be ensured that the accuracy of the model does not drop significantly due to pruning.(3)This paper explores the method of fixed-pointing the vehicle identification model.Through statistics on the parameters of each layer of the model,it is found that the parameters of the vehicle identification model trained in this paper are basically normal.Therefore,the model is quantified by linear quantization..A comparative experiment is set up to analyze the impact of quantization accuracy on model accuracy.After a large number of experiments,this paper has completed the 8-bit fixed-point identification of the vehicle recognition model at the cost of less than 1%accuracy loss.(4)In order to further accelerate the forward calculation speed of the model recognition model,this article develops and implements a mobile-based model recognition acceleration platform in the visual studio development environment.Accelerate the forward calculation speed of the vehicle model recognition model through single-instruction multi-data technology,and improve the real-time response.The single instruction multiple data technology can complete the processing of multiple sets of data in a single instruction cycle,which is equivalent to realizing the spatial parallelism of the program.Through this technology,the data throughput of the processor can be effectively improved,and the memory overhead can be reduced,so the processing time for vehicle identification can be further reduced.Finally,we test the performance of the model recognition acceleration platform through experiments.For 640 × 480 resolution traffic intersection video data,the model recognition processing speed can reach 29.9 FPS,which can fully meet the real-time requirements. |