The repository provides a tool to fit SMPL parameters from 3D-pose datasets that contain key-points of human body.
The SMPL human body layer for Pytorch is from the smplpytorch repository.
-
Run without installing: You will need to install the dependencies listed in environment.yml:
conda env update -f environment.yml
in an existing environment, orconda env create -f environment.yml
, for a newsmplpytorch
environment
-
Install: To import
SMPL_Layer
in another project withfrom smplpytorch.pytorch.smpl_layer import SMPL_Layer
do one of the following.
- 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
models
folder into thesmplpytorch/native/
folder (or set themodel_root
parameter accordingly).
-
Download the datasets you want to fit
currently support:
-
Set the DATASET.PATH in the corresponding configuration file to the location of dataset.
You can start the fitting procedure by the following code and the configuration file in fit/configs corresponding to the dataset_name will be loaded (the dataset_path can also be set in the configuration file):
python fit/tools/main.py --dataset_name [DATASET NAME] --dataset_path [DATASET PATH]
-
Direction: The output SMPL parameters will be stored in fit/output
-
Format: The output are .pkl files, and the data format is:
{ "label": [The label of action], "pose_params": pose parameters of SMPL (shape = [frame_num, 72]), "shape_params": pose parameters of SMPL (shape = [frame_num, 10]), "Jtr": key-point coordinates of SMPL model (shape = [frame_num, 24, 3]) }