(ICCV 2021) ProHMR - Probabilistic Modeling for Human Mesh Recovery

Related tags

Deep LearningProHMR
Overview

ProHMR - Probabilistic Modeling for Human Mesh Recovery

Code repository for the paper:
Probabilistic Modeling for Human Mesh Recovery
Nikos Kolotouros, Georgios Pavlakos, Dinesh Jayaraman, Kostas Daniilidis
ICCV 2021
[paper] [project page] [colab notebook]

teaser

Installation instructions

We recommend creating a clean conda environment and install all dependencies. You can do this as follows:

conda env create -f environment.yml

After the installation is complete you can activate the conda environment by running:

conda activate prohmr

Alternatively, you can also create a virtual environment:

python -m venv .prohmr_venv
source .prohmr_venv/bin/activate
pip install -r requirements.txt

The last step is to install prohmr as a Python package. This will allow you to import it from anywhere in your system. Since you might want to modify the code, we recommend installing as follows:

python setup.py develop

In case you want to evaluate our approach on Human3.6M, you also need to manually install the pycdf package of the spacepy library to process some of the original files. If you face difficulties with the installation, you can find more elaborate instructions here.

Fetch data

Download the pretrained model checkpoint together with some additional data (joint regressors, etc.) and place them under data/. We provide a script to fetch the necessary data for training and evaluation. You need to run:

./fetch_data.sh

Besides these files, you also need to download the SMPL model. You will need the neutral model for training and running the demo code, while the male and female models will be necessary for preprocessing the 3DPW dataset. Please go to the websites for the corresponding projects and register to get access to the downloads section. Create a folder data/smpl/ and place the models there.

Run demo code

The easiest way to try our demo is by providing images with their corresponding OpenPose detections. These are used to compute the bounding boxes around the humans and optionally fit the SMPL body model to the keypoint detections. We provide some example images in the example_data/ folder. You can test our network on these examples by running:

python demo.py --img_folder=example_data/images --keypoint_folder=example_data/keypoints --out_folder=out --run_fitting

You might see some warnings about missing keys for SMPL components, which you can ignore. The code will save the rendered results for the regression and fitting in the newly created out/ directory. By default the demo code performs the fitting in the image crop and not in the original image space. If you want to instead fit in the original image space you can pass the --full_frame flag.

Colab Notebook

We also provide a Colab Notebook here where you can test our method on videos from YouTube. Check it out!

Dataset preprocessing

Besides the demo code, we also provide code to train and evaluate our models on the datasets we employ for our empirical evaluation. Before continuing, please make sure that you follow the details for data preprocessing.

Run evaluation code

The evaluation code is contained in eval/. We provide 4 different evaluation scripts.

  • eval_regression.py is used to evaluate ProHMR as a regression model as in Table 1 of the paper.
  • eval_keypoint_fitting.py is used to evaluate the fitting on 2D keypoints as in Table 3 of the paper.
  • eval_multiview.py is used to evaluate the multi-view refinement as in Table 5 of the paper.
  • eval_skeleton.py is used to evaluate the probablistic 2D pose lifiting network similarly with Table 6 of the main paper. Example usage:
python eval/eval_keypoint_fitting.py --dataset=3DPW-TEST

Running the above command will compute the Reconstruction Error before and after the fitting on the test set of 3DPW. For more information on the available command line options you can run the command with the --help argument.

Run training code

Due to license limitiations, we cannot provide the SMPL parameters for Human3.6M (recovered using MoSh). Even if you do not have access to these parameters, you can still use our training code using data from the other datasets. Again, make sure that you follow the details for data preprocessing. Alternatively you can use the SMPLify 3D fitting code to generate SMPL parameter annotations by fitting the model to the 3D keypoints provided by the dataset. Example usage:

python train/train_prohmr.py --root_dir=prohmr_reproduce/

This will train the model using the default config file prohmr/configs/prohmr.yaml as described in the paper. It will also create the folders prohmr_reproduce/checkpoints and prohmr_reproduce/tensorboard where the model checkpoints and Tensorboard logs will be saved.

We also provide the training code for the probabilistic version of Martinez et al. We are not allowed to redistribute the Stacked Hourglass keypoint detections used in training the model in the paper, so in this version of the code we replace them with the ground truth 2D keypoints of the dataset. You can train the skeleton model by running:

python train/train_skeleton.py --root_dir=skeleton_lifting/

Running this script will produce a similar output with the ProHMR training script.

Acknowledgements

Parts of the code are taken or adapted from the following repos:

Citing

If you find this code useful for your research or the use data generated by our method, please consider citing the following paper:

@Inproceedings{kolotouros2021prohmr,
  Title          = {Probabilistic Modeling for Human Mesh Recovery},
  Author         = {Kolotouros, Nikos and Pavlakos, Georgios and Jayaraman, Dinesh and Daniilidis, Kostas},
  Booktitle      = {ICCV},
  Year           = {2021}
}
Owner
Nikos Kolotouros
I am a CS PhD student at the University of Pennsylvania working on Computer Vision and Machine Learning.
Nikos Kolotouros
Deep Reinforcement Learning for mobile robot navigation in ROS Gazebo simulator

