This repository includes source code, pretrained model and a 3D dataset of paper "Landmark Detection and 3D Face Reconstruction for Caricature using a Nonlinear Parametric Model", Graphical Models (2021), http://arxiv.org/abs/2004.09190.
Authors: Hongrui Cai, Yudong Guo, Zhuang Peng and Juyong Zhang.
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).
You can download the 3D caricature dataset we constructed via Google Drive, or Baidu Drive with password: 0nk6. The 3D caricature dataset contains 7,800 2D caricatures, 2D landmarks and 3D meshes. We also attach the scipts for visualization.
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.
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:
./data
directory.Prepare pretrained model:
./model
directory.Prepare some examples:
./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{cai2021landmark,
title={Landmark detection and 3D face reconstruction for caricature using a nonlinear parametric model},
author={Cai, Hongrui and Guo, Yudong and Peng, Zhuang and Zhang, Juyong},
journal={Graphical Models},
volume={115},
pages={101103},
year={2021},
publisher={Elsevier}
}