Abstract
Deep learning has significantly advanced image inpainting, yet challenges remain in handling large irregular holes and maintaining global semantic consistency. We present a two-stage "coarse-to-fine" framework that utilizes specialized region-wise convolutions to distinguish between existing and missing image regions. By integrating a non-local correlation loss to capture global dependencies, our model generates visually realistic and semantically coherent results, significantly outperforming existing state-of-the-art methods on standard benchmarks.
Introduction
Image inpainting involves reconstructing missing or corrupted parts of an image. While convolutional neural networks (CNNs) have shown promise, they often suffer from two primary issues:
- Inappropriate Weight Sharing: Standard CNNs apply identical filters to both valid pixels and missing regions, leading to artifacts like color bleeding and blurriness because the network attempts to use the same logic for reconstruction and hallucination.
- Local Receptive Fields: The local nature of convolutions makes it difficult to maintain consistency across distant parts of an image, such as repeating architectural patterns on opposite sides of a building.
This paper addresses these limitations by introducing architectural asymmetry and global statistical modeling into the inpainting pipeline.
Methodology
The proposed framework consists of a two-stage pipeline designed to progressively refine the inpainted image.
Region-wise Convolutions
To avoid the pitfalls of uniform weight sharing, the authors introduce region-wise convolutions. Guided by a mask, the operation selects between two sets of weights:
- $W$ (Existing): Optimized for reconstructing known information.
- $\hat{W}$ (Missing): Specialized in hallucinating new content based on surrounding context. This allows the network to adapt its processing logic based on the presence or absence of data at each spatial location, preventing the "averaging" effect that causes blurriness.
Non-Local Correlation Loss
To capture global context without the heavy computational cost of non-local blocks, the authors utilize a Correlation Loss ($L_c$). This loss is calculated using a Gram matrix derived from feature maps of a pre-trained VGG network. It ensures that the generated regions match the global statistical distribution and pairwise correlations of the original image, regardless of spatial distance.
Coarse-to-Fine Framework
- Stage 1 (Coarse): Focuses on inferring the basic semantic structure using region-wise convolutions and correlation loss.
- Stage 2 (Fine): Refines the initial output using a standard encoder-decoder architecture and Style Loss ($L_s$) to enhance fine textures and eliminate checkerboard artifacts.
Experiments and Results
The model was evaluated on CelebA-HQ, Places2, and Paris StreetView datasets using challenging irregular masks rather than simple square holes.
Quantitative Performance
On the Places2 dataset, the proposed method demonstrated significant improvements over competitors like EdgeConnect (EC):
- PSNR: Achieved 42.52 (0-10% mask) vs. EC's 30.32.
- FID (Fréchet Inception Distance): Reached 0.02 (0-10% mask) vs. EC's 1.38, indicating superior visual realism. The model also showed greater stability as mask sizes increased up to 60%, proving its robustness for large-scale object removal.
Qualitative Comparison
Qualitative results show that the model excels at reconstructing complex structures, such as facial features and architectural details, that remain harmonious with the rest of the image.
Conclusion
By treating missing and existing regions as distinct entities through region-wise convolutions and enforcing global consistency via correlation loss, this framework sets a new standard for irregular hole inpainting. Future work will explore scaling these techniques to higher resolutions and handling multi-modal generation to produce multiple plausible versions of a missing area.
Summary updated