First you have to make sure that you have all dependencies in place. You can create an anaconda environment called DRTN using
conda env create -n DRTN python=3.7 ## recommended python=3.7+
conda activate DRTN
sudo pip3 install torch torchvision
sudo pip3 install numpy scipy matplotlib
sudo pip3 install dlib
sudo pip3 install opencv-python
sudo pip3 install cython
| Data | Download Link | Description |
|---|---|---|
| train.configs | BaiduYun, 217M | The directory containing 3DMM params and filelists of training dataset |
| train_aug_120x120.zip | BaiduYun | The cropped images of augmentation training dataset |
| test.data.zip | BaiduYun | The cropped images of AFLW and ALFW-2000-3D testset |
First, compile the extension modules.
cd utils/cython
python3 setup.py build_ext -i
To generate results using a trained model, use
python3 main.py -f samples/test.jpg
To eval our DRTN , use
python benchmark.py
To train our DRTN, use
cd training
bash train_DRTN.sh
If you have any problems with the code, please list the problems you encountered in the issue area, and I will reply you soon. Thanks for the baseline work 3DDFA.