SMPL human body layer for PyTorch is a differentiable PyTorch layer
Project description
SMPL layer for PyTorch
SMPL human body [1] layer for PyTorch (tested with v0.4 and v1.x) is a differentiable PyTorch layer that deterministically maps from pose and shape parameters to human body joints and vertices. It can be integrated into any architecture as a differentiable layer to predict body meshes. The code is adapted from the manopth repository by Yana Hasson.
Setup
1. The smplpytorch package
- Run without installing: You will need to install the dependencies listed in environment.yml:
conda env update -f environment.ymlin an existing environment, orconda env create -f environment.yml, for a newsmplpytorchenvironment
- Install: To import
SMPL_Layerin another project withfrom smplpytorch.pytorch.smpl_layer import SMPL_Layerdo one of the following.
2. Download SMPL pickle files
- Download the models from the SMPL website by choosing "SMPL for Python users". Note that you need to comply with the SMPL model license.
- Extract and copy the
modelsfolder into thesmplpytorch/native/folder (or set themodel_rootparameter accordingly).
Demo
Forward pass the randomly created pose and shape parameters from the SMPL layer and display the human body mesh and joints:
python demo.py
Acknowledgements
The code largely builds on the manopth repository from Yana Hasson, which implements the MANO hand model [2] layer.
The code is a PyTorch port of the original SMPL model from chumpy. It builds on the work of Loper et al. [1].
The code reuses part of the code by Zhang Xiong to compute the rotation utilities.
If you find this code useful for your research, please cite the original SMPL publication:
@article{SMPL:2015,
author = {Loper, Matthew and Mahmood, Naureen and Romero, Javier and Pons-Moll, Gerard and Black, Michael J.},
title = {{SMPL}: A Skinned Multi-Person Linear Model},
journal = {ACM Trans. Graphics (Proc. SIGGRAPH Asia)},
number = {6},
pages = {248:1--248:16},
volume = {34},
year = {2015}
}
References
[1] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black, "SMPL: A Skinned Multi-Person Linear Model," SIGGRAPH Asia, 2015.
[2] Javier Romero, Dimitrios Tzionas, and Michael J. Black, "Embodied Hands: Modeling and Capturing Hands and Bodies Together," SIGGRAPH Asia, 2017.
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smplpytorch-0.0.8.tar.gz.
File metadata
- Download URL: smplpytorch-0.0.8.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35a011206985c993dccea63e7a4d77bc71369baa0fd58f36ebcad6da3af38779
|
|
| MD5 |
027b5c776b07f44d4cc6c587ef8d8b65
|
|
| BLAKE2b-256 |
16b30ea0c906ce4236efed823e0469fa1f9dfa330f05fc42d36bfbdf25c37f2f
|
File details
Details for the file smplpytorch-0.0.8-py3-none-any.whl.
File metadata
- Download URL: smplpytorch-0.0.8-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
059a398a3f10acf74f8da7fca8bba870f6504523cd3df6f52264b496c37b0a4a
|
|
| MD5 |
8cb607782625022d5bf769ff54c71429
|
|
| BLAKE2b-256 |
5fc227a2e0739670c19c52da1f90ebb576c2d64eb93a8c397461db2a41365e9f
|