All Projects → HongwenZhang → PyMAF

HongwenZhang / PyMAF

Licence: other
[ICCV21, Oral] PyMAF: 3D Human Pose and Shape Regression with Pyramidal Mesh Alignment Feedback Loop

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to PyMAF

MEVA
Official implementation of ACCV 2020 paper "3D Human Motion Estimation via Motion Compression and Refinement" (Identical repo to https://github.com/KlabCMU/MEVA, will be kept in sync)
Stars: ✭ 93 (-72.07%)
Mutual labels:  3d-human-pose, smpl
Vibe
Official implementation of CVPR2020 paper "VIBE: Video Inference for Human Body Pose and Shape Estimation"
Stars: ✭ 2,080 (+524.62%)
Mutual labels:  3d-human-pose, smpl
HybrIK
Official code of "HybrIK: A Hybrid Analytical-Neural Inverse Kinematics Solution for 3D Human Pose and Shape Estimation", CVPR 2021
Stars: ✭ 395 (+18.62%)
Mutual labels:  smpl
metro-pose3d
Metric-Scale Truncation-Robust Heatmaps for 3D Human Pose Estimation
Stars: ✭ 51 (-84.68%)
Mutual labels:  3d-human-pose
poseviz
3D Human Pose Visualizer for Python
Stars: ✭ 68 (-79.58%)
Mutual labels:  3d-human-pose
MobileHumanPose
This repo is official PyTorch implementation of MobileHumanPose: Toward real-time 3D human pose estimation in mobile devices(CVPRW 2021).
Stars: ✭ 206 (-38.14%)
Mutual labels:  3d-human-pose
RSC-Net
Implementation for "3D human pose, shape and texture from low-resolution images and videos", TPAMI 2021
Stars: ✭ 43 (-87.09%)
Mutual labels:  3d-human-shape-and-pose-estimation
Awesome Human Pose Estimation
A collection of awesome resources in Human Pose estimation.
Stars: ✭ 2,022 (+507.21%)
Mutual labels:  3d-human-pose
BOA
Bilevel Online Adaptation for Human Mesh Reconstruction
Stars: ✭ 43 (-87.09%)
Mutual labels:  smpl
SMPL-NeRF
Embed human pose information into neural radiance fields (NeRF) to render images of humans in desired poses 🏃 from novel views
Stars: ✭ 29 (-91.29%)
Mutual labels:  smpl
ICON
ICON: Implicit Clothed humans Obtained from Normals (CVPR 2022)
Stars: ✭ 641 (+92.49%)
Mutual labels:  smpl
PARE
Code for ICCV2021 paper PARE: Part Attention Regressor for 3D Human Body Estimation
Stars: ✭ 222 (-33.33%)
Mutual labels:  3d-human-shape-and-pose-estimation

👋👋👋 [Update] PyMAF is now extended as PyMAF-X for full-body model recovery. Check out the new project page here

PyMAF

This repository contains the code for the following paper:

PyMAF: 3D Human Pose and Shape Regression with Pyramidal Mesh Alignment Feedback Loop
Hongwen Zhang*, Yating Tian*, Xinchi Zhou, Wanli Ouyang, Yebin Liu, Limin Wang, Zhenan Sun
* Equal contribution

ICCV, 2021 (Oral Paper)

[Project Page] [Paper]


Frame by frame reconstruction. Video clipped from here.


Frame by frame reconstruction. Video clipped from here.

More results: Click Here

Requirements

  • Python 3.6.10

packages

necessary files

mesh_downsampling.npz & DensePose UV data

  • Run the following script to fetch mesh_downsampling.npz & DensePose UV data from other repositories.
bash fetch_data.sh

SMPL model files

Fetch preprocessed data from SPIN.

Fetch final_fits data from SPIN.

Download the pre-trained model and put it into the ./data/pretrained_model directory.

After collecting the above necessary files, the directory structure of ./data is expected as follows.

./data
├── dataset_extras
│   └── .npz files
├── J_regressor_extra.npy
├── J_regressor_h36m.npy
├── mesh_downsampling.npz
├── pretrained_model
│   └── PyMAF_model_checkpoint.pt
├── smpl
│   ├── SMPL_FEMALE.pkl
│   ├── SMPL_MALE.pkl
│   └── SMPL_NEUTRAL.pkl
├── smpl_mean_params.npz
├── final_fits
│   └── .npy files
└── UV_data
    ├── UV_Processed.mat
    └── UV_symmetry_transforms.mat

Demo

[UPDATE] You can first give it a try on Google Colab using the notebook we have prepared, which is no need to prepare the environment yourself: Open In Colab

Run the demo code.

For image input:

python3 demo.py --checkpoint=data/pretrained_model/PyMAF_model_checkpoint.pt --img_file examples/COCO_val2014_000000019667.jpg

For video input:

# video with single person
python3 demo.py --checkpoint=data/pretrained_model/PyMAF_model_checkpoint.pt --vid_file examples/dancer.mp4
# video with multiple persons
python3 demo.py --checkpoint=data/pretrained_model/PyMAF_model_checkpoint.pt --vid_file examples/flashmob.mp4

Evaluation

COCO Keypoint Localization

  1. Download the preprocessed data coco_2014_val.npz. Put it into the ./data/dataset_extras directory.

  2. Run the COCO evaluation code.

python3 eval_coco.py --checkpoint=data/pretrained_model/PyMAF_model_checkpoint.pt

Results in Average Precision (AP):

Method AP ↑ AP50 AP75 APM APL
HMR 18.9 47.5 11.7 21.5 17.0
SPIN 17.3 39.1 13.5 19.0 16.6
Baseline 16.8 38.2 12.8 18.5 16.0
PyMAF 24.6 48.9 22.7 26.0 24.2

Human3.6M / 3DPW

Run the evaluation code. Using --dataset to specify the evaluation dataset.

# Example usage:

# Human3.6M Protocol 2
python3 eval.py --checkpoint=data/pretrained_model/PyMAF_model_checkpoint.pt --dataset=h36m-p2 --log_freq=20

# 3DPW
python3 eval.py --checkpoint=data/pretrained_model/PyMAF_model_checkpoint.pt --dataset=3dpw --log_freq=20

Results in Mean Per Joint Position Error (MPJPE):

Method 3DPW ↓ H36M ↓
SPIN 96.9 62.5
VIBE 93.5 65.9
Baseline 98.5 64.8
PyMAF 92.8 57.7

Training

To perform training, we need to collect preprocessed files of training datasets at first.

The preprocessed labels have the same format as SPIN and can be retrieved from here. Please refer to SPIN for more details about data preprocessing.

PyMAF is trained on Human3.6M at the first stage and then trained on the mixture of both 2D and 3D datasets at the second stage. Example usage:

# training on Human3.6M
CUDA_VISIBLE_DEVICES=0 python3 train.py --regressor pymaf_net --single_dataset --misc TRAIN.BATCH_SIZE 64
# training on mixed datasets
CUDA_VISIBLE_DEVICES=0 python3 train.py --regressor pymaf_net --pretrained_checkpoint path/to/checkpoint_file.pt --misc TRAIN.BATCH_SIZE 64

Running the above commands will use Human3.6M or mixed datasets for training, respectively. We can monitor the training process by setting up a TensorBoard at the directory ./logs.

Citation

If this work is helpful in your research, please cite the following paper.

@inproceedings{pymaf2021,
  title={PyMAF: 3D Human Pose and Shape Regression with Pyramidal Mesh Alignment Feedback Loop},
  author={Zhang, Hongwen and Tian, Yating and Zhou, Xinchi and Ouyang, Wanli and Liu, Yebin and Wang, Limin and Sun, Zhenan},
  booktitle={Proceedings of the IEEE International Conference on Computer Vision},
  year={2021}
}

Acknowledgments

The code is developed upon the following projects. Many thanks to their contributions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].