Skip to main content
QUICK REVIEW

[Paper Review] End-to-end Face-swapping via Adaptive Latent Representation Learning

Chenhao Lin, Pengbin Hu|arXiv (Cornell University)|Mar 7, 2023
Face recognition and analysisComputer Science3 citations
TL;DR

This paper proposes FS-ALL, an end-to-end face-swapping framework that integrates facial region perception, adaptive latent code selection, and internal blending via a multi-task dual-space encoder and an adaptive latent codes swapping module. By eliminating external segmentation masks and enabling dynamic latent code selection, the method achieves superior identity preservation and attribute fidelity, outperforming SOTA methods on both qualitative and quantitative benchmarks.

ABSTRACT

Taking full advantage of the excellent performance of StyleGAN, style transfer-based face swapping methods have been extensively investigated recently. However, these studies require separate face segmentation and blending modules for successful face swapping, and the fixed selection of the manipulated latent code in these works is reckless, thus degrading face swapping quality, generalizability, and practicability. This paper proposes a novel and end-to-end integrated framework for high resolution and attribute preservation face swapping via Adaptive Latent Representation Learning. Specifically, we first design a multi-task dual-space face encoder by sharing the underlying feature extraction network to simultaneously complete the facial region perception and face encoding. This encoder enables us to control the face pose and attribute individually, thus enhancing the face swapping quality. Next, we propose an adaptive latent codes swapping module to adaptively learn the mapping between the facial attributes and the latent codes and select effective latent codes for improved retention of facial attributes. Finally, the initial face swapping image generated by StyleGAN2 is blended with the facial region mask generated by our encoder to address the background blur problem. Our framework integrating facial perceiving and blending into the end-to-end training and testing process can achieve high realistic face-swapping on wild faces without segmentation masks. Experimental results demonstrate the superior performance of our approach over state-of-the-art methods.

Motivation & Objective

  • To address the limitations of multi-stage face-swapping pipelines that rely on pre-trained segmentation masks and fixed latent code selection.
  • To improve identity consistency and attribute preservation (e.g., expression, skin tone) in subject-agnostic face swapping.
  • To eliminate the need for target-specific fine-tuning by enabling generalization across unseen face pairs.
  • To integrate facial perception and blending into the end-to-end training process for better realism and reduced artifacts.
  • To develop a unified framework that simultaneously performs face encoding, region perception, and adaptive latent code manipulation.

Proposed method

  • A multi-task dual-space face encoder shares a common feature extraction backbone to jointly perform facial region perception and separate encoding of pose (P) and attribute (A) latent codes.
  • The dual-space encoding enables disentangled control over face pose and attributes, improving representation robustness and swapping quality.
  • An adaptive latent codes swapping (ALS) module uses a learnable network to measure and select optimal latent codes across layers, replacing fixed selection strategies.
  • The ALS module employs a transformer-based facial attribute retainer to preserve key attributes during code fusion.
  • The framework uses StyleGAN2 as a decoder to generate initial face-swapped images from fused latent codes.
  • An internal facial blending module combines the generated image with the mask from the encoder to resolve background blur and improve realism.

Experimental results

Research questions

  • RQ1Can an end-to-end framework eliminate the need for external segmentation masks in face swapping while maintaining high realism and attribute fidelity?
  • RQ2How does adaptive selection of latent codes improve attribute preservation compared to fixed selection in GAN-based face swapping?
  • RQ3To what extent can a shared multi-task encoder improve face representation learning by jointly performing region perception and disentangled latent encoding?
  • RQ4Does integrating blending into the end-to-end training process reduce artifacts and improve background consistency?
  • RQ5How does the proposed method compare to SOTA approaches in terms of identity transfer and attribute retention on real-world face datasets?

Key findings

  • FS-ALL achieves the highest identity retrieval score (90.23%) on FaceForensics++, outperforming FaceShifter (88.46%) and DeepFake (80.54%), indicating superior identity transfer.
  • The method achieves a pose error of 3.10 and expression error of 2.84 on FaceForensics++, demonstrating strong attribute preservation despite slight trade-offs in expression fidelity.
  • The MDE component improves reconstruction quality, achieving a FID of 35.17 and a failure rate of 1.73%, outperforming baseline encoders in reconstruction success and detail preservation.
  • The ALS module enhances attribute retention, reducing expression error from 3.35 (w/o ALS) to 2.70, and improving image quality (FID from 16.61 to 15.59).
  • Qualitative results show FS-ALL successfully swaps identities even in challenging cases (e.g., occluded eyes, complex lighting), with fewer artifacts than DeepFake, FaceSwap, and FaceShifter.
  • The framework produces high-resolution face-swapped images without requiring segmentation masks or post-processing blending, achieving state-of-the-art performance in both visual quality and quantitative metrics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.