ResQ: Residual Quantization for Video Perception

Davide Abati, Haitam Ben Yahia, Markus Nagel, Amirhossein HabibianICCV 2023 · DOI

Abstract

Deep learning models for video perception, such as semantic segmentation and human pose estimation, are often limited by high computational costs. While existing approaches attempt to mitigate this by warping past features or performing sparse convolutions on frame differences, these methods can be difficult to implement efficiently in hardware. We introduce ResQ (Residual Quantization), a novel quantization scheme that leverages cross-frame redundancies. By observing that residuals—the difference in network activations between neighboring frames—exhibit properties that make them highly quantizable, we develop a framework that incorporates temporal dependencies to improve the accuracy-vs-bit-width trade-off. Furthermore, we extend this into Dynamic ResQ, which adjusts bit-widths based on the magnitude of change in the video. Our experiments across various benchmarks demonstrate that ResQ outperforms standard quantization and existing efficient video models in both efficiency and accuracy.

Introduction

Real-time video perception on mobile and edge devices remains a significant challenge due to the massive computational requirements of modern deep neural networks. Standard quantization—converting high-precision weights and activations into low-bit integers (e.g., 4-bit)—is a common optimization technique. However, most quantization methods treat video frames as a sequence of independent images, failing to exploit the inherent temporal redundancy where most pixels remain static between frames.

ResQ addresses this by shifting the focus from quantizing full activations to quantizing the residuals between frames. This approach allows for significant reductions in bit-width without the performance degradation typically seen in low-bit video processing.

Methodology

Residual Quantization (ResQ)

The ResQ framework operates through a two-step temporal process:

  1. Keyframes: At regular intervals, the model processes a full "keyframe" using standard high-precision quantization (e.g., 8-bit).
  2. Residual Frames: For subsequent frames, the model computes and processes only the residual—the difference between the current frame’s activations and those of the preceding keyframe.

Mathematically, residuals are easier to quantize because they are centered around zero and have a significantly lower variance than full activations. This smaller range allows for a much finer quantization step size, reducing the "rounding error" (quantization noise) even at very low bit-widths (3 or 4 bits).

Pairwise vs. Recurrent Processing

A critical design choice in ResQ is the use of pairwise residuals (relative to a fixed keyframe) rather than recurrent residuals (relative to the immediate predecessor). The authors found that recurrent methods suffer from error accumulation, where small quantization discrepancies compound over time, eventually leading to catastrophic failure in model output. Pairwise processing ensures stability across the video sequence.

Dynamic ResQ

To further optimize efficiency, the authors introduced Dynamic ResQ. This extension allows the model to adjust bit-widths at a pixel level. By allocating more bits to regions with significant motion and fewer bits to static backgrounds, the model acts as an automated attention mechanism, focusing computational resources where they are most needed for accuracy.

Experimental Results

Human Pose Estimation

On the JHMDB dataset, Dynamic ResQ achieved a state-of-the-art accuracy of 94.1% while requiring only 176 GBOPs (Giga-Bit Operations). This represents a 3x efficiency improvement over previous methods like Skip-Conv while maintaining comparable accuracy levels.

Semantic Segmentation

Evaluated on the Cityscapes dataset, ResQ consistently outperformed "Delta Distillation," a competing efficient video model. Across various backbones, ResQ maintained a lead of approximately 1.0 mIoU point, demonstrating its robustness across different architectures.

Video Object Segmentation (VOS)

In the DAVIS 2016 and 2017 benchmarks, standard 4-bit quantization often causes models to fail. In contrast, ResQ retained nearly full performance while reducing the computational cost by 35-40%, proving its effectiveness in tasks requiring high spatial precision.

Discussion and Limitations

While ResQ offers significant gains in efficiency, it introduces a memory overhead because the activations of the keyframe must be stored to compute subsequent residuals. This may pose a challenge for devices with extremely limited RAM. Additionally, the full benefits of pixel-level dynamic bit-width switching require specialized hardware support or highly optimized kernels to translate theoretical "BOPs" savings into real-world latency reductions.

Finally, while ResQ reduces average computation, the peak computation remains tied to the high-precision keyframes. Future research may explore methods to distribute the keyframe computational load across multiple timesteps to further smooth the resource demand.

Conclusion

ResQ provides a powerful new perspective on video model optimization. By treating temporal redundancy as a quantization problem rather than a geometric warping problem, it achieves superior efficiency and accuracy. Its ability to dynamically allocate precision based on video content makes it a promising candidate for the next generation of mobile video perception applications.

Summary updated

BibTeX
@inproceedings{abati2023resq,
  author = {Davide Abati and Haitam Ben Yahia and Markus Nagel and Amirhossein Habibian},
  title = {{ResQ: Residual Quantization for Video Perception}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  doi = {10.1109/iccv51070.2023.01570},
}
Figure