Giter Club home page Giter Club logo

nabeel3133 / combining3dmorphablemodels Goto Github PK

View Code? Open in Web Editor NEW
86.0 8.0 8.0 2.87 MB

Project Page of Combining 3D Morphable Models: A Large scale Face-and-Head Model - [CVPR 2019]

Home Page: http://openaccess.thecvf.com/content_CVPR_2019/html/Ploumpis_Combining_3D_Morphable_Models_A_Large_Scale_Face-And-Head_Model_CVPR_2019_paper.html

License: MIT License

MATLAB 86.55% Python 13.45%
combined shape matrix mesh point registration corresponding pattern principal eigenvectors

combining3dmorphablemodels's Introduction

Combining 3D Morphable Models: A Large scale Face-and-Head Model

License: MIT GitHub repo size

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.

Paper

Combining 3D Morphable Models: A Large scale Face-and-Head Model

Dependencies

Usage

1. Cloning the repository

git clone https://github.com/nabeel3133/combining3Dmorphablemodels.git

2. Downloading the models

  • LYHM: Liverpool York Head Model
    • After you have acquired LYHM, extract the lyhmPublic.zip and go to lyhmPublic/lyhmModels/, copy LYHM_male.mat and put it in the Regression Matrix Calculation folder.
  • BFM09: Basel Face Model 2009
    • After you have acquired BFM, extract the BaselFaceModel.tgz and go to "PublicMM1" folder, copy 01_MorphableModel.mat and put it in the Regression Matrix Calculation folder.

3. Running the code

In order to run the code, launch MATLAB and follow the steps given below:

  1. Open the file 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).
  2. After it is done executing, open the file 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.

4. Getting a Predicted Head

  • In order to get a predicted head of a BFM face, you need to have the .obj file of the BFM face for which you want to predict the head. Make sure to have your .obj file named as Input_Face.obj. Locate to the directory combining3Dmorphablemodels/Prediction and run the following command:
python head_prediction.py
  • In order to generate a random BFM face from BFM model and then predict the head for that randomly generated face, locate to the directory 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.

Citation

If this work is useful for your research or if you use this implementation in your academic projects, please cite the following papers:

@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}
}
@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}
}

combining3dmorphablemodels's People

Contributors

nabeel3133 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

combining3dmorphablemodels's Issues

Alternative to LYHM

Thanks for the great work! I can't get my hands on the Liverpool-York Head Model (the owner didn't respond to the mail), is there any alternative to it?

Edit: I got a response from Dr. Nick Pears. They do not have the authority to release the model to a non-faculty in academics, and they are not distributing a license for commercial use. Still looking for an alternative.

nricp_run.m : close to singular matrix

I'm getting a warning on running nricp_run.m : Matrix is close to singular or badly scaled. Results may be inaccurate. (RCOND = 2.045926e-20). Is this normal?

Not working

Hello,

I think there is a problem in the code, I followed all the steps. But I do not get a good result

Capture du 2019-12-05 16-19-03

Here is a screenshot of what I get !

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.