├── result.jpg ├── .gitmodules └── README.md /result.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zengxianyu/facepf/HEAD/result.jpg -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "photometric_optimization"] 2 | path = photometric_optimization 3 | url = https://github.com/zengxianyu/photometric_optimization 4 | branch = master 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # facepf 2 | A python implementation of the face profiling described in the 3DDFA paper. 3 | The older version of this implementation can be found in the branch ``face3d". 4 | Then I migrate everything to FLAME[2] face model as I found it's easy to obtain and their code to fit 2d landmarks performs well. 5 | 6 | ## Usage 7 | 1. Install required envs the same as in [2] or following [there](https://github.com/zengxianyu/photometric_optimization) 8 | 2. add [my folk of [2]](https://github.com/zengxianyu/photometric_optimization) as a submodule 9 | ``` 10 | git clone https://github.com/zengxianyu/facepf.git 11 | cd facepf 12 | git submodule init 13 | git submodule update 14 | ``` 15 | 3. run the script (you may change the angles in line 81 to get the result after rotation of desired angles) 16 | ``` 17 | cd photometric_optimization 18 | python image_renderer.py 19 | ``` 20 | 21 | ## How to get the npy file 22 | Following [there](https://github.com/zengxianyu/photometric_optimization) 23 | 24 | ## Result 25 | Input image and output after inplane rotation: 26 | 27 | ![](https://raw.githubusercontent.com/zengxianyu/facepf/master/result.jpg) 28 | 29 | ## Reference 30 | [1] 3DDFA. https://github.com/cleardusk/3DDFA/issues/182 31 | 32 | [2] FLAME photometric optimization. https://github.com/HavenFeng/photometric_optimization 33 | --------------------------------------------------------------------------------