[Paper Review] Reference Guided Image Inpainting using Facial Attributes
This paper proposes a reference-guided image inpainting method that uses facial attributes from a single reference image to guide realistic face completion in masked input images. By integrating learnable bidirectional attention maps and a novel attribute constraint loss with MS-SSIM, the model achieves superior performance in preserving facial structure and generating diverse, plausible outputs, outperforming state-of-the-art methods on CelebA-HQ.
Image inpainting is a technique of completing missing pixels such as occluded region restoration, distracting objects removal, and facial completion. Among these inpainting tasks, facial completion algorithm performs face inpainting according to the user direction. Existing approaches require delicate and well controlled input by the user, thus it is difficult for an average user to provide the guidance sufficiently accurate for the algorithm to generate desired results. To overcome this limitation, we propose an alternative user-guided inpainting architecture that manipulates facial attributes using a single reference image as the guide. Our end-to-end model consists of attribute extractors for accurate reference image attribute transfer and an inpainting model to map the attributes realistically and accurately to generated images. We customize MS-SSIM loss and learnable bidirectional attention maps in which importance structures remain intact even with irregular shaped masks. Based on our evaluation using the publicly available dataset CelebA-HQ, we demonstrate that the proposed method delivers superior performance compared to some state-of-the-art methods specialized in inpainting tasks.
Motivation & Objective
- To address the challenge of user-guided facial image inpainting where precise user input is difficult for average users.
- To simplify user guidance by using a single reference image to transfer facial attributes to masked regions.
- To improve facial structure consistency and realism in inpainted images despite irregular masks.
- To generate diverse, plausible face completions by manipulating reference attributes across different degrees.
- To achieve end-to-end training with attribute consistency and structural fidelity using MS-SSIM and learnable attention.
Proposed method
- The model uses an end-to-end architecture with attribute extractors to extract facial attributes (e.g., gender, age, glasses) from a reference image.
- A learnable bidirectional attention map (LBAM) is applied in each layer to enable effective feature fusion across irregularly shaped masks.
- An attribute constraint loss minimizes the difference between the reference image’s attributes and the generated image’s attributes to ensure faithful transfer.
- Multi-scale structural similarity (MS-SSIM) loss is used to preserve facial structure and texture details during training.
- The model is trained on the CelebA-HQ dataset with facial attribute annotations, using perceptual and style losses to enhance realism.
- The framework supports pluralistic generation by randomly sampling attribute values from the reference image, enabling diverse outputs from a single input.

Experimental results
Research questions
- RQ1Can a single reference image effectively guide facial inpainting without requiring precise user annotations?
- RQ2How well can attribute transfer from a reference image preserve facial structure and identity in the inpainted region?
- RQ3Does the integration of MS-SSIM and attribute constraint loss improve structural consistency and realism compared to baseline methods?
- RQ4Can the model generate diverse, plausible face completions by varying attribute values from the reference image?
- RQ5How does the proposed method perform quantitatively against state-of-the-art inpainting models on standard metrics?
Key findings
- The proposed method achieved the best SSIM score of 0.833 on the Quickdraw irregular mask benchmark, outperforming PConv (0.772) and EC (0.817).
- On the 10-20% mask size, the model achieved the lowest FID score of 25.65, surpassing LBAM (27.63) and EC (27.49).
- For the 40-50% mask size, the model maintained an FID of 63.75, significantly lower than PConv (207.3) and EC (64.40), indicating robustness to large holes.
- The LPIPS score of 0.042 on Quickdraw masks was the lowest among all methods, indicating higher perceptual similarity to ground truth.
- Abllation studies confirmed that MS-SSIM loss is critical for preserving facial structure, while perceptual and style losses reduce blurriness and enhance texture detail.
- The model successfully generated diverse, realistic face completions by manipulating attributes from positive to negative extremes, demonstrating effective attribute control.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.