This repository provides a MATLAB implementation of the CVPR 2019 Paper - Combining 3D Morphable Models: A Large scale Face-and-Head Model. It is implemented only till the Regression Matrix Calculation part.
Combining 3D Morphable Models: A Large scale Face-and-Head Model
git clone https://github.com/nabeel3133/combining3Dmorphablemodels.git
lyhmPublic.zip
and go to lyhmPublic/lyhmModels/
, copy LYHM_male.mat
and put it in the Regression Matrix Calculation
folder.01_MorphableModel.mat
and put it in the Regression Matrix Calculation
folder.In order to run the code, launch MATLAB and follow the steps given below:
Steps1to3.m
located in combining3Dmorphablemodels/Regression Matrix Calculcation
and run it.
(Keep in mind that there is a variable named total_heads
on line #7, you can change it to as much head shape parameters you want the regression matrix to learn from). nricp_run.m
located in combining3Dmorphablemodels/Non Rigid Iterative Closest Point (NICP)/nricp-master/demos
and run it. It will save Regression_Matrix.mat
in the directory combining3Dmorphablemodels/Regression Matrix Calculcation
.Input_Face.obj
. Locate to the directory combining3Dmorphablemodels/Prediction
and run the following command:
python head_prediction.py
combining3Dmorphablemodels/Prediction
and run the following command:
python head_prediction_rand_bfm.py
Both of the codes will output a file named Output_Head.obj
located in the same directory. python head_prediction_rand_bfm.py
will also save a file named Input_Face.obj
which will contain the randomly generated BFM face.
If this work is useful for your research or if you use this implementation in your academic projects, please cite the following papers:
Combining 3D Morphable Models: A Large Scale Face-And-Head Model
@InProceedings{ploumpis2019combining,
author = {Stylianos Ploumpis and Haoyang Wang and Nick Pears and William A. P. Smith and Stefanos Zafeiriou},
title = {Combining 3D Morphable Models: A Large Scale Face-And-Head Model},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}
Optimal Step Nonrigid ICP Algorithms for Surface Registration:
@InProceedings{amberg2007optimal,
title={Optimal Step Nonrigid ICP Algorithms for Surface Registration},
author={Amberg, Brian and Romdhani, Sami and Vetter, Thomas},
booktitle={Computer Vision and Pattern Recognition, 2007. CVPR'07. IEEE Conference on},
pages={1--8},
year={2007},
organization={IEEE}
}