Skip to main content

<<<ENTER_DESCRIPTION>>>

Project description

Adaption of the FLAME model as a proper Python library.
Install via

pip install flame_model

Usage:

from flame_model import FLAME

flame = FLAME()

Original README below


FLAME: Articulated Expressive 3D Head Model (PyTorch)

This is an implementation of the FLAME 3D head model in PyTorch.

We also provide Tensorflow FLAME, a Chumpy-based FLAME-fitting repository, 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 following 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.

Installation

The code uses Python 3.7 and it is tested on PyTorch 1.4.

Setup FLAME PyTorch Virtual Environment

python3.7 -m venv <your_home_dir>/.virtualenvs/FLAME_PyTorch
source <your_home_dir>/.virtualenvs/FLAME_PyTorch/bin/activate

Clone the project and install requirements

git clone https://github.com/soubhiksanyal/FLAME_PyTorch
cd FLAME_PyTorch
python setup.py install
mkdir model

Download models

  • Download FLAME model from here. You need to sign up and agree to the model license for access to the model. Copy the downloaded model inside the model folder.
  • Download Landmark embedings from RingNet Project. Copy it inside the model folder.

Demo

Loading FLAME and visualising the 3D landmarks on the face

Please note we used the pose dependent conture for the face as introduced by RingNet Project.

Run the following command from the terminal

python main.py

License

FLAME is available under Creative Commons Attribution license. By using the model or the code code, you acknowledge that you have read the license terms (https://flame.is.tue.mpg.de/modellicense.html), 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.

Referencing FLAME

When using this code in a scientific publication, please cite

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

Additionally if you use the pose dependent dynamic landmarks from this codebase, please cite

@inproceedings{RingNet:CVPR:2019,
title = {Learning to Regress 3D Face Shape and Expression from an Image without 3D Supervision},
author = {Sanyal, Soubhik and Bolkart, Timo and Feng, Haiwen and Black, Michael},
booktitle = {Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR)},
month = jun,
year = {2019},
month_numeric = {6}
}

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

Contact

If you have any questions regarding the PyTorch implementation then you can contact us at soubhik.sanyal@tuebingen.mpg.de and timo.bolkart@tuebingen.mpg.de.

Acknowledgements

This repository is build with modifications from SMPLX.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flame_model-0.0.3.tar.gz (132.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flame_model-0.0.3-py3-none-any.whl (128.5 kB view details)

Uploaded Python 3

File details

Details for the file flame_model-0.0.3.tar.gz.

File metadata

  • Download URL: flame_model-0.0.3.tar.gz
  • Upload date:
  • Size: 132.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for flame_model-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c6b9dc18d74ca416b6123254ceb987b292c1c45c13fa874fc115033829ccce4f
MD5 22ec90e155f2595f1bd3686b49ea83ca
BLAKE2b-256 f94cfcbd70e8fef2e478a0f420db2f8d9381ff657b82ac43e40e783e7a135129

See more details on using hashes here.

File details

Details for the file flame_model-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: flame_model-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 128.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for flame_model-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a1660307c2d632ee8c74c67aa732fbe35aa5a5692fbe2de7ee03c1a5d516d9f8
MD5 65c3c41b5209ad9d4c1e15632746d3a6
BLAKE2b-256 0a2f6a80b09770652b12b04ff01cde945e1447b20f9fb17c1561db0796b1d841

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page