Abstract
JPEG is one of the most popular image compression methods. It is beneficial to compress those existing JPEG files without introducing additional distortion. In this paper, we propose a deep learning based method to further compress JPEG images losslessly. Specifically, we propose a Multi-Level Parallel Conditional Modeling (ML-PCM) architecture, which enables parallel decoding in different granularities. First, luma and chroma are processed independently to allow parallel coding. Second, we propose pipeline parallel context model (PPCM) and compressed checkerboard context model (CCCM) for the effective conditional modeling and efficient decoding within luma and chroma components. Our method has much lower latency while achieves better compression ratio compared with previous SOTA. After proper software optimization, we can obtain a good throughput of 57 FPS for 1080P images on NVIDIA T4 GPU. Furthermore, combined with quantization, our approach can also act as a lossy JPEG codec which has obvious advantage over SOTA lossy compression methods in high bit rate (bpp > 0.9).
Introduction
JPEG remains the dominant image format on the web, powering over 75% of websites. While effective, its internal encoding—based on Discrete Cosine Transform (DCT) and Huffman coding—is not perfectly efficient. Lossless recompression aims to shrink these files further without losing any pixel data, which is critical for cloud storage and web delivery.
Traditional tools like Dropbox’s Lepton or JPEG XL provide solid recompression, but recent deep learning methods have demonstrated superior compression ratios. However, these neural models are often too slow for production use because they decode data serially. This paper introduces ML-PCM, a deep learning architecture designed to bridge this "speed gap" by enabling massive parallelism.
Multi-Level Parallel Conditional Modeling (ML-PCM)
The core innovation is the ML-PCM architecture, which breaks the serial bottleneck through several structural choices designed for GPU acceleration.
Parallel Components
- Luma/Chroma Separation: The model processes brightness (Luma) and color (Chroma) components independently. This allows a GPU to compute both simultaneously, significantly reducing overall latency.
- Pipeline Parallel Context Model (PPCM): For the Luma component, DCT coefficients are split into columns and processed in a pipeline. This allows subsequent processing steps to begin as soon as the first column is ready, rather than waiting for the entire image.
- Compressed Checkerboard Context Model (CCCM): For Chroma, a modified checkerboard pattern groups data more compactly. This reduces redundant calculations compared to standard neural context models while maintaining predictive power.
Optimization and Deployment
Beyond architectural changes, the authors utilized NVIDIA’s TensorRT and 8-bit (int8) quantization. These optimizations allow the model to run efficiently on commodity hardware like the NVIDIA T4 GPU, reaching a throughput of 57 FPS for 1080p images.
Performance and Results
The proposed method was evaluated on standard benchmarks including Kodak, DIV2K, and CLIC.
- Compression Efficiency: ML-PCM achieves the lowest bitrates across all tested datasets, saving approximately 30% of file size compared to the original JPEG. It outperforms both traditional state-of-the-art (SOTA) tools like JPEG XL and previous learned methods.
- Decoding Speed: The model is roughly 40% faster than previous learned SOTA. On an NVIDIA T4 GPU, it achieves real-time performance for high-definition content.
- Lossy Capabilities: When combined with quantization, the method can also function as a lossy codec. At high bitrates (bpp > 0.9), it actually outperforms the latest video coding standard, VVC (H.266).
Conclusion
ML-PCM demonstrates that neural networks can provide both superior compression density and the high throughput required for real-world applications. By operating in the DCT domain and leveraging multi-level parallelism, this approach offers a viable path for large-scale archival and delivery of JPEG content. Future work will focus on further optimizing the entropy coding stage, which remains a primary bottleneck in the end-to-end pipeline.
Summary updated