Code for our paper "Unpaired Photo-to-Caricature Translation on Faces in the Wild" (arXiv:1711.10735).
@article{zheng2019unpaired,
title={Unpaired Photo-to-Caricature Translation on Faces in the Wild},
author={Zheng, Ziqiang and Chao, Wang and Yu, Zhibin and Wang, Nan and Zheng, Haiyong and Zheng, Bing},
journal={Neurocomputing},
doi={10.1016/j.neucom.2019.04.032},
year={2019}
}
- We use Miniconda3 for the basic environment. If you installed the Miniconda3 in path
Conda_Path
, please installtensorflow-gpu
using the commandConda_Path/bin/conda install -c anaconda tensorflow-gpu==1.8
. - Install dependencies by
Conda_Path/bin/pip install -r requirements.txt
(if necessary). Therequirements.txt
file is provided in this package.
├── datasets
└── demo
├── trainA
├── 000001.jpg (The traint image that you want, name does not matter)
├── 000002.jpg
└── ...
├── trainB
├── 000001.jpg (The traint image that you want, name does not matter)
├── 000002.jpg
└── ...
├── testA
├── a.jpg (The test image that you want)
├── b.png
└── ...
├── testB
├── a.jpg (The test image that you want)
├── b.png
└── ...
base.py
: train and test model ofP2C
.utils.py
: basic utils ofP2C
.
Conda_Path/bin/python base.py --phase train --dataset_dir demo --checkpoint ./checkpoint ./checkpoints/demo --sample_dir ./checkpoints/demo/sample --epoch 120 --gpu 0
Conda_Path/bin/python base.py --phase test --dataset_dir demo --checkpoint ./checkpoint ./checkpoints/demo --test_dir ./checkpoints/demo/test --gpu 0