Multi-Realism Image Compression with a Conditional Generator

Eirikur Agustsson, David Minnen, George Toderici, Fabian MentzerCVPR 2022

Abstract

By optimizing the rate-distortion-realism trade-off, generative compression approaches produce detailed, realistic images, even at low bit rates, instead of the blurry reconstructions produced by rate-distortion optimized models. However, previous methods do not explicitly control how much detail is synthesized, which results in a common criticism of these methods: users might be worried that a misleading reconstruction far from the input image is generated. In this work, we alleviate these concerns by training a decoder that can bridge the two regimes and navigate the distortion-realism trade-off. From a single compressed representation, the receiver can decide to either reconstruct a low mean squared error reconstruction that is close to the input, a realistic reconstruction with high perceptual quality, or anything in between. With our method, we set a new state-of-the-art in distortion-realism, pushing the frontier of achievable distortion-realism pairs, i.e., our method achieves better distortions at high realism and better realism at low distortion than ever before.

Introduction

In lossy image compression, a fundamental three-way trade-off exists between Rate (file size), Distortion (mathematical fidelity, e.g., MSE), and Realism (perceptual naturalness). Traditional codecs, such as JPEG or standard neural codecs, typically optimize for minimal distortion. At low bitrates, this optimization leads to blurry reconstructions as the model averages over possible high-frequency details. Conversely, recent generative codecs like HiFiC utilize Generative Adversarial Networks (GANs) to synthesize sharp textures. However, these models are often criticized for "hallucinating" details not present in the original image, which can be misleading in sensitive applications.

Historically, developers had to commit to one regime at the time of encoding. This paper introduces a novel approach providing post-compression control, allowing the receiver to navigate the distortion-realism trade-off using a single compressed bitstream.

Proposed Method

The proposed system builds upon the state-of-the-art ELIC neural codec architecture, transforming it into a Conditional Generator. The core innovation is a decoder (generator $G$) that is conditioned on a "realism factor" $\beta$.

Overview of the conditional generator architecture and visual beta trade-off.

Beta Conditioning via FourierCond

To enable the decoder to adjust realism dynamically, the scalar $\beta$ is embedded into a high-dimensional space using Fourier features—a technique inspired by diffusion models. This embedding is processed through a multi-layer perceptron (MLP) and used to scale and bias features within the decoder's residual blocks.

Training Objectives

The model is trained across a spectrum of $\beta$ values using a large internal dataset of high-resolution images. The loss function is a weighted combination of:

  • Rate: The estimated bit-cost of the latent representation.
  • Distortion: Mean Squared Error (MSE) between the original and reconstructed image.
  • Realism: A combination of adversarial (GAN) loss and perceptual loss (LPIPS).

By scaling the realism components of the loss by $\beta$ during training, the model learns a continuous mapping: $\beta=0$ prioritizes mathematical accuracy, while higher $\beta$ values encourage the synthesis of realistic textures.

Experimental Results

The model was evaluated on standard benchmarks including Kodak (for PSNR), CLIC 2020 (high-resolution), and MS-COCO 30K (for FID, the standard metric for generative realism).

Rate-distortion-realism performance on MS-COCO 30K and CLIC 2020.

State-of-the-Art Performance

The method establishes a new state-of-the-art in the distortion-realism plane. At high realism settings ($\beta=2.56$), it outperforms HiFiC by over 1dB in PSNR while maintaining comparable or superior realism (FID). At the low-realism setting ($\beta=0$), the model remains competitive with non-generative standards, matching the performance of VTM (VVC reference software) and coming within 0.2dB of the MSE-optimized ELIC baseline.

Discussion and Conclusion

A key insight of this work is the existence of a "universal" latent representation. A single compressed bitstream contains sufficient information for the decoder to reconstruct either a mathematically precise "average" or a sharp, realistic "hallucination" without requiring additional bits.

This shifts sovereignty to the receiver. For instance, a medical professional can select $\beta=0$ to ensure no synthetic artifacts are introduced to a diagnostic image, while a consumer on a low-bandwidth connection can increase $\beta$ to enjoy a visually pleasing, sharp photograph. While the model shows a slight multi-task bias—where even at $\beta=0$ the realism is better than pure MSE baselines at a small cost to PSNR—it successfully pushes the frontier of achievable distortion-realism pairs. Future work may address semantic consistency in synthesized details and explore stochastic decoding for extreme low-bitrate scenarios.

Summary updated

BibTeX
@inproceedings{agustsson2022multi,
  author = {Eirikur Agustsson and David Minnen and George Toderici and Fabian Mentzer},
  title = {{Multi-Realism Image Compression with a Conditional Generator}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=9bdmWcsJ3i},
}
Figure