Home

Awesome

Uplift and Upsample 3D HPE

Example

This repository is the official implementation of Uplift and Upsample: Efficient 3D Human Pose Estimation with Uplifting Transformers .

The paper is accepted for WACV'23.

Updates

Dependencies

Dataset

Human3.6M

We refer to VideoPose3D for the dataset setup. Follow the instructions there to generate the dataset in the common .npz format. You will need the following generated files:

Copy all files to the ./data directory.

AMASS

In case you want to pre-train your own model on AMASS mocap data, please follow the dataset setup.

Trained Models

Human3.6M

We provide trained models on Human3.6M for the following settings:

NameNs_outs_inAMASS pre-trainingConfigDownload
h36m_351.h53515{5, 10, 20}config/h36m_351.jsonGoogle Drive
h36m_351_pt.h53515{5, 10, 20}Yesconfig/h36m_351_pt.jsonGoogle Drive
h36m_81.h5812{4, 10, 20}config/h36m_81.jsonGoogle Drive

Copy any trained model to the ./models directory.

The models achieve the following MPJPE (all frames, in mm) on Human 3.6M:

Names_in = 4s_in = 5s_in = 10s_in = 20
h36m_351.h5X45.746.147.8
h36m_351_pt.h5X42.643.145.0
h36m_81.h547.4X47.949.9

AMASS

We also provide a pre-trained model on AMASS mocap data with the following setting:

NameNs_outs_inConfigDownload
amass_351.h53515{5, 10, 20}config/amass_351.jsonGoogle Drive

Copy this pre-trained model to the ./models directory as well.

Evaluation

You can run evaluation on Human3.6M for our pre-trained models with the eval.py script:

python eval.py --weights ./models/XXX.h5  --config ./config/XXX.json

where ./models/XXX.h5 is the path to the model weights and ./config/XXX.json is the path to the model configuration. By default, evaluation is run for all values of s_in that were used during training. You can limit evaluation to one specific s_in value with the --forced_mask_stride <value> switch. If the pre-defined batch size for evaluation is too large for your GPU, you can manually lower it with the --batch_size <value> switch.

Training

Human3.6M

You can train the models on Human3.6M yourself with the train.py script:

python train.py --train_subset trainval --val_subset none --test_subset test [ARGS]

Please see the table below for the correct additional ARGS:

ConfigAMASS pre-trainingARGS
config/h36m_351.json--config ./config/h36m_351.json --out_dir ./logs/h36m_351
config/h36m_351_pt.jsonYes--config ./config/h36m_351_pt.json --weights ./models/amass_351.h5 --out_dir ./logs/h36m_351_pt
config/h36m_81.json--config ./config/h36m_81.json --out_dir ./logs/h36m_81

Logs, checkpoints, etc. will be stored in the specified ./logs/xxx directory.

AMASS

If you want you can pre-train your own model on AMASS mocap data. We provide instructions to run the pre-training used for config/h36m_351_pt.json.

Make sure to follow the AMASS dataset setup. Pre-training on AMASS can be run with the same train.py script:

python train.py --dataset amass --amass_path ./data/amass --test_subset none  --config ./config/amass_351.json  --out_dir ./logs/amass_351

Citation

In case this work is useful for your research, please consider citing:

@InProceedings{einfalt_up3dhpe_WACV23,
title={Uplift and Upsample: Efficient 3D Human Pose Estimation with Uplifting Transformers},
author={Einfalt, Moritz and Ludwig, Katja and Lienhart, Rainer},
booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
month     = {January},
year      = {2023},
}

Acknowledgments

Our code is heavily influenced by the following projects:

We are grateful to the corresponding authors for releasing their code.