NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

JPEG Meets PDE-based Image Compression

Sarah Andris, Joachim Weickert, Tobias Alt, Pascal Peter

TL;DR

This paper introduces B-EED, a hybrid image codec that combines the industry-standard JPEG format with advanced Partial Differential Equation (PDE)-based inpainting. By strategically discarding JPEG blocks in smooth regions and reconstructing them using edge-enhancing diffusion, the authors achieve significantly better compression ratios and visual quality than standard JPEG alone.

What Problem Does This Paper Address?

Lossy image compression generally falls into two camps: transform-based (like JPEG, which uses the Discrete Cosine Transform) and inpainting-based (which stores a few "seed" pixels and fills in the rest using mathematical models).

JPEG is excellent at capturing busy textures but struggles with smooth gradients, often producing ugly "blocking artifacts" at high compression ratios. Conversely, PDE-based inpainting—specifically Edge-Enhancing Diffusion (EED)—is brilliant at reconstructing smooth surfaces and sharp edges from very little data, but it fails miserably on complex textures.

Despite being perfectly complementary, these two approaches are rarely combined. Furthermore, most PDE methods require storing the exact coordinates of individual pixels, which creates a high "storage overhead" for the mask. The authors set out to bridge this gap by creating a hybrid system that uses JPEG blocks as the "known data" for a PDE reconstructor.

Methods

The proposed codec, B-EED (Block-based EED), follows a clever "remove and repair" pipeline:

  1. Initial Compression: The image is first compressed using standard JPEG, which divides the image into $8 \times 8$ pixel blocks.
  2. Probabilistic Sparsification: To save space, the algorithm identifies blocks that can be safely deleted. It randomly removes a subset of blocks, performs an EED inpainting to fill them back in, and checks the error. Blocks that cause the highest reconstruction error are "important" and are kept; the others are discarded.
  3. Nonlocal Block Exchange (NLBE): This is a refinement step. The algorithm tries swapping discarded blocks with kept ones to see if the overall reconstruction quality improves, ensuring the final selection is near-optimal.
  4. Reconstruction: The decoder receives the kept JPEG blocks and a "block mask" (a simple bitstream indicating which blocks are missing). It then runs a global EED inpainting process. EED is an anisotropic diffusion process—it smooths the image along edges but prevents smoothing across them, preserving sharpness.

Datasets

The authors evaluated their method using:

  • The Kodak Lossless True Color Image Suite: A standard benchmark in image processing containing 24 high-quality natural images.
  • Synthetic Test Images: Specifically designed simple geometric shapes used to analyze which features (like corners or edges) the algorithm prioritizes.

Key Insights and Ideas

  • Corners are the "Secret Sauce": In a fascinating experiment with a simple square-in-a-square image, the sparsification process automatically chose to keep only the blocks containing corners. This provides empirical proof for a long-standing theory in the PDE community: corner information is the most critical data for high-quality image reconstruction.
  • Region-based vs. Pixel-based: This is the first PDE-based codec to use regions (blocks) rather than individual pixels as known data. This allows the codec to leverage existing, highly optimized libraries like libjpeg for the "heavy lifting" of texture compression.
  • Smoothing the Background: By removing blocks in homogeneous areas (like a clear sky), B-EED effectively replaces JPEG’s blocky artifacts with the mathematically smooth gradients of a diffusion process.

Key Results

  • Outperforming JPEG: B-EED consistently beat standard JPEG across various compression ratios. For example, on a natural image of a parrot (Image 23), B-EED achieved a 31.4 dB PSNR at a 111:1 compression ratio, while standard JPEG only managed 27.8 dB—a massive perceptual difference.
  • Visual Quality: Qualitatively, B-EED eliminates the "staircase" blocking artifacts common in JPEG. It produces images that look much more natural to the human eye, especially in out-of-focus backgrounds.
  • Efficiency: While slightly slower than pure JPEG, B-EED is roughly 10 times faster to optimize than previous state-of-the-art PDE codecs (like R-EED-LP), making it a much more viable candidate for real-world applications.

Limitations and Future Work

The primary limitation is the encoding time. Because the sparsification process requires multiple "test" inpaintings to see which blocks are important, the initial compression is computationally expensive compared to the near-instantaneous speed of standard JPEG.

The authors suggest that future work could involve integrating these hybrid ideas into more modern video and image standards like H.264/AVC or H.265/HEVC. They also note that more sophisticated "data selection" strategies—perhaps using machine learning to predict which blocks are important without iterative testing—could further reduce encoding times.

Summary updated

BibTeX
@inproceedings{andris2021jpeg,
  author = {Sarah Andris and Joachim Weickert and Tobias Alt and Pascal Peter},
  title = {{JPEG Meets PDE-based Image Compression}},
  booktitle = {PCS},
  year = {2021},
  url = {https://openreview.net/forum?id=OVRaV2cFUoV},
}

Loading related content...

Figure