Official pytorch implementation of the paper "FReeNet: Multi-Identity Face Reenactment, CVPR'20".
This code has been developed under Python3.7
, PyTorch 1.5.1
and CUDA 10.1
on Ubuntu 16.04
.
# Install python3 packages
pip3 install -r requirements.txt
- Download RaFD dataset to
datasets/RaFD
. - Use Face++ API to extract the landmark with 106 points for each face, and save corresponding information to
landmakr.txt
, e.g.datasets/RaFD/RaFD90/landmark.txt
.
- Preprocess RaFD dataset.
> Split RaFD dataset to different dirs based on angle, e.g. RaFD45/image, RaFD90/image, RaFD135/image. python3 1-preprocess.py
-
Train
ULC
model.cd src/ULC python3 train.py --data RaFD --name RaFD --save_every 10 --every 60 --epochs 200 # for RaFD dataset
-
Test
ULC
model.cd src/ULC python3 test.py --data RaFD --name RaFD --save_every 10 --every 60 --epochs 200 --resume # for RaFD dataset
-
Train
GAG
model.cd src python3 train.py --name RaFD-08-21 --gpu_ids 0 --model landmark_L64_Tri --netG resnet_9blocks_cat --dataset_mode RaFD90L64Tri --batch_size 3 # for RaFD dataset
-
Test
GAG
model.cd src python3 test_image.py --name RaFD-08-21 --gpu_ids 0 --model landmark_L64_Tri --netG resnet_9blocks_cat --dataset_mode RaFD90L64Tri # for RaFD dataset
If our work is useful for your research, please consider citing:
@inproceedings{zhang2020freenet,
title={FReeNet: Multi-Identity Face Reenactment},
author={Zhang, Jiangning and Zeng, Xianfang and Wang, Mengmeng and Pan, Yusu and Liu, Liang and Liu, Yong and Ding, Yu and Fan, Changjie},
booktitle={CVPR},
pages={5326--5335},
year={2020}
}
We thank for the source code from the great work pytorch-CycleGAN-and-pix2pix.