A GAN-based Tunable Image Compression System

Lirong Wu, Kejie Huang, Haibin Shen

Introduction

Deep neural network (DNN) based lossy image compression often utilizes "importance maps" to prioritize bit allocation—spending more data on high-detail regions like faces and less on flat backgrounds. However, at extremely low bitrates, backgrounds often suffer from severe visual distortion, blurring, and artifacts. Furthermore, most existing DNN-based models are rigid, requiring separate models or retraining for different compression ratios. This paper introduces a novel GAN-based system that addresses these quality and flexibility issues by combining a lightweight masking network with a generative adversarial framework.

Proposed Method

The authors propose an end-to-end architecture comprising an encoder, masker, quantizer, entropy encoder, decoder (generator), and discriminator. The system is designed to handle high-resolution images efficiently while providing user-controlled compression levels.

Simplified Masking and Tunability

Unlike previous GAN-based compression methods that rely on heavy semantic segmentation networks to identify important regions, this system uses a lightweight convolutional "Masker" network. This masker generates an importance map that guides bit allocation, ensuring that critical features receive sufficient data.

Comparison of the proposed masking approach (top) with traditional semantic-based methods (bottom).

A key innovation is the built-in tunability. By adding a user-defined parameter $n$ to the mean during the masker's normalization step, the system shifts its threshold for "importance." This allows users to adjust the compression ratio dynamically at inference time without the need to swap models or retrain the network.

Multiscale GAN Architecture

The system employs a multiscale architecture (across three scales) for both the encoder and discriminator. This pyramidal structure enables the network to capture both fine-grained noise and deep structural details globally.

Detailed end-to-end architecture showing the encoder, masker, quantizer, and multiscale discriminators.

By intentionally starving non-important regions of bits, the system forces the GAN generator to realistically "hallucinate" background textures. This ensures high perceptual quality even when the underlying data is sparse, as the generator learns to fill in the blanks with plausible details that fool the discriminator.

Experimental Results

The model was trained on 15,000 images from ImageNet and evaluated on the standard Kodak dataset. Key findings include:

  • Superior Low-Bitrate Quality: At bitrates below 0.2 bits per pixel (bpp), the method visually and quantitatively outperforms traditional codecs like JPEG and BPG. At a tiny 0.05 bpp, it achieves an MS-SSIM (Multi-Scale Structural Similarity) score 10.3% higher than the leading GAN-based competitor.
  • Efficiency: The system is highly practical for real-world use. On an Nvidia GTX 1080 Ti, encoding takes approximately 21 ms and decoding takes 29 ms.
  • Ablation Study: Removing the GAN component significantly degrades performance at low bitrates, confirming that the generator's ability to synthesize realistic textures is critical for maintaining perceptual fidelity when data is limited.

Conclusion and Future Work

While the system excels at low bitrates, it faces a slight penalty in pixel-perfect metrics like PSNR at higher bitrates ($bpp > 0.5$), where GAN hallucinations may deviate from the original image. Future research will focus on balancing GAN-driven perceptual quality with high-bitrate pixel fidelity to create a more robust universal compression solution.

Summary updated

BibTeX
@inproceedings{wu2020gan,
  author = {Lirong Wu and Kejie Huang and Haibin Shen},
  title = {{A GAN-based Tunable Image Compression System}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=vQTo8QyUEgI},
}
Figure