Skip to content

This is a project reconstructing 3D face mesh from related RGB image

Notifications You must be signed in to change notification settings

SeVEnMY/3d-face-reconstruction

Repository files navigation

3d-face-reconstruction

3D Face Reconstruction with 3DMM Face Model from RGB image

This is a project reconstructing 3D face mesh from related RGB image, with the help of Basel Face Model(BFM) and soft renderer(differantiable renderer). We present a pipeline that reconstructs a human face 3D model from a single RGB image. The pipeline includes face detection, landmark detection, regression of 3DMM model parameters, and soft rendering.

Test

  1. Make sure you have python3 and related pip3 installed.
  2. Make sure you have Anaconda3 installed.
  3. Run the following code to setup the environment:
conda env create -f environment.yml
source activate py3dface
  1. Please download our pretrained model from Google Drive.
  2. Please download the pretrained resnet50 model from Google Drive. and put it under folder ./checkpoints/init_model
  3. Please download the BFM from Google Drive. and put it as './BFM'
  4. Please install nvdiffrast from Github. and put it as './nvdiffrast'
  5. Put the model to the folder ./checkpoints/twoloss/...
  6. Put images you want to test with into the folder ./examples
  7. Run preprocessing.ipynb with all images you want to test with, and put all generated .txt files (with the same name but different postfix as images) into the folder ./examples/detections.
  8. Run:
python test.py
  1. Results will be stored in ./checkpoints/twoloss/examples

About

This is a project reconstructing 3D face mesh from related RGB image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published