High-Fidelity Image Inpainting with Multimodal Guided GAN Inversion

Libo Zhang, Yongsheng Yu, Jiali Yao, Heng Fan

High-Fidelity Image Inpainting with Multimodal Guided GAN Inversion

Introduction

Image inpainting is the task of restoring missing or corrupted regions within an image. While Generative Adversarial Networks (GANs) excel at generating realistic textures, their application via GAN inversion—mapping an image back to a latent code—often encounters the "gapping" problem. This issue manifests as color shifts or semantic inconsistencies at the boundaries between original and restored pixels because the generator typically relies on a compressed latent representation rather than the raw input. MMInvertFill is a novel framework designed to bridge this gap by integrating multimodal guidance and a specialized latent architecture.

Methodology

MMInvertFill moves beyond standard RGB-to-latent mapping through several key innovations:

  1. Multimodal Guided Encoder (MGE): The encoder processes RGB data in tandem with predicted edge maps and semantic segmentation. This provides a structural "skeleton" that constrains the GAN's output to be semantically and geometrically accurate.
  2. Gated Mask-aware Attention (GMA): Utilizing Auxiliary DeNormalization (ADN), this module fuses modalities while a gating mechanism ensures the model prioritizes valid, unmasked pixels and ignores noise within the corrupted regions.
  3. $\mathcal{F}\&\mathcal{W}^+$ Latent Space: To eliminate the "gap," the authors introduce skip connections that allow the generator direct access to the corrupted input image. This forces the model to respect the original colors and textures of the unmasked areas.
  4. Soft-update Mean Latent (SML): This module prevents the encoder from producing blurry, "averaged" results by dynamically sampling diverse in-domain patterns during training, leading to sharper and more varied photorealistic details.
  5. Adaptive Contextual Bottlenecks (ACB): Stacks of dilated convolutions with dynamic weights allow the encoder to adapt its reasoning based on the size and context of the missing regions.

Experiments and Results

The framework was rigorously tested on benchmarks including CelebA-HQ (faces), Places2 (scenes), and CityScapes (urban environments). Quantitative evaluations on CelebA-HQ with 70-90% masking showed that MMInvertFill achieved an FID of 23.60, significantly outperforming the previous state-of-the-art, InvertFill (25.91).

Qualitative comparison of MMInvertFill against state-of-the-art methods across various domains, including scenes, faces, and out-of-domain statues.

Qualitatively, MMInvertFill produces seamless results even with massive corruptions. As shown in the figure above, it successfully reconstructs complex semantic features like eyes and architectural elements without the visible seams or color bleeding common in methods like pSp or ZITS. Furthermore, the model demonstrates impressive robustness on "out-of-domain" data, such as archaic portraits and statues, without requiring retraining of the generator.

Conclusion

MMInvertFill effectively addresses the gapping problem in GAN-based inpainting by anchoring hallucinations to real-world pixels through multimodal guidance and a refined latent space. While the model can still face challenges with rare "long-tail" samples or extreme global distortions in complex scenes, it sets a new standard for high-fidelity, seamless image restoration.

Summary updated

BibTeX
@article{zhang2025high,
  author = {Libo Zhang and Yongsheng Yu and Jiali Yao and Heng Fan},
  title = {{High-Fidelity Image Inpainting with Multimodal Guided GAN Inversion}},
  journal = {Int. J. Comput. Vis.},
  year = {2025},
  doi = {10.1007/s11263-025-02448-w},
}
Figure