All Projects → wywu → Reenactgan

wywu / Reenactgan

[ECCV 2018] ReenactGAN: Learning to Reenact Faces via Boundary Transfer

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Reenactgan

Advertorch
A Toolbox for Adversarial Robustness Research
Stars: ✭ 826 (+461.9%)
Mutual labels:  adversarial-learning
Ali Pytorch
PyTorch implementation of Adversarially Learned Inference (BiGAN).
Stars: ✭ 61 (-58.5%)
Mutual labels:  adversarial-learning
Gpnd
Generative Probabilistic Novelty Detection with Adversarial Autoencoders
Stars: ✭ 112 (-23.81%)
Mutual labels:  adversarial-learning
Lab
[CVPR 2018] Look at Boundary: A Boundary-Aware Face Alignment Algorithm
Stars: ✭ 956 (+550.34%)
Mutual labels:  adversarial-learning
Handwriting recogition using adversarial learning
[CVPR 2019] "Handwriting Recognition in Low-resource Scripts using Adversarial Learning ”, IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019.
Stars: ✭ 52 (-64.63%)
Mutual labels:  adversarial-learning
Virtual Adversarial Training
Pytorch implementation of Virtual Adversarial Training
Stars: ✭ 94 (-36.05%)
Mutual labels:  adversarial-learning
Neural Structured Learning
Training neural models with structured signals.
Stars: ✭ 790 (+437.41%)
Mutual labels:  adversarial-learning
Unsupervised detection
An Unsupervised Learning Framework for Moving Object Detection From Videos
Stars: ✭ 139 (-5.44%)
Mutual labels:  adversarial-learning
Adversarial Explainable Ai
💡 A curated list of adversarial attacks on model explanations
Stars: ✭ 56 (-61.9%)
Mutual labels:  adversarial-learning
Pytorch Adversarial box
PyTorch library for adversarial attack and training
Stars: ✭ 104 (-29.25%)
Mutual labels:  adversarial-learning
A2cl Pt
Adversarial Background-Aware Loss for Weakly-supervised Temporal Activity Localization (ECCV 2020)
Stars: ✭ 34 (-76.87%)
Mutual labels:  adversarial-learning
Gvb
Code of Gradually Vanishing Bridge for Adversarial Domain Adaptation (CVPR2020)
Stars: ✭ 52 (-64.63%)
Mutual labels:  adversarial-learning
Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (-34.01%)
Mutual labels:  adversarial-learning
Advanced Gradient Obfuscating
Take further steps in the arms race of adversarial examples with only preprocessing.
Stars: ✭ 28 (-80.95%)
Mutual labels:  adversarial-learning
Arel
Code for the ACL paper "No Metrics Are Perfect: Adversarial Reward Learning for Visual Storytelling"
Stars: ✭ 124 (-15.65%)
Mutual labels:  adversarial-learning
Taadpapers
Must-read Papers on Textual Adversarial Attack and Defense
Stars: ✭ 800 (+444.22%)
Mutual labels:  adversarial-learning
Pose Adv Aug
Code for "Jointly Optimize Data Augmentation and Network Training: Adversarial Data Augmentation in Human Pose Estimation" (CVPR 2018)
Stars: ✭ 83 (-43.54%)
Mutual labels:  adversarial-learning
Segan
SegAN: Semantic Segmentation with Adversarial Learning
Stars: ✭ 143 (-2.72%)
Mutual labels:  adversarial-learning
Free adv train
Official TensorFlow Implementation of Adversarial Training for Free! which trains robust models at no extra cost compared to natural training.
Stars: ✭ 127 (-13.61%)
Mutual labels:  adversarial-learning
Zerospeech Tts Without T
A Pytorch implementation for the ZeroSpeech 2019 challenge.
Stars: ✭ 100 (-31.97%)
Mutual labels:  adversarial-learning

ReenactGAN: Learning to Reenact Faces via Boundary Transfer

Created by Wayne Wu, Yunxuan Zhang and Ren Li.

We present a novel learning-based framework for face reenactment. The proposed method, known as ReenactGAN, is capable of transferring facial movements and expressions from an arbitrary person’s monocular video input to a target person’s video. Instead of performing a direct transfer in the pixel space, which could result in structural artifacts, we first map the source face onto a boundary latent space. A transformer is subsequently used to adapt the source face’s boundary to the target’s boundary. Finally, a target-specific decoder is used to generate the reenacted target face. Thanks to the effective and reliable boundary-based transfer, our method can perform photo-realistic face reenactment. In addition, ReenactGAN is appealing in that the whole reenactment process is purely feed-forward, and thus the reenactment process can run in real-time.

Prerequisites

  • Linux
  • Python 3
  • PyTorch 1.1.0 + CUDA 8.0 (Other versions may also work.)
  • Dominate

Getting Started

Installing

Clone this repo:

git clone ...
cd ReenactGAN

Training

The bounday encoder is trained on WFLW and Helen dataset, and both of the boundary transformer and decoder are trained on CelebV Dataset. The training of the encoder requires a huge amount of time, so you can get the pretrained encoder at ./pretrained_models/v8_net_boundary_detection.pth.

To train the boundary transformer, run

sh script/train_Transformer.sh

You need to take care of the arguments --root_dir and --which_target. --root_dir refers to the directory of the dataset, and --which_target refers to which person to be the target

0: Emmanuel_Macron
1: Kathleen
2: Jack_Ma
3: Theresa_May
4: Donald_Trump

To train the decoder, run

sh script/train_Decoder.sh

Also, you need to take care of the value of --root_dir, which refers to the directory of the target person.

Testing

To test the model, run

sh script/move_models.sh ./checkpoints/Transformer_2019-xx-xx_xx-xx-xx/G_BA_xx.pth ./checkpoints/Decoder_2019-xx-xx_xx-xx-xx/xx_net_G.pth trump
sh script/test.sh

The images used for testing is at ./test_imgs/samples/image, and the text file, ./test_imgs/samples/images_list.txt, contains the list of these images. After the testing, you will get a floder named results, which contains the images of the real and reenacted faces, the boundaries and the transformed boundaries of the real faces. Here are some results.

You can get our trained models from Decoder and Transformer.

Citation

If you find ReenactGAN helpful for your research, please cite:

inproceedings{wayne2018reenactgan,
 author = {Wu, Wayne and Zhang, Yunxuan and Li, Cheng and Qian, Chen and Loy, Chen Change},
 title = {ReenactGAN: Learning to Reenact Faces via Boundary Transfer},
 booktitle = {ECCV},
 month = September,
 year = {2018}
} 

Questions

Please contact [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].