DRL-robot-navigation Deep Reinforcement Learning for mobile robot navigation in ROS Gazebo simulator. Using Twin Delayed Deep Deterministic Policy Gra

87 Jan 07, 2023
Punctuation Restoration using Transformer Models for High-and Low-Resource Languages

Punctuation Restoration using Transformer Models This repository contins official implementation of the paper Punctuation Restoration using Transforme

Tanvirul Alam 142 Jan 01, 2023
Diverse Branch Block: Building a Convolution as an Inception-like Unit

Diverse Branch Block: Building a Convolution as an Inception-like Unit (PyTorch) (CVPR-2021) DBB is a powerful ConvNet building block to replace regul

253 Dec 24, 2022
Texture mapping with variational auto-encoders

vae-textures This is an experiment with using variational autoencoders (VAEs) to perform mesh parameterization. This was also my first project using J

Alex Nichol 41 May 24, 2022
A large-scale database for graph representation learning

A large-scale database for graph representation learning

Scott Freitas 29 Nov 25, 2022
《Lerning n Intrinsic Grment Spce for Interctive Authoring of Grment Animtion》

Learning an Intrinsic Garment Space for Interactive Authoring of Garment Animation Overview This is the demo code for training a motion invariant enco

YuanBo 213 Dec 14, 2022
A universal memory dumper using Frida

Fridump Fridump (v0.1) is an open source memory dumping tool, primarily aimed to penetration testers and developers. Fridump is using the Frida framew

551 Jan 07, 2023
Differentiable rasterization applied to 3D model simplification tasks

nvdiffmodeling Differentiable rasterization applied to 3D model simplification tasks, as described in the paper: Appearance-Driven Automatic 3D Model

NVIDIA Research Projects 336 Dec 30, 2022
Repository for GNSS-based position estimation using a Deep Neural Network

Code repository accompanying our work on 'Improving GNSS Positioning using Neural Network-based Corrections'. In this paper, we present a Deep Neural

32 Dec 13, 2022
python debugger and anti-vm that checks if you're in a virtual machine or if someones trying to debug your file

Anti-Debug was made by Love ❌ code ✅ 🎉 ・What it checks for ・ Kills tools that can be used to debug your file ・ Exits if ran in vm (supports different

Rdimo 31 Aug 09, 2022
Official implementation for the paper: Permutation Invariant Graph Generation via Score-Based Generative Modeling

Permutation Invariant Graph Generation via Score-Based Generative Modeling This repo contains the official implementation for the paper Permutation In

64 Dec 29, 2022
An Unbiased Learning To Rank Algorithms (ULTRA) toolbox

Unbiased Learning to Rank Algorithms (ULTRA) This is an Unbiased Learning To Rank Algorithms (ULTRA) toolbox, which provides a codebase for experiment

back 3 Nov 18, 2022
Koç University deep learning framework.

Knet Knet (pronounced "kay-net") is the Koç University deep learning framework implemented in Julia by Deniz Yuret and collaborators. It supports GPU

1.4k Dec 31, 2022
Custom Implementation of Non-Deep Networks

ParNet Custom Implementation of Non-deep Networks arXiv:2110.07641 Ankit Goyal, Alexey Bochkovskiy, Jia Deng, Vladlen Koltun Official Repository https

Pritama Kumar Nayak 20 May 27, 2022
Speech Enhancement Generative Adversarial Network Based on Asymmetric AutoEncoder

ASEGAN: Speech Enhancement Generative Adversarial Network Based on Asymmetric AutoEncoder 中文版简介 Readme with English Version 介绍 基于SEGAN模型的改进版本,使用自主设计的非

Nitin 53 Nov 17, 2022
TransPrompt - Towards an Automatic Transferable Prompting Framework for Few-shot Text Classification

TransPrompt This code is implement for our EMNLP 2021's paper 《TransPrompt:Towards an Automatic Transferable Prompting Framework for Few-shot Text Cla

WangJianing 23 Dec 21, 2022
Anime Face Detector using mmdet and mmpose

Anime Face Detector This is an anime face detector using mmdetection and mmpose. (To avoid copyright issues, I use generated images by the TADNE model

198 Jan 07, 2023
a morph transfer UGATIT for image translation.

Morph-UGATIT a morph transfer UGATIT for image translation. Introduction 中文技术文档 This is Pytorch implementation of UGATIT, paper "U-GAT-IT: Unsupervise

55 Nov 14, 2022
FG-transformer-TTS Fine-grained style control in transformer-based text-to-speech synthesis

LST-TTS Official implementation for the paper Fine-grained style control in transformer-based text-to-speech synthesis. Submitted to ICASSP 2022. Audi

Li-Wei Chen 64 Dec 30, 2022
Code release for "COTR: Correspondence Transformer for Matching Across Images"

COTR: Correspondence Transformer for Matching Across Images This repository contains the inference code for COTR. We plan to release the training code

UBC Computer Vision Group 360 Jan 06, 2023