anhttran / 3dmm_basic

An implementation of the classical 3DMM fitting algorithm
114 stars 31 forks source link

IRIS-3DMM Version 1.0 revision 1

An implementation of 3DMM fitting algorithm proposed by [2] and [3] to solve the 3D face modeling from a single image problem. A modified version was used to generate training data for [1].

Compilation:

Platforms: Linux

Important note: To use the code as is, you will need to ask for an access to the Basel Face Model database. Without this license, I'm not allowed to redistribute it.

Send an email to anstar1111@gmail.com or jongmoochoi@gmail.com with a proof of your permission to use Basel Face Model. We will give you the binary data (BaselFace.dat). Copy it to lib directory.

There are 2 options below to compile our code:

Installation with Docker (recommended)

The steps below have been tested on Ubuntu Linux only:

  1. Get Ubuntu 64 bit 12.04 or later

  2. Install cmake:

        apt-get install cmake
  3. Install opencv (2.4.6 or higher is recommended)

  4. Install boost library (1.5 or higher is recommended):

        apt-get install libboost-all-dev
  5. Install OpenGL, freeglut, and glew

        sudo apt-get install freeglut3-dev
        sudo apt-get install libglew-dev
  6. Make build directory (temporary). Make & install to bin folder:

        mkdir build
        cd build
        cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=../bin ..
        make
        make install

The executable file IRIS_3DMM is in folder bin

Start docker container

If you compile our code with Docker, you need to start a Docker container to run our code. You also need to set up a shared folder to transfer input/output data between the host computer and the container.

Examples:

Model 3D face for a single image (./script/iris3d_file.sh) or all images in a folder (./script/iris3d_dir.sh)

  1. Create output folder (e.g. ./output)
  2. Copy the script into ./bin
  3. Provide the input/output path inside the script
  4. Run the script

Usage

./IRIS_3DMM {paramName paramValue}

Behaviours:

Parameters:

References

[1] A. Tran, T. Hassner, I. Masi, G. Medioni, "Regressing Robust and Discriminative 3D Morphable Models with a very Deep Neural Network", arxiv pre-print 2016

[2] V. Blanz, T. Vetter, "Face recognition based on fitting a 3D morphable model", IEEE Transactions on pattern analysis and machine intelligence 25, no. 9 (2003): 1063-1074.

[3] S. Romdhani, "Face image analysis using a multiple features fitting strategy", PhD diss., University_of_Basel, 2005.

[4] T. Baltrusaitis, P. Robinson, L. P. Morency, "Constrained local neural fields for robust facial landmark detection in the wild", In Proceedings of the IEEE International Conference on Computer Vision Workshops, pp. 354-361. 2013.

Changelog

Disclaimer

The SOFTWARE PACKAGE provided in this page is provided "as is", without any guarantee made as to its suitability or fitness for any particular use. It may contain bugs, so use of this tool is at your own risk. We take no responsibility for any damage of any sort that may unintentionally be caused through its use.

Contacts

If you have any questions, drop an email to anhttran@usc.edu or leave a message below with GitHub (log-in is needed).