Abstract
Gait recognition is a powerful biometric for long-range identification, but modern deep learning models are computationally intensive for edge deployment. Standard quantization techniques often fail in this domain due to the sensitivity of binarized silhouette inputs to precision loss. We present QGait, a framework designed to quantize gait recognition models efficiently. By introducing a differentiable "soft quantizer" and a novel Inter-class Distance-guided Calibration (IDC) strategy, QGait produces 4-bit and 8-bit models that match or exceed the accuracy of full-precision networks while providing over a 2x speedup in real-world inference pipelines.
Introduction
Gait recognition—identifying individuals by their walking patterns—is highly effective for long-range identification because it is difficult to disguise. However, modern models based on CNNs or Transformers are computationally expensive, making them difficult to run on resource-constrained edge devices like smart cameras.
While quantization (reducing precision from 32-bit floats to 4-bit or 8-bit integers) is a standard compression technique, it typically fails for gait recognition. This failure is rooted in the unique nature of the input: binarized silhouettes. In this domain, minute "decimal-level" changes in a feature can represent significant shifts in body posture. Standard quantization methods use a "Straight-Through Estimator" (STE) to handle non-differentiable functions, but STE is often too "blunt" to capture these subtle perturbations, leading to substantial drops in recognition accuracy.
Methodology
The QGait framework addresses these challenges through a three-pronged approach:
- Differentiable Soft Quantizer: Instead of the standard step-like round function, QGait employs a parameterized soft quantization operator based on the
tanhfunction. This better simulates gradients during backpropagation, allowing the model to learn from subtle input changes that STE would otherwise ignore. - Two-Stage Training Strategy: Theoretical analysis reveals that while the soft quantizer is precise, it can hinder initial convergence. QGait utilizes a two-stage approach: Stage 1 uses standard STE to reach the vicinity of an optimal solution, and Stage 2 fine-tunes with the Soft Quantizer to minimize fine-grained errors.
- Inter-class Distance-guided Calibration (IDC): Low-bit quantization often "squashes" the feature space, reducing embedding variance and altering relative distances between classes. IDC acts as a specialized form of knowledge distillation, forcing the low-bit model to preserve the relative distance distribution of the full-precision model rather than just matching raw output values.
Experimental Evaluation
QGait was evaluated on several challenging gait recognition benchmarks, including Gait3D, GREW, OUMVLP, and CASIA-B.
Accuracy and Efficiency
On the Gait3D dataset, QGait-4 (4-bit) achieved a 64.60% Rank-1 accuracy, outperforming popular methods like LSQ (63.80%) and PACT (59.80%), and even surpassing the full-precision GaitBase baseline (64.40%).
Beyond accuracy, QGait significantly reduces computational overhead. QGait-4 reduced Bit Operations (BitOPs) from 118.30G to just 1.85G. In real-world end-to-end pipelines, quantizing the recognition module reduced its latency from 52.59% of the total cycle time to just 21.04%.
Discussion and Insights
A key finding is that quantization can act as a form of regularization. For "heavy" models like DyGait on Gait3D, the 4-bit version actually outperformed the full-precision version, likely by preventing overfitting.
The success of QGait highlights a "Postural Sensitivity" gap: gait is more sensitive to quantization than standard image classification because small changes at silhouette edges represent physical posture changes rather than mere noise. Furthermore, the effectiveness of IDC suggests that for retrieval tasks, preserving the structural relationship (distances) in the embedding space is more critical than absolute numerical values.
Conclusion
QGait demonstrates that high-accuracy, low-bit quantization is achievable for gait recognition. While results on standard backbones like ResNet-9 are excellent, future work will explore quantizing larger-scale backbones (e.g., ResNet-50) and investigating robustness across varying levels of data complexity.
Summary updated