Lossless Image Compression through Super-Resolution

Sheng Cao, Chao-Yuan Wu, Philipp KrähenbühlarXiv 2020

Abstract

Lossless image compression is traditionally viewed as a density estimation problem. While deep learning models like autoregressive networks offer high compression efficiency, they are often computationally prohibitive. This paper introduces SReC (Super-Resolution based Compression), a novel algorithm that frames lossless compression as an iterative super-resolution task. By decomposing images into a hierarchy of resolutions and utilizing autoregressive sub-pixel prediction, SReC achieves state-of-the-art bitrates while being significantly faster and more lightweight than existing deep generative models.

Introduction

The goal of lossless image compression is to represent an image using the minimum number of bits without any loss of information. This is fundamentally a problem of modeling the probability distribution of pixels; a more accurate model allows entropy coders, such as Arithmetic Coding (AC), to reach the theoretical Shannon entropy limit.

Existing deep learning approaches generally fall into two categories: autoregressive models (e.g., PixelCNN), which are highly accurate but slow due to sequential pixel prediction, and latent vector models (e.g., L3C), which are faster but often fail to capture fine-grained details. SReC bridges this gap by using a hierarchical super-resolution framework that allows for massive parallelization on GPUs while maintaining high-fidelity probabilistic modeling.

Methodology

Iterative Upscaling

SReC operates by decomposing a high-resolution image into a hierarchy of lower resolutions. The compression process begins by storing a very small low-resolution version of the image (typically $1/8^{th}$ of the original dimensions) as raw pixel data. The model then performs three successive iterations of "lossless super-resolution" to reconstruct the original image.

The iterative lossless super-resolution process used in SReC to reconstruct high-resolution images from a low-resolution base.

Autoregressive Sub-pixel Prediction

At each upscaling step, the model predicts four high-resolution pixels for every single low-resolution pixel (a $2 \times 2$ block). To maximize efficiency, SReC employs an autoregressive strategy within these blocks. It predicts the first pixel, then the second (conditioned on the first), and then the third (conditioned on the first two).

The SReC architecture illustrating the CNN-based probability estimation and the subsequent Arithmetic Coding (AC) steps for sub-pixel blocks.

A critical innovation in SReC is the use of the "Free" Pixel. Because the low-resolution pixel is defined as the average of the four high-resolution pixels, the fourth pixel is mathematically determined once the first three are known. By calculating this fourth pixel rather than predicting it, the model significantly reduces the amount of data that needs to be stored.

Probability Modeling and Parallelism

Instead of predicting discrete color values, the underlying Convolutional Neural Network (CNN) outputs the parameters of a Discretized Mixture of Logistics. This continuous distribution is then quantized and fed into an Arithmetic Coder. Because the predictions for each $2 \times 2$ block are independent of other blocks at the same resolution level, the entire image can be processed in parallel on a GPU, leading to substantial speed gains over pixel-by-pixel autoregressive models.

Experimental Results

Compression Performance

The authors evaluated SReC on the Open Images benchmark. On lossless PNG versions of the dataset, SReC achieved a compression rate of 2.70 bits per subpixel (bpsp). This outperforms traditional codecs like WebP (3.03 bpsp) and FLIF (2.87 bpsp), as well as previous deep learning models like L3C (2.99 bpsp).

Computational Efficiency

SReC demonstrates remarkable efficiency across several metrics:

  • Speed: It is approximately 55× faster than IDF, the previous state-of-the-art in deep lossless compression, when processing high-resolution images.
  • Model Size: The model is highly compact, requiring only 4.2 million parameters, compared to the 84 million parameters required by IDF.
  • Scalability: Unlike many deep models that struggle with memory constraints at high resolutions, SReC scales gracefully to images as large as $960 \times 960$.

Conclusion and Future Work

SReC demonstrates that framing compression as a super-resolution task provides natural constraints that improve both efficiency and speed. While the model sets a new standard for deep lossless compression, challenges remain. Currently, a significant portion of the bitrate (approx. 24%) is dedicated to "rounding bits" required to reconcile floating-point averages with integer pixel values. Future research into more efficient handling of these rounding errors and optimizing the decoding synchronization between the CPU and GPU could further enhance SReC's utility in real-world applications.

Summary updated

Abstract

We introduce a simple and efficient lossless image compression algorithm. We store a low resolution version of an image as raw pixels, followed by several iterations of lossless super-resolution. For lossless super-resolution, we predict the probability of a high-resolution image, conditioned on the low-resolution input, and use entropy coding to compress this super-resolution operator. Super-Resolution based Compression (SReC) is able to achieve state-of-the-art compression rates with practical runtimes on large datasets. Code is available online at https://github.com/caoscott/SReC.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
ImageNet64SReCbpsp4.29 bits per subpixelMain comparison table; ImageNet64 bpsp column.
Source quote
L552: SReC │ 4.20 │ {0.044} │ {0.071} │ 4.29 │ {0.99} │ {1.15} │ 2.29 │ 2.70
Open ImagesSReCbpsp2.70 bits per subpixel-0.06 vs baselineMain comparison table; Open Images bpsp column, not the separate bpsp (JPEG) column.
Source quote
L552: SReC │ 4.20 │ {0.044} │ {0.071} │ 4.29 │ {0.99} │ {1.15} │ 2.29 │ 2.70
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
ImageNet64IDF baselinebpsp3.90 bits per subpixelMain comparison table; ImageNet64 bpsp column.
Source quote
L551: IDF~\cite{idf} │ 84.33 │ 1.33 │ 1.02 │ 3.90 │ 57.31 │ 62.33 │ 2.34 │ 2.76
Open ImagesIDF baselinebpsp2.76 bits per subpixelevaluation=tiled 64×64 crops · resolution=64x64
Source quote
L551: IDF~\cite{idf} │ 84.33 │ 1.33 │ 1.02 │ 3.90 │ 57.31 │ 62.33 │ 2.34 │ 2.76
BibTeX
@misc{cao2020lossless,
  author = {Sheng Cao and Chao-Yuan Wu and Philipp Krähenbühl},
  title = {{Lossless Image Compression through Super-Resolution}},
  year = {2020},
  eprint = {2004.02872},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.02872},
}
Figure