TL;DR
This paper introduces a novel structure-guided image completion framework that uses both image-level and object-level semantic discriminators to generate more realistic and semantically coherent images, especially in complex scenes with large missing regions. Their approach significantly improves inpainting quality and achieves state-of-the-art results across various guided inpainting tasks, including a new fully automatic pipeline for standard inpainting.
What Problem Does This Paper Address?
Image completion, particularly for large missing regions in complex natural scenes, is a challenging task. Existing methods often struggle to generate realistic object instances and maintain a coherent semantic layout. This limitation stems from a lack of robust semantic-level constraints and mechanisms to enforce the realism of individual objects within the inpainted area. The paper aims to bridge this gap by proposing a more sophisticated discriminative framework that leverages both high-level semantic understanding and fine-grained object realism.
Methods
The core of the proposed method is a Generative Adversarial Network (GAN) framework enhanced with novel discriminators. The generator is based on the Cascaded-Modulation GAN (CM-GAN) for its strong inpainting capabilities, with the guidance map (e.g., semantic, edge, or panoptic) concatenated as an input.
The key innovations lie in the discriminators:
- Semantic Discriminator (Ds): This discriminator leverages pre-trained visual features from models like CLIP to improve semantic consistency. It uses a two-branch architecture: one branch utilizes pre-trained features, and the other extracts features from the image and condition. This allows for better understanding of high-level visual concepts.
- Object-level Discriminators (Dobj, Dobj): These discriminators focus on the realism of individual objects. They take cropped and resized object instances as input, along with their corresponding guidance maps. This allows for fine-grained discrimination of object quality at a local scale.
The training objective combines adversarial loss from these discriminators with a perceptual loss for the generator. Additionally, the paper introduces a fully automatic pipeline for standard inpainting that first uses an off-the-shelf inpainting method to generate an initial completion, then applies PanopticFCN to predict a panoptic layout, and finally uses the guided inpainting model.
Datasets
The paper uses the following datasets:
- Places2-person: A large-scale object-centric dataset derived from Places2, containing at least one person instance.
- Places2-object: Another large-scale object-centric dataset derived from Places2, containing at least one general object instance.
- COCO-Stuff: Used for training and evaluation, comprising real-world images with numerous object instances and semantic annotations.
The authors note that while COCO-Stuff provides ground truth, they used PanopticFCN for generating annotations to improve generalization.
Key Insights and Ideas
- The Importance of Hierarchical Discrimination: Simply using a standard GAN discriminator is insufficient for complex scene completion. The paper demonstrates that adding both image-level semantic and object-level discriminators progressively improves realism.
- Leveraging Pre-trained Models for Semantics: Using pre-trained visual models (like CLIP) for semantic discrimination is crucial for capturing high-level visual concepts that are hard for standard discriminators to learn.
- Object-Level Focus for Fine-Grained Realism: For realistic object generation, especially in unaligned settings, dedicated object-level discriminators that focus on cropped instances are highly effective.
- Automatic Inpainting Pipeline: The proposed automatic pipeline for standard inpainting, which combines existing inpainting methods with semantic prediction and guided inpainting, achieves state-of-the-art results, highlighting the power of their guided inpainting framework even without explicit user guidance.
- Canny Edges vs. Instance Edges: The paper found that using Canny edge maps for guided inpainting often yields better results than instance edge maps, suggesting that more general structural details can be more beneficial.
Key Results
- State-of-the-Art Performance: The proposed method achieves state-of-the-art results on various guided inpainting tasks, including segmentation-guided, edge-guided, and panoptic instance segmentation guided inpainting, on the Places2-person and COCO-Stuff datasets.
- Quantitative Improvements: For instance-guided inpainting on Places2-person, the method achieves a FID score of 2.0720, significantly outperforming baselines like CM-GAN (2.8470) and ControlNet (7.4024). Similar improvements are seen across other tasks and datasets.
- Automatic Inpainting: The fully automatic pipeline for standard inpainting also achieves state-of-the-art results, with a FID score of 4.5402 on Places2-person, significantly better than LaMa (32.9607) and CoModGAN (12.0215).
- Qualitative Improvements: Visual results consistently show more realistic object instances, better semantic coherence, and fewer artifacts compared to existing methods, especially in challenging scenarios with large holes.
- Efficiency: The GAN-based approach offers faster inference compared to diffusion-based methods like ControlNet, while maintaining competitive or superior visual quality.
Limitations and Future Work
- LPIPS Metric: The authors note that the Learned Perceptual Image Patch Similarity (LPIPS) metric might not be ideal for evaluating object-level realism, as it tends to favor overly smooth outputs. They chose not to evaluate using LPIPS in their further experiments.
- Amodal Panoptic Segmentation: The paper mentions that amodal panoptic segmentation is a growing area, and their automatic inpainting pipeline could benefit from stronger amodal panoptic completion models in the future.
- Flexibility: The trained model is flexible and supports various editing use cases like object insertion, replacement, removal, and standard inpainting. This flexibility suggests potential for further exploration in interactive editing tools.
Summary updated