Efficient Parallel Data Optimization for Homogeneous Diffusion Inpainting of 4K Images

Niklas Kämper, Vassillen Chizhov, Joachim Weickert

TL;DR

This paper introduces a novel, highly efficient framework for optimizing the data needed for homogeneous diffusion inpainting of 4K images. By developing fast, parallelizable algorithms for both spatial (mask) and tonal (pixel value) optimization, they achieve state-of-the-art inpainting quality at speeds that significantly outperform previous methods, making high-quality inpainting practical for large images.

What Problem Does This Paper Address?

Inpainting, the process of reconstructing missing image regions, is a key component in emerging image compression techniques that store only a sparse subset of pixels. Homogeneous diffusion inpainting is a popular method for this, but achieving high reconstruction quality hinges on carefully selecting which pixels to store (the mask) and what values to assign them (tonal data). Optimizing this data is computationally expensive, often much more so than the inpainting itself. Existing methods either struggle with speed, quality, or scalability to high-resolution images like 4K. This paper aims to bridge this gap by providing a fast, high-quality, and scalable data optimization framework for homogeneous diffusion inpainting.

Methods

The authors propose a two-pronged approach:

  • Spatial Optimization (Mask Generation): They extend "densification" strategies, which start with an empty mask and iteratively add pixels. Their novel approach uses a Delaunay triangulation based on the current mask pixels to partition the image. Errors are integrated over these triangles, and new pixels are added to triangles with the highest accumulated error. This is supplemented by an image-adaptive initial mask strategy that uses the Laplacian magnitude of the image to guide initial pixel placement, improving quality and reducing iterations. They also leverage the Jump Flood Algorithm (JFA) for efficient GPU-based Delaunay triangulation construction.
  • Tonal Optimization (Pixel Value Refinement): They formulate tonal optimization as a linear least squares problem to minimize the Mean Squared Error (MSE). To solve this efficiently for large images, they employ a domain decomposition method based on the Restricted Additive Schwarz (RAS) algorithm. This method breaks down the problem into smaller, local subproblems that can be solved in parallel. A key innovation here is a Voronoi-based initialization strategy, which provides a much better starting point for the optimization than traditional methods, significantly reducing the number of iterations needed.

Both spatial and tonal optimization leverage a fast, parallel Multigrid ORAS inpainting solver for computing intermediate inpainting results.

Datasets

The paper evaluates their methods on twelve representative 4K images containing a variety of textures, coarse, and fine structures. These images are described as "photos by J. Weickert." No new datasets are introduced.

Key Insights and Ideas

  • Delaunay Triangulation for Spatial Optimization: Using Delaunay triangulation as a mask-adaptive partition provides a better approximation of influence areas for isotropic operators like homogeneous diffusion compared to Voronoi tessellations, leading to higher quality masks.
  • Image-Adaptive Initialization is Crucial: Starting the mask generation with pixels placed proportionally to the image's Laplacian magnitude significantly improves PSNR, especially with fewer iterations.
  • Voronoi Initialization for Tonal Optimization: Replacing simple neighbor-based initialization with a Voronoi diagram-based approach provides a much better initial guess for tonal optimization, allowing for earlier convergence and substantial runtime savings.
  • Domain Decomposition for Scalability: Breaking down the tonal optimization problem into local subproblems is essential for handling the computational demands of 4K images and enabling efficient GPU parallelization.
  • Speed-Quality Trade-off: The authors demonstrate that their methods achieve a favorable trade-off, delivering high-quality results with runtimes that are orders of magnitude faster than previous approaches.

Key Results

  • Spatial Optimization: The Delaunay densification method outperforms Voronoi densification by approximately 0.1 dB PSNR. It achieves state-of-the-art quality, surpassing the neural approach by Schrader et al. [71] by at least 0.75 dB and other competitors by significant margins (e.g., >6 dB over the analytic approach). Runtimes are very fast, with densification taking under 0.5 seconds for 4K images.
  • Tonal Optimization: The proposed RAS solver with Voronoi initialization converges significantly faster than CGNR-based methods. It achieves a PSNR improvement of over 1 dB compared to non-tonally optimized results. Runtimes are also highly competitive, with the RAS+VI method being more than an order of magnitude faster than nested CG.
  • Overall Framework: The complete data optimization framework achieves high-quality inpainting for 4K images in under a second on a contemporary GPU, demonstrating near-ideal linear scaling with image resolution.

Limitations and Future Work

  • Limitations:
    • The paper focuses on homogeneous diffusion inpainting. While the spatial and initialization strategies are generalizable, the tonal optimization solver is specifically adapted to this operator.
  • The neural approach by Schrader et al. [71] was excluded from runtime comparisons due to high memory requirements (>20 GB), though their quality results were competitive.
  • The authors note that their current runtimes are for data optimization and do not include encoding.
  • Future Work:
    • Investigating how their spatial optimization and Voronoi initialization methods perform with other inpainting operators, particularly anisotropic nonlinear diffusion methods.
  • Exploring further improvements to these methods.
  • Extending their framework to more sophisticated operators for potentially higher compression quality.

Summary updated

BibTeX
@article{kamper2025efficient,
  author = {Niklas Kämper and Vassillen Chizhov and Joachim Weickert},
  title = {{Efficient Parallel Data Optimization for Homogeneous Diffusion Inpainting of 4K Images}},
  journal = {SIAM J. Imaging Sci.},
  year = {2025},
  doi = {10.1137/23m1623975},
}
Figure