Skip to content

HBI3-Infant facial reconstruction (Only used for BIOE6901 coursework)

Notifications You must be signed in to change notification settings

KMarshallX/HBI_Infant_Facial_Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HBI3 Premature Infant Face Reconstruction

Declaration

This repo is only for BIOE6901 HBI3 team to store, manage backend project

Installation

IMPORTANT Please make sure execute the software in Unix environment with NVidia GPU and CUDA installed.

  1. Environment setup
# Clone the code locally and install required softwares
git clone https://github.com/KMarshallX/HBI_Infant_Facial_Model.git
cd HBI_Infant_Facial_Model
conda env create -f environment.yml
source activate hbi_infant

# Install Nvdiffrast library
cd nvdiffrast
pip install .
cd .. 
  1. Load face model expressor
    Download BFM09 and Expression Basis and put the files under BFM directory
HBI_Infant_Facial_Model
│
└─── BFM
    │
    └─── 01_MorphableModel.mat
    │
    └─── Exp_Pca.bin
    |
    └─── ...
  1. Load pre-trained weights Download a pretrained model from this link and put the pretrained weights in the following structure
HBI_Infant_Facial_Model
│
└─── checkpoints
    │
    └─── <model_name>
        │
        └─── epoch_20.pth

Make inference

Put the images you are going to reconstruct facial model from under the root directory:

Deep3DFaceRecon_pytorch
│
└─── <folder_to_test_images>
    │
    └─── *.jpg/*.png

Run the script:

python test.py --name=<model_name> --epoch=20 --img_folder=<folder_to_test_images>

The results will be saved into ./checkpoints/<model_name>/results/<folder_to_test_images>

Reference

This code is based on MTCNN and Deep3DReconstruction

About

HBI3-Infant facial reconstruction (Only used for BIOE6901 coursework)

Resources

Stars

Watchers

Forks

Packages

No packages published