All Projects → Rubikplayer → Flame Fitting

Rubikplayer / Flame Fitting

Example code for the FLAME 3D head model. The code demonstrates how to sample 3D heads from the model, fit the model to 3D keypoints and 3D scans.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Flame Fitting

Tf flame
Tensorflow framework for the FLAME 3D head model. The code demonstrates how to sample 3D heads from the model, fit the model to 2D or 3D keypoints, and how to generate textured head meshes from Images.
Stars: ✭ 193 (-28.25%)
Mutual labels:  computer-graphics, 3d-reconstruction, face, face-alignment
Flame pytorch
This is a implementation of the 3D FLAME model in PyTorch
Stars: ✭ 153 (-43.12%)
Mutual labels:  computer-graphics, 3d-reconstruction, face
Sgnn
[CVPR'20] SG-NN: Sparse Generative Neural Networks for Self-Supervised Scene Completion of RGB-D Scans
Stars: ✭ 112 (-58.36%)
Mutual labels:  computer-graphics, 3d-reconstruction
Cnncomplete
[CVPR'17] Shape Completion using 3D-Encoder-Predictor CNNs and Shape Synthesis
Stars: ✭ 117 (-56.51%)
Mutual labels:  computer-graphics, 3d-reconstruction
Scancomplete
[CVPR'18] ScanComplete: Large-Scale Scene Completion and Semantic Segmentation for 3D Scans
Stars: ✭ 213 (-20.82%)
Mutual labels:  computer-graphics, 3d-reconstruction
Softras
Project page of paper "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning"
Stars: ✭ 715 (+165.8%)
Mutual labels:  computer-graphics, 3d-reconstruction
Scannet
Stars: ✭ 860 (+219.7%)
Mutual labels:  computer-graphics, 3d-reconstruction
Face Dataset
Face related datasets
Stars: ✭ 204 (-24.16%)
Mutual labels:  face, face-alignment
PointCloudRegistrationTool
Automatically registers (aligns) and visualizes point clouds, or processes a whole bunch at once
Stars: ✭ 82 (-69.52%)
Mutual labels:  computer-graphics, 3d-reconstruction
platonicgan
Escaping Plato’s Cave: 3D Shape from Adversarial Rendering [ICCV 2019]
Stars: ✭ 40 (-85.13%)
Mutual labels:  computer-graphics, 3d-reconstruction
Face-Recognition-FaceNet
A python script label faces in group photos using Facenet. 🎉
Stars: ✭ 21 (-92.19%)
Mutual labels:  face, face-alignment
Apdrawinggan
Code for APDrawingGAN: Generating Artistic Portrait Drawings from Face Photos with Hierarchical GANs (CVPR 2019 Oral)
Stars: ✭ 510 (+89.59%)
Mutual labels:  computer-graphics, face
Prnet pytorch
Training & Inference Code of PRNet in PyTorch 1.1.0
Stars: ✭ 149 (-44.61%)
Mutual labels:  3d-reconstruction, face-alignment
Pifu
This repository contains the code for the paper "PIFu: Pixel-Aligned Implicit Function for High-Resolution Clothed Human Digitization"
Stars: ✭ 1,021 (+279.55%)
Mutual labels:  computer-graphics, 3d-reconstruction
Face swap
End-to-end, automatic face swapping pipeline
Stars: ✭ 722 (+168.4%)
Mutual labels:  3d-reconstruction, face
DeepVTB
🌌 OpenVTuber-虚拟アイドル共享计划 An application of real-time face and gaze analyzation via deep nerual networks.
Stars: ✭ 32 (-88.1%)
Mutual labels:  face, face-alignment
Face Pose Net
Estimate 3D face pose (6DoF) or 11 parameters of 3x4 projection matrix by a Convolutional Neural Network
Stars: ✭ 464 (+72.49%)
Mutual labels:  face, face-alignment
Mdm
A TensorFlow implementation of the Mnemonic Descent Method.
Stars: ✭ 120 (-55.39%)
Mutual labels:  face, face-alignment
Structured3d
[ECCV'20] Structured3D: A Large Photo-realistic Dataset for Structured 3D Modeling
Stars: ✭ 224 (-16.73%)
Mutual labels:  computer-graphics, 3d-reconstruction
ICON
ICON: Implicit Clothed humans Obtained from Normals (CVPR 2022)
Stars: ✭ 641 (+138.29%)
Mutual labels:  computer-graphics, 3d-reconstruction

FLAME: Articulated Expressive 3D Head Model

This is an official FLAME repository.

We also provide Tensorflow FLAME and PyTorch FLAME frameworks, and code to convert from Basel Face Model to FLAME.

FLAME is a lightweight and expressive generic head model learned from over 33,000 of accurately aligned 3D scans. FLAME combines a linear identity shape space (trained from head scans of 3800 subjects) with an articulated neck, jaw, and eyeballs, pose-dependent corrective blendshapes, and additional global expression blendshapes. For details please see the scientific publication

Learning a model of facial shape and expression from 4D scans
Tianye Li*, Timo Bolkart*, Michael J. Black, Hao Li, and Javier Romero
ACM Transactions on Graphics (Proc. SIGGRAPH Asia) 2017

and the supplementary video.

This codebase demonstrates

  • Sampling: Load and evaluate FLAME model for random parameters
  • Landmark fitting: Fit FLAME to 3D landmarks
  • Scan fitting: Fit FLAME to a 3D scan

Set-up

The code has been tested with Python 3.6.9.

Clone the git project:

git clone https://github.com/Rubikplayer/flame-fitting.git

Install pip and virtualenv

sudo apt-get install python3-pip python3-venv

Set up virtual environment:

mkdir <your_home_dir>/.virtualenvs
python3 -m venv <your_home_dir>/.virtualenvs/flame-fitting

Activate virtual environment:

cd flame-fitting
source <your_home_dir>/.virtualenvs/flame-fitting/bin/activate

Make sure your pip version is up-to-date:

pip install -U pip

Somerequirements can be installed using:

pip install -r requirements.txt

Install mesh processing libraries from MPI-IS/mesh within the virtual environment.

The scan-to-mesh distance used for fitting a scan depends on Eigen. Either download Eigen for here OR clone the repository:

git clone https://gitlab.com/libeigen/eigen.git

After downloading Eigen, you need to compile the code in the directory 'sbody/alignment/mesh_distance'. To do this go to the directory:

cd sbody/alignment/mesh_distance

Edit the file setup.py to set EIGEN_DIR to the location of Eigen. Then type:

make

Data

Download the FLAME model MPI-IS/FLAME. You need to sign up and agree to the model license for access to the model.

Demo

  • Load and evaluate FLAME model: hello_world.py
  • Fit FLAME to 3D landmarks: fit_lmk3d.py
  • Fit FLAME to a 3D scan: fit_scan.py

Fitting a scan requires scan and FLAME model to be in the same local coordiante systems. The fit_scan.py script provides different options by specifying the variable scale_unit to convert from Meters [m] (default), Centimeters [cm], or Milimieters [mm]. Please specify the right unit when running fit_scan.py. If the unit of the measurement unit is unknown, choose scale_unit = 'NA'.

Landmarks

The provided demos fit FLAME to 3D landmarks or to a scan, using 3D landmarks for initialization and during fitting. Both demos use the shown 51 landmarks. Providing the landmarks in the exact order is essential. The landmarks can for instance be obtained with MeshLab using the PickPoints module. PickPoints outputs a .pp file containing the selected points. The .pp file can be loaded with the provided 'load_picked_points(fname)' function in fitting/landmarks.py.

Citing

When using this code in a scientific publication, please cite FLAME

@article{FLAME:SiggraphAsia2017,
  title = {Learning a model of facial shape and expression from {4D} scans},
  author = {Li, Tianye and Bolkart, Timo and Black, Michael. J. and Li, Hao and Romero, Javier},
  journal = {ACM Transactions on Graphics, (Proc. SIGGRAPH Asia)},
  volume = {36},
  number = {6},
  year = {2017},
  url = {https://doi.org/10.1145/3130800.3130813}
}

License

The FLAME model is under a Creative Commons Attribution license. By using this code, you acknowledge that you have read the terms and conditions (https://flame.is.tue.mpg.de/modellicense), understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you must not use the code. You further agree to cite the FLAME paper when reporting results with this model.

Supported projects

FLAME supports several projects such as

FLAME is part of SMPL-X: : A new joint 3D model of the human body, face and hands together

Acknowledgement

Code in smpl_webuser originates from SMPL Python code, and code in sbody originates from SMALR. We thank the authors for pushing these code packages.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].