Giter Club home page Giter Club logo

3dmmregistration's Introduction

Shape Registrator

A tool for 3D face models aligment. With a GUI.

Application screenshot

Shape Registrator works with 3D model and supports .mat (Matlab), .wrl (WRML) and .off (Open File Format) file formats.

2019 Update:

  • Displacement map can now be saved as a Pickle file.
  • Target model can be rotated, in order to provide a good starting point for CPD algorithm.
  • Source model is now shown in the target section while registrated.

Installation

  1. Clone repo.
  2. pip install -r requirements.txt
  3. Run main.py

Usage

  1. Load two models, you can choose between .mat, .wrl + .bnd and .off formats.
  2. Select the amount of points to be used and the CPD version: rigid, affine or deformable.
  3. "Registrate", and wait for the result.

In the log box you can see the registration error and some messages.

About file formats:

.mat files have to contain a '3ddata' field storing 3D points coordinates (a Nx3 matrix) and a 'landmarks3d' witch stores the landmarks coordinates (Nx3 matrix).

.wrl files should be paired with a .bnd file storing the landmarks coordinates. If a .png image with the same name is aviable, it will be used for the background of the plot tool.

.off files must contain 3D points coordinates, faces are not mandatory and will be ignored.

Insights

In the very heart of the application there's the Coherent Point Drift algorithm[1], witch allows to registrate two point sets regardless from the transformation's nature. In fact, CPD provides three kind of transformation: rigid, affine and deformable; with crescent grades of freedom.

It's possible to control the quantity of the points involved in the registration process: you can choose to keep all of them (100%) or to reduce until 30% of original number. The sampling policy used is uniform and casual.

Reduce the amount of points makes the registration process faster, but - only for affine and deformable case - the transformation matrices can't be used to process the entire point set. However, we can take advantage of this option in the rigid case.

Packages required

A requirements.txt is provided, in order to be used with pip

Package Version
numpy >=1.15.0
scipy >=1.3
matplotlib ~2.2.3
PyQt5 ~5.11.2
h5py ~2.8
pycpd ~1.0.3

The application was tested so far with Python 3.7 x64 operating on Windows 10 and Ubuntu 16.04 LTS. Should work on MacOs as well, since PyQt5 is cross-platform.

References

[1] Andriy Myronenko and Xubo Song, "Point Set Registration: Coherent Point Drift", IEEE Trans. on Pattern Analysis and Machine Intelligence, vol. 32, issue 12, pp. 2262-2275, 15 May 2009 {link}

[2] Alessandro Soci and Gabriele Barlacchi, AlessandroSoci/3DMM-Facial-Expression-from-Webcam

[3] Alessandro Sestini and Francesco Lombardi, fralomba/Facial-Expression-Prediction

3dmmregistration's People

Contributors

rickie95 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.