This repository includes source code, pretrained model and a testset of paper "Landmark Detection and 3D Face Reconstruction for Caricature using a Nonlinear Parametric Model", http://arxiv.org/abs/2004.09190.
Authors: Juyong Zhang, Hongrui Cai, Yudong Guo and Zhuang Peng.
Note that all of the code is protected under patent. It can be only used for research purposes. If you are interested in business purposes/for-profit use, please contact Juyong Zhang (the corresponding author, email: juyong@ustc.edu.cn).
- Add a method for computing the dynamical contour indices.
- Add a method for calculating errors.
- Add a toy example for conversion between 3D face and vertices.
- The testset is enlarged.
- The source code, pretrained model and some data from testset are released.
If you want to do some comparison with our method, you can download a testset here Google Drive, or Baidu Drive with password: 4nvs. It includes 2D caricatures, groundtruth 68 landmarks, 68 landmarks detected by our method and 3D meshes recovered by our method.
- Python 3.7
- Pytorch 1.4.0
- opencv-python 3.4.2
Clone this repository:
git clone git@github.com:Juyong/CaricatureFace.git
cd CaricatureFace
Install dependencies using Anaconda:
conda create -n cariface python=3.7
source activate cariface
pip install -r requirements.txt
Prepare related data:
- You can download related data for alogorithm here Google Drive, or Baidu Drive with password: tjps.
- Unzip downloaded files and move files into
./data
directory.
Prepare pretrained model:
- You can download pretrained model here Google Drive, or Baidu Drive with password: fukf.
- Unzip downloaded files and move files into
./model
directory.
Prepare some examples:
- You can download some examples here Google Drive, or Baidu Drive with password: unud.
- Unzip downloaded files and move files into
./exp
directory.
Within ./CaricatureFace
directory, run following command:
bash test.sh
Note: Input images must be preprocessed - crop the whole face roughly and resize to size (224, 224).
Please follow README.txt in ./toy_example
directory.
Please follow README.txt in ./update_contour
directory.
If you find this useful for your research, please cite the paper:
@article{Zhang2020Caricature,
author = {Juyong Zhang and
Hongrui Cai and
Yudong Guo and
Zhuang Peng},
title = {Landmark Detection and 3D Face Reconstruction for Caricature using a Nonlinear Parametric Model},
journal = {CoRR},
volume = {abs/2004.09190},
year = {2020}
}