QGait: Toward Accurate Quantization for Gait Recognition with Binarized Input

Senmao Tian,Haoyu Gao,Gangyi Hong,Shuyun Wang,JingJie Wang,Xin Yu,Shunli Zhang
2024-05-23
Abstract:Existing deep learning methods have made significant progress in gait recognition. Typically, appearance-based models binarize inputs into silhouette sequences. However, mainstream quantization methods prioritize minimizing task loss over quantization error, which is detrimental to gait recognition with binarized inputs. Minor variations in silhouette sequences can be diminished in the network's intermediate layers due to the accumulation of quantization errors. To address this, we propose a differentiable soft quantizer, which better simulates the gradient of the round function during backpropagation. This enables the network to learn from subtle input perturbations. However, our theoretical analysis and empirical studies reveal that directly applying the soft quantizer can hinder network convergence. We further refine the training strategy to ensure convergence while simulating quantization errors. Additionally, we visualize the distribution of outputs from different samples in the feature space and observe significant changes compared to the full precision network, which harms performance. Based on this, we propose an Inter-class Distance-guided Distillation (IDD) strategy to preserve the relative distance between the embeddings of samples with different labels. Extensive experiments validate the effectiveness of our approach, demonstrating state-of-the-art accuracy across various settings and datasets. The code will be made publicly available.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is the performance degradation of existing gait recognition methods after quantization. Specifically, although existing deep - learning methods have made significant progress in gait recognition, mainstream quantization methods focus more on minimizing task losses rather than quantization errors. This leads to the accumulation of quantization errors in the intermediate layers of the network when using binary inputs for gait recognition, which weakens the model performance. Therefore, the paper proposes a different soft quantizer, as well as a two - stage training strategy and an Inter - class Distance - guided Distillation (IDD) method to optimize quantization errors and task losses while maintaining or improving the model performance. ### Main Contributions 1. **Proposed a quantization - based compressed gait recognition network**: For the first time, lossless compression and acceleration of existing gait recognition methods have been achieved. 2. **Proposed a two - stage quantization training strategy**: Combined STE (Straight - Through Estimator) and soft quantizer to optimize quantization errors and task losses simultaneously. 3. **Introduced an inter - class distance - guided knowledge distillation method**: By focusing on the distribution differences between samples of different classes rather than numerical differences, the accuracy of low - bit models has been significantly improved. ### Problems Solved - **Accumulation of quantization errors**: When existing quantization methods handle binary inputs, the network performance degrades due to the accumulation of quantization errors. - **Balance between task losses and quantization errors**: Direct application of soft quantizers will affect the convergence of the network, so a two - stage training strategy is required to balance the two. - **Performance improvement of low - bit models**: Through the inter - class distance - guided knowledge distillation method, the performance of low - bit models has been significantly improved, making it close to or even exceeding that of full - precision models. ### Experimental Results - **Gait3D Dataset**: QGait - 8 has a 2.1% higher Rank - 1 accuracy than GaitBase under 8 - bit quantization, and QGait - 4 outperforms other quantization methods under 4 - bit quantization and even exceeds the full - precision model. - **GREW Dataset**: QGait achieves lossless compression under 8 - bit quantization, and although there is a slight performance degradation under 4 - bit quantization, it still outperforms other quantization methods. - **OUMVLP Dataset**: QGait has almost no performance loss under 8 - bit quantization, and still maintains an accuracy advantage of more than 1% under 4 - bit quantization. ### Conclusion The QGait method proposed in the paper effectively solves the problem of quantization error accumulation in gait recognition by introducing soft quantizers and inter - class distance - guided knowledge distillation methods while maintaining or improving the model performance. The experimental results on multiple datasets verify its effectiveness and superiority.