3.0 KiB
pose2smpl
Fitting SMPL Parameters by 3D-pose Key-points
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.
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).
3. Download Dataset
-
Download the datasets you want to fit
currently support:
-
Set the DATASET.PATH in the corresponding configuration file to the location of dataset.
Fitting
1. Executing Code
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]
2. Output
-
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]) }

