Introduction
Language-guided image inpainting is the task of filling missing or "defective" regions of an image based on textual descriptions. While autoregressive models have shown promise, they often suffer from receptive spreading and information loss. Receptive spreading occurs when defective pixels "pollute" the features of healthy regions during encoding, leading to artifacts. Information loss happens when the encoding process fails to preserve fine-grained details of the original non-defective areas. NÜWA-LIP addresses these challenges through a novel "defect-free" architecture that decouples defective regions from the feature extraction process.
Architecture
The NÜWA-LIP framework consists of two core components: the Defect-Free VQGAN (DF-VQGAN) and the Multi-Perspective Sequence-to-Sequence (MP-S2S) model.
Defect-Free VQGAN (DF-VQGAN)
The DF-VQGAN serves as the backbone for image reconstruction. It introduces two key mechanisms to mitigate feature pollution and detail loss:
- Relative Estimation: Standard normalization layers often incorporate masked regions into statistics, skewing feature distributions. DF-VQGAN uses mask-aware normalization, calculating mean and variance exclusively from non-defective pixels.
- Symmetrical Connections: To preserve the integrity of healthy regions, symmetrical connections pass information directly from the encoder to the decoder, "replenishing" details that might be lost during downsampling.
Multi-Perspective Sequence-to-Sequence (MP-S2S)
The MP-S2S model acts as the predictive "brain," determining the content of missing regions based on text. It encodes input from three distinct perspectives:
- Language: Textual prompts are processed via a BERT-like encoder.
- Low-level Pixels: Raw image patches are encoded to capture textures and edges.
- High-level Tokens: Quantized visual tokens from the DF-VQGAN provide global structural context.
By combining these perspectives, the model gains a robust understanding of both local texture and global semantic context.
Experimental Evaluation
The authors introduced three new benchmarks—MaskCOCO, MaskFlickr, and MaskVG—derived from existing datasets to evaluate performance across varying mask ratios and shapes.
Key Results
NÜWA-LIP demonstrates superior performance over strong baselines like GLIDE and the original NÜWA:
- FID Scores: On MaskCOCO, NÜWA-LIP achieved an FID of 12.0 (improving to 10.5 after fine-tuning), significantly better than GLIDE (13.5) and NÜWA (21.4).
- Reconstruction Efficiency: In "oracle" tests, DF-VQGAN achieved an FID of 0.80, compared to 2.04 for standard VQGAN, proving its superior ability to maintain image identity.
- Human Evaluation: Human testers preferred NÜWA-LIP's results in over 80% of cases regarding both visual quality and semantic alignment with text.
Conclusion
NÜWA-LIP establishes a new state-of-the-art for language-guided inpainting by explicitly isolating defective regions within the model architecture. By combining relative estimation with multi-perspective encoding, the system ensures that healthy regions remain intact while missing areas are filled with photorealistic, contextually relevant content. While computationally intensive to train, the "defect-free" principles introduced here offer a promising path for future generative models.
Summary updated