Clone the repo:
git clone https://github.com/ofnote/3d-face
cd 3d-face
- Python 3.7 (numpy, skimage, scipy, opencv)
- PyTorch >= 1.6 (pytorch3d)
- face-alignment (Optional for detecting face)
You can runThen follow the instruction to install pytorch3d.pip install -r requirements.txt
- To generate CSV file containing images paths, first specify the directory inside preprocess.py containing training images
Run
python3 -m decalib.datasets.preprocess
- Specify the dataset foldername inside train file in line 267.
- To start training
Run
python3 -m decalib.trainFromscratch.train
- DECA - Used their coarse reconstruction part for reconstructing 3d face.