TL;DR
This paper introduces a novel one-stage framework for face inpainting that allows for precise, independent control over both identity and texture using a reference image. By decoupling high-level identity from low-level component textures and employing specialized injection modules, the method produces highly realistic results that remain faithful to both the reference guidance and the original image context.
What Problem Does This Paper Address?
Image inpainting—filling in missing pixels—is inherently "ill-posed" because a single corrupted image can have countless plausible completions. In the context of human faces, this lack of control is problematic; generative models might produce a "realistic" face that looks nothing like the intended person.
While "reference-guided" methods exist, they face significant hurdles. Some only preserve identity loosely, while others that use simple concatenation often produce "incongruous" results due to differences in pose or lighting between the reference and the target. Furthermore, most existing methods focus solely on high-level identity, ignoring the fine-grained textures (like the specific look of an eye or lip) that make a face unique. This paper aims to provide a unified, one-stage solution for large-scale face inpainting with dual control over identity and texture.
Methods
The authors propose a dual control one-stage framework (illustrated in Figure 2d) that breaks down the reference image into two distinct streams:
- Identity Control via Half-AdaIN: Standard Adaptive Instance Normalization (AdaIN) is great for style transfer but often "washes away" the original style of the unmasked regions in an inpainting task. The authors propose Half-AdaIN, which splits feature maps in half: one half receives the identity injection from the reference, while the other half bypasses the operation to preserve the original contextual style and ensure coherence with the known pixels.
- Texture Control via CWSI: To handle local details, they developed the Component-Wise Style Injector (CWSI). This module uses an internal segmentation branch to locate five key facial regions (eyes, eyebrows, and lips). It then injects specific "style codes" extracted from the corresponding regions of the reference image directly into those locations.
- Three-Mode Training (TMT): Training these modules is difficult because ground-truth segmentation masks often don't align perfectly with generated content during the learning process. The authors introduce TMT, which alternates between standard inpainting, a "segmentation mode" to sharpen the internal parser, and a "style extracting mode" to focus on facial component details.
Datasets
- Celeb-ID: A refined version of the Celeb-ID dataset, manually cleaned to remove low-quality, blurred, or occluded photos. It contains 94,770 images across 16,259 identities.
- CelebA: Used for cross-dataset evaluation to demonstrate the model's generalization capabilities.
Key Insights and Ideas
- Decoupling is Essential: By separating identity (which dictates global structure and shape) from texture (which dictates local component-aware details), the model gains the flexibility to use different reference images for different aspects of the face.
- Context Preservation: The "Half-AdaIN" module is a simple but clever realization that inpainting requires a balance between external guidance and internal consistency. Completely overriding feature statistics with a reference vector destroys the "known" parts of the image.
- Online Segmentation: Rather than relying on static masks, the model predicts its own segmentation maps during the generation process. This ensures that texture injection happens exactly where the features are being synthesized, even if the generated face shifts slightly from the ground truth.
Key Results
The proposed method consistently outperformed state-of-the-art baselines (including ICT, CoMod, and SwapInpaint) across various metrics:
- Quality: Achieved a significantly lower FID (Frechet Inception Distance), indicating higher image realism. For a 20% mask rate, the model scored 5.75 compared to the next best baseline's 7.06.
- Identity Preservation: Showed superior ID Retrieval accuracy (IDR), meaning the inpainted faces were much easier for a separate recognition model to correctly identify as the reference person.
- Qualitative Superiority: As seen in Figure 5, the model avoids the "style inconsistency" (highlighted by turquoise lines in the paper) that plagues other methods, producing eyes and lips that match the reference's texture perfectly.
Limitations and Future Work
The primary limitation acknowledged by the authors is extreme poses. Because the majority of high-quality training data consists of relatively frontal faces, the model struggles to plausibly inpaint faces at sharp angles. Future work will likely involve expanding the dataset diversity or developing more robust geometric priors to handle these complex viewpoints.
Summary updated