Fully Quantized Image Super-Resolution Networks

Hu Wang, Peng Chen, Bohan Zhuang, Chunhua Shen

TL;DR

This paper introduces FQSR, a novel framework for fully quantizing all layers of image super-resolution (SR) networks, including crucial skip connections. By addressing key challenges like memory consumption and distinct data distributions, FQSR achieves competitive accuracy with significantly reduced computational cost and memory footprint, making real-time SR feasible on resource-constrained devices.

What Problem Does This Paper Address?

The increasing demand for high-resolution images on mobile and edge devices necessitates efficient image super-resolution (SR) models. While model quantization is a promising technique to reduce computational cost and memory usage by replacing floating-point operations with bitwise arithmetic, existing quantized SR methods struggle to achieve a good accuracy-efficiency trade-off. A major hurdle is the significant memory overhead introduced by skip connections, which are essential for deep SR networks but typically remain in full precision. Furthermore, the highly variable distributions of weights and activations across different layers in SR tasks pose challenges for standard quantization techniques, often leading to accuracy degradation.

Methods

The core contribution of FQSR is its fully quantized approach. Unlike previous methods that often leave parts of the network (like feature extraction, reconstruction modules, or skip connections) in full precision, FQSR quantizes all layers. This includes:

  • Quantizing Skip Connections: This is a key innovation. By quantizing the features passed through skip connections, FQSR drastically reduces memory consumption, which is a major bottleneck in SR.
  • Distribution-Aware Quantizers: Recognizing that activation and weight distributions vary significantly across layers in SR, FQSR proposes learnable quantizers. These quantizers adapt their intervals to the specific data distribution of each layer, minimizing information loss.
  • Self-supervised Quantization-aware Calibration Loss (SQCL): To further mitigate quantization errors, especially in layers where distributions change drastically (like the final layers), FQCL introduces a novel calibration loss. This loss encourages the quantized output distribution to closely match the original distribution, acting as a self-supervision signal.
  • Batch Normalization Folding: For efficiency, batch normalization layers are folded into preceding convolutional layers during inference, eliminating extra floating-point operations.

Datasets

The models were trained on the DIV2K dataset, a standard benchmark for image restoration tasks. Evaluation was performed on five widely used datasets: Set5, Set14, BSD100, Urban100, and DIV2K.

Key Insights and Ideas

  • Skip connections are the memory hog: The paper highlights that skip connections, while crucial for SR performance, are a major contributor to memory consumption in quantized SR models. Quantizing them is essential for practical deployment on edge devices.
  • One-size-fits-all quantization doesn't work for SR: The distinct and often extreme distributions of weights and activations in SR networks necessitate adaptive quantization strategies, rather than uniform quantization.
  • End-to-end quantization is key: Quantizing all components, including skip connections, is crucial for maximizing efficiency gains without sacrificing too much accuracy.
  • Calibration loss helps smooth the quantization process: The SQCL loss is effective in aligning the quantized distributions with the original ones, leading to better accuracy, especially in sensitive layers.

Key Results

FQSR demonstrates impressive performance across multiple SR architectures (SRResNet, EDSR, SRGAN) and scaling factors (×2, ×4):

  • Competitive Accuracy: FQSR models achieve performance on par with or even surpassing full-precision counterparts on benchmark datasets. For instance, the 8/8/32 FQSR model on SRResNet outperforms the full-precision version by 0.121 and 0.336 PSNR for ×2 and ×4 upscaling, respectively.
  • Significant Efficiency Gains: The paper reports substantial reductions in computational cost (OPs) and memory consumption. For example, FQSR models achieve comparable results with significantly fewer OPs and memory compared to previous state-of-the-art quantized SR methods.
  • Improved Visual Quality: Qualitative results (Figures 6 and 7) show that FQSR models produce sharper and more detailed images compared to bicubic interpolation and are comparable to full-precision models.

Limitations and Future Work

  • Hyperparameter Tuning: The paper mentions that the trade-off factor α for the SQCL loss needs careful tuning, with α = 0.3 recommended for optimal performance.
  • Further Exploration of Quantization Bits: While the paper explores various bit configurations, future work could delve deeper into optimal bit allocations for different layers to further push the accuracy-efficiency boundary.
  • Hardware Implementation: While the paper focuses on algorithmic improvements, direct hardware implementation and evaluation would be a valuable next step to confirm real-world efficiency gains.

Summary updated

BibTeX
@inproceedings{wang2021fully,
  author = {Hu Wang and Peng Chen and Bohan Zhuang and Chunhua Shen},
  title = {{Fully Quantized Image Super-Resolution Networks}},
  booktitle = {ACM Multimedia},
  year = {2021},
  doi = {10.1145/3474085.3475227},
}
Figure