Installations
August 17, 2025 ยท View on GitHub
Environment Setup
cd /path/to/HSMR
git submodule update --init # fetch thirdparty code
# Use conda to create environment.
conda create -n hsmr python=3.10
conda activate hsmr
# Alternatively, you can use venv.
python3 --version # ensure 3.8 or higher
python3 -m venv .hsmr_env
source .hsmr_env/bin/activate
# Install Dependencies
pip install -r requirements.txt # make sure torch version is aligned with $CUDA_HOME
pip install "git+https://github.com/facebookresearch/detectron2.git"
pip install "git+https://github.com/mattloper/chumpy"
pip install -e .
# Install SKEL from https://github.com/MarilynKeller/SKEL
pip install -e thirdparty/SKEL
If you encounter any version conflicts with
requirements.txt, we also providedocs/requirements_py3.8.txtwith version-annotated dependencies.
Data Preparation
- If you only want to try the demo, you can follow the instruction in Quick Start.
- If you want to check more details of our methods, please refer to the Advanced Setup.
๐ Feel free to post an issue if you encounter any problems with data.
Quick Start
1/3
# Regressors
mkdir -p data_inputs/body_models
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/body_models/SMPL_to_J19.pkl' \
-O data_inputs/body_models/SMPL_to_J19.pkl
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/body_models/J_regressor_SKEL_mix_MALE.pkl' \
-O data_inputs/body_models/J_regressor_SKEL_mix_MALE.pkl
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/body_models/J_regressor_SMPL_MALE.pkl' \
-O data_inputs/body_models/J_regressor_SMPL_MALE.pkl
2/3
# HSMR Model
mkdir -p data_inputs/released_models/
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/released_models/HSMR-ViTH-r1d1.tar.gz' \
-O HSMR-ViTH-r1d1.tar.gz
tar -xzvf HSMR-ViTH-r1d1.tar.gz -C data_inputs/released_models/
rm HSMR-ViTH-r1d1.tar.gz
3/3
Download skel_models_v1.1.zip from https://skel.is.tue.mpg.de/login.php and unzip it.
mkdir -p data_inputs/body_models
mv /path/to/skel_models_v1.1 data_inputs/body_models/skel
Check SKEL Model section for more information about SKEL model.
Now you can return Demo Instructions.
Overview for Advanced Setup
๐ข/๐ต/๐ฃ indicate that the item is must-required/evaluation-required-only/training-required-only.
- ๐ Human Body Models
- ๐ข SKEL Model
- ๐ข Auxiliary Regressors
- ๐ต SMPL Model
- ๐ฉ Checkpoints
- ๐ข HSMR Checkpoints
- ๐ฃ ViTPose Backbone Checkpoints
- ๐ Datasets
- ๐ต Evaluation Datasets
- ๐ฃ Training Datasets
Human Body Models
Tips: click to expand/fold instructions.
๐ SKEL Model
-
Go to SKEL Homepage > Download and download "SKEL and BSM models". You are supposed to get
skel_models_v1.1.zip. The inside content should be like:skel_models_v1.1 โโโ Geometry/... โโโ bsm.osim โโโ changelog_v1.1.1.txt โโโ sample_motion/... โโโ skel_female.pkl โโโ skel_male.pkl โโโ tmp.osimโ ๏ธ SKEL version matters! If you had downloaded the SKEL model before, please make sure the whole version number is
v1.1.1. You can find the model version inchangelog_v1.1.1.txt. Any lower versions are not compatible. -
Add
skel_models_v1.1to the code base:mkdir -p data_inputs/body_models mv /path/to/skel_models_v1.1 data_inputs/body_models/skel
For more information about the SKEL model itself, please refer SKEL project page or LearningHumans Jupyter notebook.
๐ ๏ธ Auxiliary Regressors
Download the necessary additional files from HuggingFace and put them to data_inputs/body_models/. Or you can simply run this:
mkdir -p data_inputs/body_models
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/body_models/SMPL_to_J19.pkl' \
-O data_inputs/body_models/SMPL_to_J19.pkl
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/body_models/J_regressor_SKEL_mix_MALE.pkl' \
-O data_inputs/body_models/J_regressor_SKEL_mix_MALE.pkl
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/body_models/J_regressor_SMPL_MALE.pkl' \
-O data_inputs/body_models/J_regressor_SMPL_MALE.pkl
๐งโ๐ฆฒ SMPL Model
-
Sign in SMPLify Homepage > Downloads and click
SMPLIFY_CODE_V2.ZIP. You will getmpips_smplify_public_v2.zip. After unzipping, you will get a folder like this:smplify_public โโโ code โ โโโ models โ โ โโโ basicModel_neutral_lbs_10_207_0_v1.0.0.pkl # 10-shape model, in size of 37MB โ โ โโโ ... โ โโโ ... โโโ ... -
Add to the code base.
mkdir -p data_inputs/body_models/smpl mv /path/to/basicModel_neutral_lbs_10_207_0_v1.0.0.pkl data_inputs/body_models/smpl/SMPL_NEUTRAL.pkl
For more information about the SMPL model itself, please refer SMPL project page or LearningHumans Jupyter notebook.
Checkpoints
๐ฉ HSMR Checkpoint
-
Download
HSMR-ViTH-r1d1.tar.gzfrom HuggingFace, or you can simply run this:wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/released_models/HSMR-ViTH-r1d1.tar.gz' \ -O HSMR-ViTH-r1d1.tar.gz -
Add to the code base.
mkdir -p data_inputs/released_models/ tar -xzvf HSMR-ViTH-r1d1.tar.gz -C data_inputs/released_models/ rm HSMR-ViTH-r1d1.tar.gz
๐ฉ ViTPose Backbone Checkpoint
Download vitpose_backbone.pth from HuggingFace and put them to data_inputs/backbone/.Or you can simply run this:
mkdir -p data_inputs/backbone/
wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/backbone/vitpose_backbone.pth' \
-O data_inputs/backbone/vitpose_backbone.pth
Datasets
๐ฉบ Evaluation Datasets
We evaluate our approach on multiple benchmarks. Specifically, we use the benchmarks used by HMR2.0, including 2D datasets (COCO, LSP-EXTENDED, PoseTrack) and 3D datasets (3DPW, H36M). Moreover, we evaluate on the MOYO dataset.
- Prepare the evaluation datasets used by HMR2.0:
- Download
hmr2_evaluation_data.tar.gzfrom DropBox or HuggingFace, or you can simply run this:wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/hmr2_evaluation_data.tar.gz' \ -O hmr2_evaluation_data.tar.gz - Prepare 3DPW, H36M, COCO, LSP-EXTENDED, and PoseTrack datasets. Check the "data structure" bellow to see how to organize the data. Only the images are required.
- Download
- Prepare the MOYO evaluation dataset:
- Download
hsmr_evaluation_data.tar.gzfrom HuggingFace, or you can simply run this:wget -c 'https://huggingface.co/IsshikiHugh/HSMR-data_inputs/resolve/main/hsmr_evaluation_data.tar.gz' \ -O hsmr_evaluation_data.tar.gz - Download MoYo images from here.
- Download
- Add to the code base.
# Prepare meta data. tar -xzvf hmr2_evaluation_data.tar.gz -C data_inputs/ rm hmr2_evaluation_data.tar.gz tar -xzvf hsmr_evaluation_data.tar.gz -C data_inputs/ rm hsmr_evaluation_data.tar.gz# Prepare image data. mkdir -p data_inputs/datasets ln -s /path/to/3dpw data_inputs/datasets/3dpw ln -s /path/to/h36m data_inputs/datasets/h36m ln -s /path/to/coco data_inputs/datasets/coco ln -s /path/to/hr-lspet data_inputs/datasets/hr-lspet ln -s /path/to/posetrack data_inputs/datasets/posetrack ln -s /path/to/moyo data_inputs/datasets/moyo
After that, the data structure should fit:
data_inputs
โโโ datasets # The image files.
โ โโโ 3dpw
โ โ โโโ imageFiles/*/*.jpg
โ โโโ coco
โ โ โโโ val2017/*.jpg
โ โโโ h36m
โ โ โโโ images/*.jpg
โ โโโ hr-lspet
โ โ โโโ *.png
โ โโโ posetrack
โ โ โโโโ posetrack2018/posetrack_data/images/*/*/*.jpg
โ โโโ moyo
โ โโโ 220923_yogi_body_hands_03596_Boat_Pose_or_Paripurna_Navasana_-a
โ โ โโโ YOGI_Cam_*/*.jpg
โ โโโ 220923_yogi_body_hands_03596_Boat_Pose_or_Paripurna_Navasana_-b
โ โ โโโ YOGI_Cam_*/*.jpg
โ โโโ ...
โโโ hmr2_evaluation_data # The packaged labels of standard benchmark datasets.
โ โโโ 3dpw_test.npz
โ โโโ coco_val.npz
โ โโโ h36m_val_p2.npz
โ โโโ hr-lspet_train.npz
โ โโโ posetrack_2018_val.npz
โโโ hsmr_evaluation_data # The packaged labels of extra benchmark datasets.
โโโ moyo_v2.npz
๐ Training Datasets
- Download training data parts through the commands below (or click the links in the table):
mkdir -p data_inputs/hsmr_training_data wget "https://www.dropbox.com/scl/fi/tdnyxoufx8u3f7kcgruah/hsmr_training_data.part1.tar.gz?rlkey=92pm05qa8pimjhrpwipu56svn&st=id2dvek4&dl=1" \ -O data_inputs/hsmr_training_data/hsmr_training_data.part1.tar.gz wget "https://www.dropbox.com/scl/fi/az8opeka0zyhl6mk0gj6p/hsmr_training_data.part2.tar.gz?rlkey=7iv6t1hl95ok6zuxp2nit29fr&st=5jepxumi&dl=1" \ -O data_inputs/hsmr_training_data/hsmr_training_data.part2.tar.gz wget "https://www.dropbox.com/scl/fi/rd9uribnjvyj896cqbj7o/hsmr_training_data.part3.tar.gz?rlkey=b821r5qslbuqivqav8qvu8fee&st=n215nv19&dl=1" \ -O data_inputs/hsmr_training_data/hsmr_training_data.part3.tar.gz wget "https://www.dropbox.com/scl/fi/pxm75g95nbkqxg3er8ozd/hsmr_training_data.part4.tar.gz?rlkey=7e5ftkbzre0smbxi2mtukijuk&st=0bje2g3n&dl=1" \ -O data_inputs/hsmr_training_data/hsmr_training_data.part4.tar.gz wget "https://www.dropbox.com/scl/fi/3us8qbxra7v01marw52g3/hsmr_training_data.part5.tar.gz?rlkey=737cofc38z9imafk016n4lxmz&st=qowg65xy&dl=1" \ -O data_inputs/hsmr_training_data/hsmr_training_data.part5.tar.gz wget "https://www.dropbox.com/scl/fi/2du8j0wll367mxmqk8u37/hsmr_training_data.part6.tar.gz?rlkey=cdz3trhq1eycyko0ahba5ojen&st=ke4a306z&dl=1" \ -O data_inputs/hsmr_training_data/hsmr_training_data.part6.tar.gz wget "https://www.dropbox.com/scl/fi/kb2gv7z45d9ha3clof33j/hsmr_training_data.part7.tar.gz?rlkey=7sonxtqqhuctvzfrpecdnbpd1&st=lbv2oh5n&dl=1" \ -O data_inputs/hsmr_training_data/hsmr_training_data.part7.tar.gzfile name sha1sum size hsmr_training_data.part1.tar.gz 6675c3f5987186893c4bc5c8616a5ce743ce941d30G hsmr_training_data.part2.tar.gz dd62b3e86e8c8ae33436aa5e54d4e9ef27a6450341G hsmr_training_data.part3.tar.gz 97a98f70488fddff2ac7a4055b4a831039d95ac439G hsmr_training_data.part4.tar.gz 5ac1f308fe0c0e96db7c27308292ae03d2fd9d1f39G hsmr_training_data.part5.tar.gz b0898c9ef37f417c15589224199948476cfc3abe39G hsmr_training_data.part6.tar.gz c7cc0a94f439fd4614b2c97d62767bcc2332f2a237G hsmr_training_data.part7.tar.gz c62b5f96d0168a5ac0eacb772ecc3eb55c9b275639G - Alternatively, you can download the un-packaged webdataset tars from HuggingFace Dataset.
- Check the integrity of the downloaded files:
sha1sum hsmr_training_data.part*.tar.gz - Unzip and add to the codebase.
cd data_inputs/hsmr_training_data for file in hsmr_training_data.part*.tar.gz; do tar -xzvf "$file" done