Skip to content

Vegetebird/GraphMLP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphMLP: A Graph MLP-Like Architecture for 3D Human Pose Estimation

skating anime

This is the official implementation of the approach described in the paper:

GraphMLP: A Graph MLP-Like Architecture for 3D Human Pose Estimation,
Wenhao Li, Hong Liu, Tianyu Guo, Hao Tang, and Runwei Ding,
arXiv, 2022

Installation

GraphMLP is tested on Ubuntu 18 with Pytorch 1.7.1 and Python 3.9.

  • Create a conda environment: conda create -n graphmlp python=3.9
  • Install PyTorch 1.7.1 and Torchvision 0.8.2 following the official instructions
  • pip3 install -r requirements.txt

Dataset setup

Please download the dataset from Human3.6M website and MPI-INF-3DHP website, and refer to VideoPose3D to set up the Human3.6M dataset ('./dataset' directory). Or you can download the processed data from here.

${POSE_ROOT}/
|-- dataset
|   |-- data_3d_h36m.npz
|   |-- data_3d_3dhp.npz
|   |-- data_2d_h36m_gt.npz
|   |-- data_2d_h36m_cpn_ft_h36m_dbb.npz
|   |-- data_2d_3dhp.npz

Download pretrained model

The pretrained model can be found in here, please download it and put it in the './checkpoint/pretrained' directory.

Test the model

To test on a 1-frame GraphMLP model:

# Human3.6M
python main.py --test --previous_dir 'checkpoint/pretrained/1' --frames 1

# MPI-INF-3DHP
python main.py --test --previous_dir 'checkpoint/pretrained/1' --frames 1 --dataset '3dhp'

To test on a 1-frame GraphMLP model with refine module on Human3.6M:

python main.py --test --previous_dir 'checkpoint/pretrained/1/refine' --frames 1 --refine --refine_reload

To test on a 243-frames GraphMLP model on Human3.6M:

python main.py --test --previous_dir 'checkpoint/pretrained/243' --frames 243

Here, we report the parameters, FLOPs, and MPJPE of GraphMLP with different input frame numbers on Human3.6M dataset.

1 27 81 243
Param (M) 9.49 9.51 9.57 9.73
FLOPs (M) 348 349 351 356
MPJPE (mm) 49.2 45.5 44.5 43.8

Train the model

To train a 1-frame GraphMLP model on Human3.6M:

# Train from scratch
python main.py --frames 1 --batch_size 256

# After training for 20 epochs, add refine module
python main.py --frames 1 --batch_size 256 --refine --lr 1e-5 --previous_dir [your best model saved path]

To train a 243-frames GraphMLP model on Human3.6M:

python main.py --frames 243 --batch_size 64

Demo

First, you need to download YOLOv3 and HRNet pretrained models here and put it in the './demo/lib/checkpoint' directory. Then, you need to put your in-the-wild videos in the './demo/video' directory.

Run the command below:

# Run the command below:
python demo/vis.py --video sample_video

# Or run the command with the fixed z-axis:
python demo/vis.py --video sample_video.mp4 --fix_z

Sample demo output:

sample_video sample_video_fix_z

Citation

If you find our work useful in your research, please consider citing:

@article{li2022graphmlp,
  title={GraphMLP: A Graph MLP-Like Architecture for 3D Human Pose Estimation},
  author={Li, Wenhao and Liu, Hong and Guo, Tianyu and Tang, Hao and Ding, Runwei},
  journal={arXiv preprint arXiv:2206.06420},
  year={2022}
}

Acknowledgement

Our code is extended from the following repositories. We thank the authors for releasing the codes.

Licence

This project is licensed under the terms of the MIT license.

About

Official implementation of our paper "GraphMLP: A Graph MLP-Like Architecture for 3D Human Pose Estimation".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages