Accepted WACV-2020
Single Image Animation
Source Image-1 | Animation-1 | Source Image-2 | Animation-2 |
---|---|---|---|
This is the part of the implementation of "ICface: Interpretable and Controllable Face Reenactment Using GANs" (https://arxiv.org/abs/1904.01909).
The test code is released now!
✅ test_code is updated
**Note**: The implementation and results have improved with the current modifications. The codes are updated in /test_code_released_new/. The checkpoints are also updated and added. Feel free to raise an issue if you face any difficulties in running the updated files.
Prerequisites
- Python 3.5.4
- Pytorch 0.4.1
- Visdom and dominate
- Natsort
The code is tested on Ubuntu 16.04 LTS
Download the Pretrained Weights of ICface Google Drive Link.
Testing ICface
- Clone the ICface repository and change the working directory to '/test_code_released_new'
- Keep the pretrained weights inside the path: ./checkpoints/gpubatch_resnet.
- For the driving video, you can select any video file from voxceleb dataset, extract the action units in a .csv file using Openface and store the .csv file in the working folder. We have provided two such .csv files and thier corresponding driving videos.
- For the source image, we have selected images from voxceleb test set. Three exampes are given in the folder ./new_crop. More can be obtained from here. In particular the "Cropped Face Images extracted at 1fps" (7.8Gb). The test identities can be downloaded here under the data section.
- Run in terminal : python test.py --dataroot ./ --model pix2pix --which_model_netG resnet_6blocks --which_direction AtoB --dataset_mode aligned --norm batch --display_id 0 --batchSize 1 --loadSize 128 --fineSize 128 --no_flip --name gpubatch_resnet --how_many 1 --ndf 256 --ngf 128 --which_ref ./new_crop/1.png --gpu_ids 1 --csv_path 00116.csv --results_dir results_video
- The resuting video will be found in '/test_code_released_new' under the name 'movie.mp4'
If you are not using voxceleb test set
- In the python file 'image_crop.py', add your image path and run it.
- It will create a new cropped version of your image and will store in './new_crop' folder. Then follow the above steps to create youe video file.
-If you are using this implementation for your research work then please cite us as:
#Citation
@article{tripathy+kannala+rahtu,
title={ICface: Interpretable and Controllable Face Reenactment Using GANs},
author={Tripathy, Soumya and Kannala, Juho and Rahtu, Esa},
journal={arXiv preprint arXiv:1904.01909},
year={2019}
}
NOTE: Code framework is based on pix2pix