Real-time Lightweight Hand Detection Model Combined with Network Pruning
Xiangxian Zhu, Zhao Jiang, Yilun Lou · 2023
Hand detection, often as a pre-processing step for hand keypoint localization and hand segmentation, is a critical task in gesture interaction. A fast hand detector is demanding because it saves time for downstream tasks, leading to a real-time performance in hand gesture interaction. Achieving fast hand detection is challenging, especially on resource-limited devices. In this paper, we propose a lightweight real-time hand detection model called BlazeYOLO. We reduce the model's computational cost by utilizing light modules and pruning redundancy channels. A BlazeBlock, which consists of depthwise convolution, pointwise convolution, and residual structure, serves as the building block of the model backbone. The Only Train Once method trains and prunes the entire model. The model parameters are grouped into zero-invariant groups. During training, the parameters within the same group are updated or set to zero simultaneously. Due to the channel dependency induced by depthwise convolution and residual structure, we design a pruning scheme for the BlazeYOLO model. Following the pruning scheme, the groups whose parameters are all zero can be directly pruned without affecting the model output. The pruned model is the final model and does not require additional fine-tuning. Our proposed model achieves 95.5% average precision (AP) with only 0.11 GFLOPS of computational cost, reaching a high inference speed of 78.1 FPS on mobile devices.