Reference Guided Face Component Editing

Qiyao Deng, Jie Cao, Yunfan Liu, Zhenhua Chai, Qi Li, Zhenan Sun

Abstract

The r-FACE (Reference-guided FAce Component Editing) framework introduces a novel approach to facial attribute manipulation by allowing users to swap specific facial features—such as eyes, nose, or mouth—from a reference photograph onto a target portrait. By utilizing an example-guided attention module, r-FACE overcomes the limitations of traditional text-based or sketch-based editing, enabling the precise transfer of complex geometric shapes and styles while maintaining the natural appearance of the source face.

Introduction

Face editing has become a popular task in computer vision, yet existing methods often struggle to balance ease of use with precise control. Traditional approaches typically fall into two categories: label-conditioned methods, which lack geometric precision, and geometry-guided methods, which require laborious manual sketches. r-FACE addresses these challenges by treating face editing as a reference-guided inpainting problem, allowing for high-fidelity feature transfer using only "rough" masks.

Methodology

The r-FACE architecture is designed as a dual-stream network consisting of an Inpainting Network ($G_i$) and a Reference Embedding Network ($E_r$).

Example-guided Attention Module

The core innovation of r-FACE is the Example-guided Attention Module. Unlike standard inpainting that relies solely on surrounding context, this module calculates a self-attention map from the source image and fuses it with high-level semantic features extracted from the reference image. This "example-guided flow" ensures that the transferred component is both geometrically aligned and stylistically consistent with the source face.

Training Objectives

The model is trained using a combination of loss functions to ensure structural and visual fidelity:

  • Contextual Loss: Ensures the generated component matches the specific shape of the reference.
  • Style and Perceptual Losses: Maintain consistency in skin tone and texture with the source image.
  • Adversarial Loss (LSGAN): Enhances the photo-realism of the final output.

Experiments and Results

The researchers evaluated r-FACE using the CelebAMask-HQ dataset, simulating real-world usage by employing dilated "rough" masks.

The r-FACE pipeline demonstrates the transfer of specific facial components (eyes and mouth) from a reference image to a source image, producing a coherent generated result.

Quantitative Performance

r-FACE achieved a Fréchet Inception Distance (FID) of 5.81, outperforming established benchmarks like AttGAN (6.28) and ELEGANT (15.97). This metric highlights the superior image quality and diversity of the r-FACE outputs.

Qualitative Analysis

Visual comparisons reveal that r-FACE produces more significant and accurate geometric changes than label-based methods. Furthermore, it avoids common artifacts found in manual editing, such as "ghosting" or color mismatches at the boundaries of edited regions. The system also demonstrates robust performance in multi-modal editing, successfully swapping multiple components simultaneously.

Conclusion and Future Work

r-FACE provides a powerful and intuitive tool for precise facial component editing. By decoupling shape from global identity markers, it allows for realistic feature transfer without requiring artistic expertise. Future research will focus on improving robustness against extreme head poses and minimizing unintended identity shifts during the editing process.

Summary updated

BibTeX
@inproceedings{deng2020reference,
  author = {Qiyao Deng and Jie Cao and Yunfan Liu and Zhenhua Chai and Qi Li and Zhenan Sun},
  title = {{Reference Guided Face Component Editing}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.24963/ijcai.2020/70},
}
Figure