Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
root c7cd41bcdb | 1 year ago | |
---|---|---|
docs | 4 years ago | |
fsgan | 1 year ago | |
.gitignore | 1 year ago | |
LICENSE | 4 years ago | |
README.md | 1 year ago | |
ffhq_seg.ipynb | 1 year ago | |
fsgan_env.yml | 1 year ago | |
setup.py | 1 year ago |
Example video face swapping: Barack Obama to Benjamin Netanyahu, Shinzo Abe to Theresa May, and Xi Jinping to
Justin Trudeau.
This repository contains the source code for the video face swapping and face reenactment method described in the paper:
FSGAN: Subject Agnostic Face Swapping and Reenactment
International Conference on Computer Vision (ICCV), Seoul, Korea, 2019
Yuval Nirkin, Yosi Keller, Tal Hassner
Paper VideoAbstract: We present Face Swapping GAN (FSGAN) for face swapping and reenactment. Unlike previous work, FSGAN is subject agnostic and can be applied to pairs of faces without requiring training on those faces. To this end, we describe a number of technical contributions. We derive a novel recurrent neural network (RNN)–based approach for face reenactment which adjusts for both pose and expression variations and can be applied to a single image or a video sequence. For video sequences, we introduce continuous interpolation of the face views based on reenactment, Delaunay Triangulation, and barycentric coordinates. Occluded face regions are handled by a face completion network. Finally, we use a face blending network for seamless blending of the two faces while preserving target skin color and lighting conditions. This network uses a novel Poisson blending loss which combines Poisson optimization with perceptual loss. We compare our approach to existing state-of-the-art systems and show our results to be both qualitatively and quantitatively superior.
THE METHODS PROVIDED IN THIS REPOSITORY ARE NOT TO BE USED FOR MALICIOUS OR INAPPROPRIATE USE CASES.
We release this code in order to help facilitate research of technical counter-measures for detecting this
kind of forgeries. Suppressing this kind of publications will not stop their development but will only make
it more difficult to detect them.
Please note this is a work in progress, while we make every effort to improve the results of this method, not
every pair of faces can produce a high quality face swap.
git clone https://github.com/YuvalNirkin/fsgan
cd fsgan
conda env create -f fsgan_env.yml
conda activate fsgan
pip install . # Alternatively add the root directory of the repository to PYTHONPATH.
For accessing FSGAN's pretrained models and auxiliary data, please fill out
this form.
We will then send you a link to FSGAN's shared directory and download script.
python download_fsgan_models.py # From the repository root directory
@inproceedings{nirkin2019fsgan,
title={{FSGAN}: Subject agnostic face swapping and reenactment},
author={Nirkin, Yuval and Keller, Yosi and Hassner, Tal},
booktitle={Proceedings of the IEEE International Conference on Computer Vision},
pages={7184--7193},
year={2019}
}
@inproceedings{nirkin2022fsganv2,
title={{FSGANv2}: Improved Subject Agnostic Face Swapping and Reenactment},
author={Nirkin, Yuval and Keller, Yosi and Hassner, Tal},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2022},
publisher={IEEE}
}
No Description
Jupyter Notebook Python
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》