Abstract
Image inpainting refers to the restoration of an image with missing regions in a way that is not detectable by the observer. The inpainting regions can be of any size and shape. This is an ill-posed inverse problem that does not have a unique solution. In this work, we focus on learning-based image completion methods for multiple and diverse inpainting which goal is to provide a set of distinct solutions for a given damaged image. These methods capitalize on the probabilistic nature of certain generative models to sample various solutions that coherently restore the missing content. Along the chapter, we will analyze the underlying theory and analyze the recent proposals for multiple inpainting. To investigate the pros and cons of each method, we present quantitative and qualitative comparisons, on common datasets, regarding both the quality and the diversity of the set of inpainted solutions. Our analysis allows us to identify the most successful generative strategies in both inpainting quality and inpainting diversity. This task is closely related to the learning of an accurate probability distribution of images. Depending on the dataset in use, the challenges that entail the training of such a model will be discussed through the analysis.
Introduction
Image inpainting is fundamentally an "ill-posed" problem—there is rarely a single correct way to fill a missing region in a photograph. Traditional image inpainting focused on reconstructing a single ground truth, but when large portions of an image are missing (such as half a face or a complex landscape), there are infinitely many valid ways to complete the scene. Single-output models often produce "blurry" averages or fail to capture the inherent uncertainty of the task.
This analysis addresses the challenge of Multiple and Diverse Image Inpainting. The objective is to develop models that generate a set of distinct, high-quality solutions. The core difficulty lies in balancing two competing needs: realism (ensuring the result looks like a real photo) and diversity (ensuring the different results are meaningfully distinct from one another).
Methodological Framework
The paper categorizes and analyzes several state-of-the-art deep learning architectures based on their underlying generative theory. These methods leverage different probabilistic frameworks to sample diverse solutions.
- Variational Autoencoders (VAEs): Models like PIC and UCTGAN use a probabilistic latent space to sample different solutions. While efficient, they often struggle with high-frequency detail.
- Generative Adversarial Networks (GANs): Models such as PiiGAN and PD-GAN focus on high-frequency realism by utilizing a discriminator network to enforce visual plausibility.
- Autoregressive & VQ-VAE Models: Specifically DSI-VQVAE, which uses Vector Quantization to discretize the image into "tokens" and predicts them sequentially, effectively disentangling global structure from local texture.
- Image Transformers: Models like ICT and BAT leverage self-attention to capture long-range dependencies. This allows the model to understand the "global" context of an image better than standard convolutional networks.
A recurring "winning" strategy across these methods is a two-stage approach: first, generating a low-resolution "structural" map (where the diversity is introduced), and second, using a deterministic CNN to apply texture to that structure at high resolution.
Experimental Setup
The methods were evaluated on four standard computer vision benchmarks to test their performance across varying levels of complexity:
- CelebA-HQ: High-quality portraits with relatively low structural diversity.
- FFHQ: A diverse face dataset used specifically for testing the ICT model.
- Places2: Complex outdoor and indoor scenes requiring high structural diversity.
- ImageNet: A massive dataset of varied objects and animals, representing the highest level of difficulty for learning accurate probability distributions.
Testing involved various mask shapes, including center holes, random regular blocks, and irregular "Pconv" streaks.
Key Insights and Results
The Power of Global Context
Transformers (BAT, ICT) and Autoregressive models (DSI-VQVAE) outperform pure CNNs because they possess a "global receptive field." A Transformer can analyze a pixel on the far left to determine the appropriate content for a hole on the far right, which is crucial for maintaining symmetry, such as matching a left eye to a visible right eye.
The Complexity vs. Quality Trade-off
As datasets become more complex (e.g., moving from CelebA to ImageNet), diversity naturally increases because the space of plausible solutions is larger. However, overall quality often drops as models struggle to learn the underlying distribution of highly varied scenes.
Speed vs. Quality Gap
There is a significant disparity in inference time. VAE-based models like PIC are nearly 100x faster than Transformers, generating results in approximately 0.4 seconds. In contrast, DSI-VQVAE takes 55 seconds and ICT takes 43 seconds. This makes the highest-quality methods currently prohibitive for real-time applications.
Top Performers
BAT (Transformer-based) and DSI-VQVAE (VQ-VAE/Autoregressive) generally achieved the best balance of realism (measured by FID) and diversity (measured by LPIPS). Qualitatively, Transformers were notably better at reconstructing semantic features, like eyes or architectural lines, which CNN-based VAEs often distorted.
Conclusion and Future Work
While generative models have made significant strides in producing diverse inpainting results, two major hurdles remain. First, inference latency in Autoregressive and Transformer models must be reduced for practical adoption. Second, the "ImageNet" Gap persists; learning an accurate probability distribution for the vast variety of real-world objects remains an open challenge. Finally, the authors suggest that current metrics like PSNR or SSIM are insufficient for measuring "plausibility," highlighting a need for automated metrics that align more closely with human visual judgment.
Summary updated