Giter Club home page Giter Club logo

3d_face_reconstrction's Introduction

3D Face Reconstrction - Personal Project

I built this out of my personal interst in 2018 in my free time as a senior CS undergraduate.

This program is able to reconstruct a 3D face model from a single front-face image with the help of C++, QT, OpenGL, OpenCV, eos/dlib libraries and surrey face model. Also, it automatically reads the .obj file with its texture and display the full model in front of you right after the reconstruction process!

The interactive UI was implemented using C++ Qt. It deserves some refinements when I have time.

Following is the model viewer UI, as you can adjust the model angles with sliders or drag with your mouse to adjust the pose of the model generated!

Dependencies

I used Visual Studio 2018 on Windows to do my project.

  • In order to compile the program, you need to configure the following dependencies in order:

OpenCV -> OpenGL -> dlib -> eos -> Qt

  • referenced Libraries:

https://github.com/patrikhuber/eos

http://dlib.net

The Surrey Face Model

I used a shape-only version of the Surrey Morphable Face Model as the skeleton of the model.

Surrey Face Model shape picture

The full model is available at http://www.cvssp.org/facemodel.

Face Landmark Detection

Here is the face landmark detection part. By selecting 68 landmarks, a face could be identified and located in the image.

Given the input sample photo:

By running face detection module, my program identified the front face and its outline and some interest points, e.g. nose and eyes.

Texture Extraction

By implementing the texture extraction API, combined with Dlib face landmark detection data, the texture can be extracted from the original image.

The face texture could be presented in this sturcture:

Face Reconstruction

Here comes the most challanging part.

  • First, the program fits the original model to different face image, adjusts its surface parameters in order to present more natural and realistic outputs.

  • Secondly, given an extracted texture of the face and the surrey face model, the program calculates a mapping between the coordinates from a 2D image to a 3D model.

Some final outputs:

3d_face_reconstrction's People

Contributors

jerrywu96 avatar

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.