With the current abundance of image data on the internet and everywhere, compute efficient, highly compressive image compression algorithms are crucial. Applying such image compression algorithms to digital images would help to reduce storage cost and network bandwidth required to transmit them. We conducted a comprehensive study on the state-of-the-art classical, learning-based methods. We evaluated these methods based on diversified evaluation measures like compression ratio, the bit rate, and the peak signal-to-noise ratio, summarize their merits, and tried hybrid approaches for specific design choices.
Current state-of-the-art classical algorithms take advantage of visual perception and the statistical properties of image data. Learning-based strategies, on the other hand, aim to directly learn an end-to-end mapping between the input and the output of the compression process. While the potential of learning-based image compression has been shown in recent years, the computational efficiency and memory requirements of these methods have been a limiting factor in their practicality. Recently, latent diffusion models and GAN-based models have emerged as promising approaches for learning-based image compression. Currently, JPEG and PNG are the two most widely used classic compression methods for images. On the other hand, even though learning-based algorithms exhibit good compression results, it is unclear which image domains they can replace traditional ones in. Hence, we created a benchmark of various image compression methods and presented different use cases of images where certain algorithms outperformed others.
Interactive Demo comparing different image compression methods
In this compression benchmark, we implemented 5 broad approaches for compression: PNG, JPEG, K-means clustering, HiFiC (Conditional-GAN based compression), and Stable Diffusion (generative approach based on iterative denoising).
We evaluate on the Image Compression Benchmark dataset, consisting of 15 images with a total size of 450 MB. We use the metrics of PSNR (Peak Signal to Noise Ratio) and SSIM (Structural Similarity) between original and reconstructed images for measuring the quality of the reconstructions. We also use compression ratios, bit rates (bits per pixel) for compression performance, and consider codec runtime (for encode + decode) as a performance axis.
The following shows scores for the studied algorithms, across each metric, where higher is better for PSNR, SSIM, Compression ration and vice versa for runtime.
We utilised the Image Compression Benchmark dataset for our evaluation. It consists of 15 images of high quality and size equal to 450MB.
The study shows that the state of the art learning based models are giving substantially higher compression ration than the classical algorithms. However, the classical algorithms are giving better PSNR and SSIM scores and are also faster than the learning based models. Under subjective evaluation, of the learning based models, the image quality seems to be better than the classical algorithms. This also shows PSNR and SSIM are not good indicator metrics of quality for generative methods, as they have lower scores even though the images are better.
The following image shows the results of stable diffusion on images with texts in small as well as large font sizes. Similar, text hallucination can be observed from the deck of the images in the demo for stable diffusion
There is significant loss in quality when it comes to small objects in images like face features, flower stigma, etc. The image above gives comparison between original (left) and compressed (right) images.
JPEG at lower quality produces ringing artifacts, as seen in the background of the flower image. PNG, K-Means (without downsampling), and JPEG (with quality 100) are lossless and are equivalent to the original image. HiFiC and Stable diffusion produce high quality reconstructions for natural images. But, they are not able to encode and reconstruct faces, while Stable Diffusion can’t encode + reconstruct text in images even in a large enough font.
The following table shows different points in the space of algorithms corresponding to the metrics we defined above and algorithms that fit into these profiles.
| Profiles | Algorithms |
|---|---|
|
|
|
|
|
|