Rate-Distortion Optimized Post-Training Quantization for Learned Image Compression
Junqi Shi, Ming Lu, Zhan Ma · IEEE Transactions on Circuits and Systems for Video Technology · 2023
Quantizing a floating-point neural network to its fixed-point representation is crucial for Learned Image Compression (LIC) because it improves decoding consistency for interoperability and reduces space-time complexity for implementation. Existing solutions often have to retrain the network for model quantization, which is time-consuming and impractical to some extent. This work suggests using Post-Training Quantization (PTQ) to process pretrained, off-the-shelf LIC models. We theoretically prove that minimizing quantization-induced mean square error (MSE) of model parameters (e.g., weight, bias, and activation) in PTQ is sub-optimal for compression tasks and thus develop a novel Rate-Distortion (R-D) Optimized PTQ (RDO-PTQ) to best retain the compression performance. Given a LIC model, RDO-PTQ layer-wisely determines the quantization parameters to transform the original floating-point parameters in 32-bit precision (FP32) to fixed-point ones at 8-bit precision (INT8), for which a tiny calibration image set is compressed in optimization to minimize R-D loss. Experiments reveal the outstanding efficiency of the proposed method on different LICs, showing the closest coding performance to their floating-point counterparts. Our method is a lightweight and plug-and-play approach without retraining model parameters but just adjusting quantization parameters, which is attractive to practitioners. Such an RDO-PTQ is a task-oriented PTQ scheme, which is then extended to quantize popular super-resolution and image classification models with negligible performance loss, further evidencing the generalization of our methodology. Related materials will be released at https://njuvision.github.io/RDO-PTQ.
Cited by 28 works. doi:10.1109/tcsvt.2023.3323015 Open-access PDF
Authors
References
- Deep Residual Learning for Image Recognition
- Adam: A Method for Stochastic Optimization
- ImageNet Large Scale Visual Recognition Challenge
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics
- Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
- Overview of the High Efficiency Video Coding (HEVC) Standard
- Calculation of average PSNR differences between RD-curves
- Rate Distortion Theory: A Mathematical Basis for Data Compression
- Enhanced Deep Residual Networks for Single Image Super-Resolution