Mutated JPEG
Improving JPEG Compression Using Mutations and Deep Learning





Overview


The rounding problem

More than 30 years after its approval in 1992, JPEG is still one of the most popular lossy image compression standards. In this research project I studied a method of improving JPEG compression while still conforming to JPEG standard. As a result I designed and implemented a JPEG standard-compliant and backward-compatible encoding algorithm (Called "Mutated JPEG") that improves the compression by up to 26% without degrading the image quality.

The basic idea is that finding an optimal solution in integer domain is not in general interchangeable by finding the solution in real domain and rounding the results as it is done in the standard JPEG.

As you can see in this image, the optimal solution in integer domain can be far from the rounded value of the optimal solution in real domain.

The rounding problem

Compression Pipeline


The algorithm adds a small mutation to each 8x8 block after applying DCT and before rounding it to integer values. Using a variation of Particle Swarm Optimization and convolutional neural networks I designed the following pipeline for the "Mutated JPEG" compression. For more details please refer to this paper.

Mutated JPEG Pipeline

Results


I used 10 raw images from the publicly available IVC dataset for evaluation purposes. These images were not used in any stage of mining or training. The following image shows the average compression improvement at different quality factors for these 10 test images.

Mutated JPEG Compression Improvements

Examples


The following images show one of the test samples compressed with standard JPEG and Mutated JPEG. As you can see the Mutated JPEG file is about 10K smaller while keeping the image quality (SSIM) unchanged. Click on the images to download the actual files. Both of these files are compressed version of this original raw image. Mutated JPEG algorithm was also tried on several raw images downloaded from the internet and some of the best results are available here.

Standard JPEG
Standard JPEG
SSIM: 0.948300
File Size: 64,163
BPP: 1.958099
Standard JPEG
Mutated JPEG
SSIM: 0.948304
File Size: 54,443
BPP: 1.661469