E-PLE: an Algorithm for Image Inpainting

Yiqing WangImage 2013

Abstract

Gaussian mixture models are powerful tools for modeling image patch priors. This paper presents a probabilistic view of the Piecewise Linear Estimation (PLE) algorithm for image inpainting, introducing several theoretical and numerical improvements through the effective use of Gaussian mixtures and the Expectation-Maximization (EM) algorithm.

Introduction

Image inpainting involves restoring missing or corrupted regions in an image. Success depends heavily on the "prior"—a model of what natural images should look like. While the original Piecewise Linear Estimation (PLE) algorithm proved effective, it lacked statistical rigor, specifically missing "mixing weights" that define a true probability distribution. Furthermore, its reliance on synthetic initialization limited its adaptability to complex real-world textures. E-PLE (Enhanced PLE) addresses these gaps by providing a framework that learns directly from the partially observed data of the corrupted image itself.

The E-PLE Framework

E-PLE treats inpainting as a Gaussian Mixture Model (GMM) problem. It assumes that every small image patch belongs to one of $K$ Gaussian distributions, each representing specific features like edge orientations or textures.

EM for Partially Observed Data

The core innovation is the adaptation of the Expectation-Maximization (EM) algorithm to handle patches where some pixels are missing (masked). This allows the model to "learn" the best fit for a hole based on the visible pixels around it. By introducing mixing weights $w_k$, E-PLE ensures a statistically sound assignment of patches to models, allowing the likelihood of the mixture to increase over iterations.

Implementation and Initialization

Unlike its predecessor, E-PLE initializes its Gaussian models using patches from real-world natural images rather than synthetic lines. These are categorized into "flat," "multi-oriented," and "mono-oriented" (directional) models. Once a patch is classified into a specific Gaussian model, an adaptive Wiener filtering scheme (utilizing a Tikhonov regularization parameter $\xi$) is used to estimate the missing pixel values. For holes larger than the patch size (typically $8 \times 8$), the algorithm uses an iterative strategy that fills borders first, progressively treating restored pixels as "visible" data for subsequent rounds.

Experimental Evaluation and Results

The paper evaluates E-PLE against standard benchmarks like "Parrot," "Barbara," and "Frog" using various masks, including text overlays and random pixel loss ranging from 20% to 80%.

Inpainting process on the 'Parrot' image showing original, masked, and internal model assignment states.

As illustrated in Figure 6, the algorithm effectively maps corrupted patches to appropriate directional models. Quantitatively, E-PLE consistently outperforms PLE in Root Mean Square Error (RMSE). For instance, on the "Barbara" image with a 60% random mask, E-PLE achieved an RMSE of 7.9 compared to PLE's 10.6.

Qualitatively, E-PLE is particularly robust at handling artificial images. While state-of-the-art competitors like EPLL (Expected Patch Log Likelihood) often struggle with non-natural shapes, E-PLE’s ability to update its mixture components through learning allows it to reconstruct geometric shapes and text masks with higher fidelity. Additionally, due to better initialization, E-PLE often requires only a single iteration for high-quality results on natural images, making it faster than many iterative alternatives.

Conclusion

E-PLE provides a robust, statistically grounded improvement to patch-based inpainting. While primarily designed for sporadically missing pixels (like scratches or text overlays), its efficiency and adaptive nature make it a powerful tool for image restoration. Future work may explore more integrated multi-channel color handling to further enhance performance without sacrificing the algorithm's current speed advantages.

Summary updated

BibTeX
@inproceedings{wang2013e,
  author = {Yiqing Wang},
  title = {{E-PLE: an Algorithm for Image Inpainting}},
  booktitle = {Image},
  year = {2013},
  doi = {10.5201/ipol.2013.54},
}
Figure