Installations

August 17, 2025 ยท View on GitHub

Environment Setup

ubt20.04 py cuda12.3

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 provide docs/requirements_py3.8.txt with 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

Tips: click to expand/fold instructions.

๐Ÿ’€ SKEL Model
  1. 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 in changelog_v1.1.1.txt. Any lower versions are not compatible.

  2. Add skel_models_v1.1 to 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
  1. Sign in SMPLify Homepage > Downloads and click SMPLIFY_CODE_V2.ZIP. You will get mpips_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
    โ”‚   โ”‚   โ””โ”€โ”€ ...
    โ”‚   โ””โ”€โ”€ ...
    โ””โ”€โ”€ ...
    
  2. 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
  1. Download HSMR-ViTH-r1d1.tar.gz from 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
    
  2. 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.

  1. Prepare the evaluation datasets used by HMR2.0:
    1. Download hmr2_evaluation_data.tar.gz from 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
      
    2. 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.
  2. Prepare the MOYO evaluation dataset:
    1. Download hsmr_evaluation_data.tar.gz from 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
      
    2. Download MoYo images from here.
  3. 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
  1. 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.gz
    
    file namesha1sumsize
    hsmr_training_data.part1.tar.gz6675c3f5987186893c4bc5c8616a5ce743ce941d30G
    hsmr_training_data.part2.tar.gzdd62b3e86e8c8ae33436aa5e54d4e9ef27a6450341G
    hsmr_training_data.part3.tar.gz97a98f70488fddff2ac7a4055b4a831039d95ac439G
    hsmr_training_data.part4.tar.gz5ac1f308fe0c0e96db7c27308292ae03d2fd9d1f39G
    hsmr_training_data.part5.tar.gzb0898c9ef37f417c15589224199948476cfc3abe39G
    hsmr_training_data.part6.tar.gzc7cc0a94f439fd4614b2c97d62767bcc2332f2a237G
    hsmr_training_data.part7.tar.gzc62b5f96d0168a5ac0eacb772ecc3eb55c9b275639G
  2. Check the integrity of the downloaded files:
    sha1sum hsmr_training_data.part*.tar.gz
    
  3. 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