This repository includes the PyTorch code for training and evaluating the network described in Joint Voxel and Coordinate Regression for Accurate 3D Facial Landmark Localization.
- python 2.7
Clone the repository and install the dependencies mentioned above
git clone https://github.com/HongwenZhang/JVCR-3Dlandmark.git
cd JVCR-3Dlandmark
Then, you can run the demo code or train a model from stratch.
-
Download the pre-trained model (trained on 300W-LP) and put it into the
checkpoint
directory -
Run the demo code
python run_demo.py --verbose
- Prepare the training and evaluation datasets
- Download 300W-LP and AFLW3000-3D
- Create soft links to the dataset directories
ln -s /path/to/your/300W_LP data/300wLP/images
ln -s /path/to/your/aflw2000 data/aflw2000/images
- Download
.json
annotation files from here and put them intodata/300wLP
anddata/aflw2000
respectively
- Run the training code
python train.py --gpus 0 -j 4
The code is developed upon PyTorch-Pose. Thanks to the original author.