| With the continuous development of computer vision technology,humancomputer interaction based on gestures has gradually replaced mouse and keyboard and become one of the most intuitive,efficient and convenient human-computer interaction methods.As the basis and key of this kind of human-computer interaction,hand detection still faces some problems in practical application,such as complex background,small target size and target occlusion,although a lot of research achievements have been made.At present,deep learning is the mainstream method to achieve various target detection tasks,and its robustness and generalization ability are more advantageous than traditional target detection methods.However,the object detection model based on deep learning has a complex network structure and a large number of parameters,which requires high storage and computing resources of hardware devices,which is not conducive to the actual deployment and application of the model.In view of the above problems,this paper mainly studies object detection,model compression and embedded deployment of models based on deep learning.The main work of this paper is as follows:1.In order to deploy the target detection model with both detection accuracy and speed on mobile embedded devices,this paper selects YOLOv3 as the basic model of target detection,and proposes a channel pruning method for model compression based on BN layer local sparse training.Firstly,the pre-training weight and appropriate data enhancement are used to effectively improve the detection effect of the model,which provides a higher benchmark model for the compression of the subsequent model.Secondly,in the sparse training stage of the model,a local sparse rate attenuation training strategy was proposed to solve the problem that the model detection accuracy would be greatly reduced when the model was sparse by the constant sparse and global sparse strategies.Finally,in the pruning stage of the model,aiming at the problem that the network structure of the YOLOv3 model and channel pruning of the residual module need to meet the channel matching,a channel pruning method based on BN layer scaling factor and a channel pruning method based on intersection were proposed for the common convolutional layer and residual module respectively.In order to minimize the impact of pruning on the model detection accuracy,The optimal pruning threshold is determined by combining global threshold and adaptive threshold.The results of sparse training and channel pruning experiments on Oxford Hand data set show that,compared with other sparse strategies,the local sparse strategy proposed in this paper can keep the detection accuracy of the model basically unchanged while thinning the model,and the channel pruning efficiency in this paper is higher than other channel pruning methods.2.In order to compensate the loss of model accuracy caused by higher pruning rate,this paper further combined with knowledge distillation,taking the original YOLOv3 model as the "teacher model" and the pruning model as the "student model" to compensate the pruning loss accuracy.Firstly,in view of the problem that the teacher model will transmit a large amount of invalid background information to the student model in knowledge distillation,based on the filtering effect of signal graph on the invalid information in the feature map,through the introduction of confidence,an infographic-based method is proposed to screen the important feature layer information in the teacher model.Then,in order to verify the effectiveness of the proposed compression method,the YOLOv3 hand detection model after pruning and knowledge distillation was deployed on the Jetson Tx2 embedded device by Tensor RT.Finally,the fine-tuning of various thinning channel pruning models and the experimental results of knowledge distillation show that knowledge distillation is more effective in restoring the accuracy of pruning models.The hand detection results based on Jetson Tx2 also verify that the compressed model of pruning method in this paper can realize reasoning operation without special software and hardware support,and the reasoning time and detection rate both meet the real-time requirements detection of the target. |