C++ Implementation of SMPL - A Skinned Multi-Person Linear Model.
This project implements a 3D human skinning model - SMPL: A Skinned Multi-Person Linear Model with C++ and pure CUDA. The official SMPL model is available at http://smpl.is.tue.mpg.de.
For more details, see the paper published by Max Planck Institute for Intelligent Systems on SIGGRAPH ASIA 2015.
-
xtensor: A C++ library meant for numerical analysis with multi-dimensional array expressions.
-
nlohmann_json: JSON for Modern C++.
Xtensor loads data from and dumps data into JSONs through nlohmann's toolkit.
-
CUDA: NVIDIA parallel computing platform.
-
Data preprocessing
Download and extract the official data from http://smpl.is.tue.mpg.de/, you will get two files:
basicModel_f_lbs_10_207_0_v1.0.0.pkl basicmodel_m_lbs_10_207_0_v1.0.0.pklRun
preprocess.pyin SMPL with Python 2 to convert the data into.jsonand. npzformat. -
Build and Run
After installing all packages, you can compile SMPL from source:
mkdir build cd build cmake .. make -
Pipeline
Following the paper, we can generate a mesh with four steps.
-
Generate pose blend shape and shape blend shape.
-
Regress joints from vertices.
-
Compute the transformation matrices for each joint.
-
Linear Blend Skinning
-
[1] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black. 2015. "SMPL: a skinned multi-person linear model". ACM Trans. Graph. 34, 6, Article 248 (October 2015), 16 pages.