TL;DR
This paper introduces the Generative Memory-guided Semantic Reasoning Model (GM-SRM) for image inpainting, which tackles the challenge of filling large corrupted regions by leveraging explicitly learned inter-image semantic priors. By pre-training a "generative memory" on a large dataset, GM-SRM can perform high-level semantic reasoning, leading to more realistic and semantically consistent inpainted images compared to existing methods.
What Problem Does This Paper Address?
Image inpainting, the task of filling in missing or corrupted parts of an image, is crucial for various applications like photo restoration and editing. While current deep learning methods, typically using encoder-decoder architectures, excel at inpainting small holes, they struggle with large corrupted areas. This limitation stems from two main issues: (1) the one-to-one mapping learned by these models can overfit to individual training examples, and (2) they fail to effectively utilize generalizable semantic knowledge that exists across similar images. The paper aims to bridge this gap by explicitly learning and applying inter-image semantic priors to improve inpainting quality, especially for challenging large corruptions.
Methods
The proposed GM-SRM model combines a standard encoder-decoder framework for pixel-level content consistency with a novel "generative memory" for high-level semantic reasoning.
- Generative Memory: This component is pre-trained on the entire training dataset using a StyleGAN-like architecture. It learns a global distribution of semantic patterns, acting as a repository of inter-image knowledge. During inpainting, the encoder's output (representing known image regions) is used to query this memory for semantically relevant features.
- Progressive Semantic Reasoning: The generative memory works collaboratively with the decoder. As the decoder progressively reconstructs the image at increasing resolutions, the generative memory provides semantic cues at each stage, ensuring that the inpainting process remains semantically consistent with the evolving image.
- Conditional Stochastic Variation: To enhance texture realism and diversity, a conditional noise mechanism is introduced. Unlike standard random noise, this approach conditions the noise generation on the features from both the encoder and decoder, ensuring that synthesized details are semantically coherent with the surrounding content.
Datasets
The paper uses three standard datasets for training and evaluation:
- Paris Street View: A dataset of street views in Paris.
- CelebA-HQ: A high-quality dataset of celebrity faces.
- Places2: A large-scale dataset containing images of various scenes.
Key Insights and Ideas
- Explicit vs. Implicit Semantic Priors: The core idea is that explicitly learning and storing inter-image semantic distributions in a "generative memory" is more effective for large-scale inpainting than implicitly learning them through a direct image-to-image mapping.
- Collaborative Reasoning: The synergistic interaction between the generative memory and the decoder, operating progressively across different resolutions, is key to achieving both semantic coherence and detailed reconstruction.
- Conditional Texture Synthesis: Introducing noise that is conditioned on the image content, rather than purely random, significantly improves the realism and semantic consistency of synthesized textures.
Key Results
- Quantitative Performance: GM-SRM consistently outperforms state-of-the-art methods across various metrics (PSNR, SSIM, NCC, LMSE, LPIPS) on Paris Street View, CelebA-HQ, and Places2 datasets, particularly for larger corruption ratios. For instance, on Paris Street View, it achieves over 1.3 dB PSNR improvement for higher corruption ratios.
- Qualitative Results: Visualizations demonstrate that GM-SRM produces more realistic, semantically coherent, and artifact-free inpainted images, especially in challenging scenarios with large missing regions. It effectively avoids blurriness and color discrepancies seen in other methods.
- User Study: A user study confirmed GM-SRM's superiority, with human subjects preferring its restored images significantly more often than those from competing methods.
Limitations and Future Work
- Computational Cost: While not explicitly detailed as a limitation, the pre-training of the generative memory and the multi-stage reasoning process likely incur significant computational costs.
- Generalizability: While the paper demonstrates strong performance on diverse datasets, further exploration of its effectiveness on highly specialized or out-of-domain images could be a future direction.
- Ablation Study: The paper includes an ablation study that systematically evaluates the contribution of each component (generative memory, conditional stochastic variation, progressive reasoning), confirming their individual importance and synergistic effect in the final GM-SRM model.
Summary updated