Download links and conversion scripts for SMPL-family of models (SMPL, SMPLX, SMPLH/MANO). Removes Python 2/Chumpy dependencies and makes them compatible with Python 3 so you can directly load them with Numpy/Pickle. The output is created in the format expected by smplx package, aitviewer, and similar packages.
├── smpl
│ ├── SMPL_FEMALE.pkl
│ └── SMPL_MALE.pkl
│ └── SMPL_NEUTRAL.pkl
├── smplh
│ ├── SMPLH_FEMALE.pkl
│ └── SMPLH_MALE.pkl
├── mano
| ├── MANO_RIGHT.pkl
| └── MANO_LEFT.pkl
└── smplx
├── SMPLX_FEMALE.pkl
├── SMPLX_FEMALE.npz
├── SMPLX_MALE.pkl
├── SMPLX_MALE.npz
├── SMPLX_NEUTRAL.pkl
└── SMPLX_NEUTRAL.npz
This script was tested with Python 3.11.13. You should download this repo and install the required packages using pip:
git clone https://github.com/keatonkraiger/SMPL_to_python3.git
cd SMPL_to_python3
pip install -r requirements.txtTo download all of the SMPL-family models, follow these steps:
- Download the SMPL v1.1.0 files from SMPL Website
- Download the SMPLX with removed head bun (I do the NPZ+PKL) from the SMPLX Website
- Download the SMPLH model ("version ready to load by the smplx python package") from the MANO Website
- Download MANO ("Models & Code") from the MANO Website
- Place each downloaded zip file in the
zips/folder. It should look like this:
SMPL_to_python3/
├── convert_smpl.py
├── chumpy/
├── requirements.txt
├── test.py
└── zips/
├── mano_v1_2.zip # MANO
├── SMPL_python_v.1.1.0.zip # SMPL
├── smplx_lock_head.tar.bz2 # SMPLX with NPZ+PKL
├── smplx.zip # SMPLH, why they named it this I have no idea
├── ...
├── smplx_lockedhead_20230207.zip # optional SMPLX with only NPZ
└── smplh.tar.xz # optional Extended SMPL+H used for manual merging
Merging SMPL+H and MANO:
The SMPLH model version ready to load by the smplx python package (from the MANO Website) already has MANO merged in. If you download that you do not need to perform the merging. If you still want to do the merging or need access to the neutral model, you should download SMPLH ("Extended SMPL+H model used in AMASS project") from the MANO Website and use the --merge_mano flag when running the conversion script.
To convert the models to Python 3 compatible files, run the following:
python convert_smpl.py Some options you can use:
--zips_path: Path to the directory containing the downloaded zip files. Default iszips.--output_path: Path to the directory where the converted models will be saved. Default ismodels.--merge_mano: Inclusion will merge the MANO and SMPL+H models--convert_csc_matrix: Inclusion will convert the Scipy sparse csc_matrix to a dense numpy array.--save_as_npz: Inclusion will save the output files as.npzinstead of.pkl. Default is saving as.pkl.
You can test the conversions with:
python test.py --models_path modelsOnly do this if the provided chumpy code in the chumpy/ folder does not work for you. You should also remove the chumpy/ folder.
Because Chumpy is now abandoned (and was never really that useful), there are a few things that will go wrong when trying to open the SMPL models. Luckily, the modifications needed to the Chumpy source code are minimal. First install Chumpy via pip:
pip install chumpy==0.70 - Locate the Chumpy installation directory. You can find it by running the following command in Python:
If you can't even import chumpy, there may be an
import chumpy print(chumpy.__file__)
AttributeErrorthat tells you where it is installed. - Make the following changes:
- In
path/to/chumpy/__init__.py, change line 11 from:to:from numpy import bool, int, float, complex, object, unicode, str, nan, inf
#from numpy import bool, int, float, complex, object, unicode, str, nan, inf - In
path/to/chumpy/ch.py, change line 1203 from:to:def _depends_on(func): want_out = 'out' in inspect.getargspec(func).args
Note: Commenting it out worked as well (i.edef _depends_on(func): want_out = 'out' in inspect.getfullargspec(func).args
#want_out = ...).
- In
For example, in my case:
import chumpy
print(chumpy.__file__)
# Output: /home/keaton/miniconda3/lib/python3.11/site-packages/chumpy/__init__.pyThen I made the following modifications:
It would be nice for SMPL to be updated to Python 3 officially and centralized.

