E4S: Fine-grained Face Swapping via Editing With Regional GAN Inversion

Maomao Li, Ge Yuan, Cairong Wang, Zhian Liu, Yong Zhang +3 more
10/23/2023
cs.CV

Official code: e4s2024/E4S2024 (145 stars, MIT, last commit 2024-07-16).

Abstract

This paper proposes a novel approach to face swapping from the perspective of fine-grained facial editing, dubbed "editing for swapping" (E4S). The traditional face swapping methods rely on global feature extraction and fail to preserve the detailed source identity. In contrast, we propose a Regional GAN Inversion (RGI) method, which allows the explicit disentanglement of shape and texture. Specifically, our E4S performs face swapping in the latent space of a pretrained StyleGAN, where a multi-scale mask-guided encoder is applied to project the texture of each facial component into regional style codes and a mask-guided injection module manipulating feature maps with the style codes. Based on this disentanglement, face swapping can be simplified as style and mask swapping. Besides, due to the large lighting condition gap, transferring the source skin into the target image may lead to disharmony lighting. We propose a re-coloring network to make the swapped face maintain the target lighting condition while preserving the source skin. Further, to deal with the potential mismatch areas during mask exchange, we design a face inpainting module to refine the face shape. The extensive comparisons with state-of-the-art methods demonstrate that our E4S outperforms existing methods in preserving texture, shape, and lighting. Our implementation is available at https://github.com/e4s2024/E4S2024.

View on arXivView PDF

Code Implementations(1)

e4s2024/E4S2024Official100%
MIT

Official Implementation of 'E4S: Fine-grained Face Swapping via Editing With Regional GAN Inversion'

14518C++, CudaOct 15, 20232 years agoMIT

Similar Papers

Cite this paper

@article{li2023es,
  title  = {E4S: Fine-grained Face Swapping via Editing With Regional GAN Inversion},
  author = {Maomao Li and Ge Yuan and Cairong Wang and Zhian Liu and Yong Zhang and Yongwei Nie and Jue Wang and Dong Xu},
  year   = {2023},
  eprint = {2310.15081},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.15081v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.15081.svg)](https://codeofpaper.com/paper/2310.15081)

Discussion