PyTorch implementation of the 3D FLAME model.
Project description
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
- CoMA: Convolutional Mesh Autoencoders
- RingNet: 3D Face Shape and Expression Reconstruction from an Image without 3D Supervision
- VOCA: Voice Operated Character Animation
- Expressive Body Capture: 3D Hands, Face, and Body from a Single Image
- ExPose: Monocular Expressive Body Regression through Body-Driven Attention
- GIF: Generative Interpretable Faces
- DECA: Detailed Expression Capture and Animation
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file FLAME_PyTorch-0.0.1.tar.gz
.
File metadata
- Download URL: FLAME_PyTorch-0.0.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.7.1 requests/2.26.0 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea3edef5821892d90161bbf22f444c775017705ec5fa5bfbd105fc75101005c1 |
|
MD5 | 0588be74bfd488a3eeff6cb8f2cae501 |
|
BLAKE2b-256 | cbe52ed3aa405ad7f139a18c1f73eff1b6f90f25f668d512b999eb92045d86c9 |
Provenance
File details
Details for the file FLAME_PyTorch-0.0.1-py3.7.egg
.
File metadata
- Download URL: FLAME_PyTorch-0.0.1-py3.7.egg
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.7.1 requests/2.26.0 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37517a2d4a198ebb1c081d4773a7de989404c86185dd71793d04a1b225bba7d0 |
|
MD5 | d61d78e4e61c52528023a66c8083998e |
|
BLAKE2b-256 | 822e6de10208119933acfa69c514616ba62630bb18c28a937e1789749692c5cc |
Provenance
File details
Details for the file FLAME_PyTorch-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: FLAME_PyTorch-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.7.1 requests/2.26.0 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ddffba0f2adaebe0b3a45919ca469d5c84a0a22d21b390194ffef593e66e7bd |
|
MD5 | 0a719763d3b5181cd0cee7215f8b5b14 |
|
BLAKE2b-256 | f70d9f24c909ed743f29ea3eff0a17bce4f1717fa7257ea2cc7b3b6c6eceb435 |