• Stars
    star
    631
  • Rank 71,222 (Top 2 %)
  • Language
    Python
  • License
    BSD 2-Clause "Sim...
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Project for paper "Learning 3D Human Dynamics from Video"

Learning 3D Human Dynamics from Video

Angjoo Kanazawa*, Jason Zhang*, Panna Felsen*, Jitendra Malik

University of California, Berkeley (* Equal contribution)

Project Page

Teaser Image

Requirements

There is currently no CPU-only support.

License

Please note that while our code is under BSD, the SMPL model and datasets we use have their own licenses that must be followed.

Contributions

Installation

Setup virtualenv

virtualenv venv_hmmr -p python3
source venv_hmmr/bin/activate
pip install -U pip
pip install numpy  # Some of the required packages need numpy to already be installed.
deactivate
source venv_hmmr/bin/activate
pip install -r requirements.txt

Install External Dependencies.

Neural Mesh Renderer and AlphaPose for rendering results:

cd src/external
sh install_external.sh

The above script also clones my fork of AlphaPose/PoseFlow, which is necessary to run the demo to extract tracks of people in videos. Please follow the directions in the installation, in particular running pip install -r requirements.txt from src/external/AlphaPose and downloading the trained models.

If you have a pre-installed version of AlphaPose, symlink the directory in src/external. The only change that my fork has is a very minor modification in AlphaPose/pytorch branch's demo.py: see this commit, copy over the changes in demo.py.

Demo

  1. Download the pre-trained models (also available on Google Drive). Place the models folder as a top-level directory.
wget http://angjookanazawa.com/cachedir/hmmr/hmmr_models.tar.gz && tar -xf hmmr_models.tar.gz
  1. Download the demo_data videos (also available on Google Drive). Place the demo_data folder as a top-level directory.
wget http://angjookanazawa.com/cachedir/hmmr/hmmr_demo_data.tar.gz && tar -xf hmmr_demo_data.tar.gz
  1. Run the demo. This code runs AlphaPose/PoseFlow for you. Please make sure AlphaPose can be run on a directory of images if you are having any issues.

Sample usage:

# Run on a single video:
python -m demo_video --vid_path demo_data/penn_action-2278.mp4 --load_path models/hmmr_model.ckpt-1119816

# If there are multiple people in the video, you can also pass a track index:
python -m demo_video --track_id 1 --vid_path demo_data/insta_variety-tabletennis_43078913_895055920883203_6720141320083472384_n_short.mp4 --load_path models/hmmr_model.ckpt-1119816

# Run on an entire directory of videos:
python -m demo_video --vid_dir demo_data/ --load_path models/hmmr_model.ckpt-1119816

This will make a directory demo_output/<video_name>, where intermediate tracking results and our results are saved as video, as well as a pkl file. Alternatively you can specify the output directory as well. See demo_video.py

Training code

See doc/train.

Data

InstaVariety

Insta-Variety Teaser

We provided the raw list of videos used for InstaVariety, as well as the pre-processed files in tfrecords. Please see doc/insta_variety.md for more details..

Citation

If you use this code for your research, please consider citing:

@InProceedings{humanMotionKZFM19,
  title={Learning 3D Human Dynamics from Video},
  author = {Angjoo Kanazawa and Jason Y. Zhang and Panna Felsen and Jitendra Malik},
  booktitle={Computer Vision and Pattern Recognition (CVPR)},
  year={2019}
}

More Repositories

1

hmr

Project page for End-to-end Recovery of Human Shape and Pose
Python
1,543
star
2

cmr

Project repo for Learning Category-Specific Mesh Reconstruction from Image Collections
Python
475
star
3

motion_reconstruction

Motion Reconstruction Code and Data for Skills from Videos (SFV)
Python
312
star
4

vgan

Code for image generation of Variational Discriminator Bottleneck: Improving Imitation Learning, Inverse RL, and GANs by Constraining Information Flow
Python
141
star
5

catdeform

A Matlab implementation for the paper: "Learning 3D Deformation of Animals from 2D Images" http://www.umiacs.umd.edu/~kanazawa/papers/cat_eg2016.pdf
MATLAB
46
star
6

Semantic-texton-forests

Implementation of semantic texton forests in matlab
MATLAB
23
star
7

MRF

simple implementation of MRF foreground/background segmentation for CMSC828 Spring '12
C++
21
star
8

Structure-from-Motion

Affine structure from motion in image sequences adapted from Derek Hoiem's CS 543/ECE 549 course at the University of Illinois at Urbana-Champaign
MATLAB
18
star
9

si-convnet

Implementation of the [Locally Scale-Invariant Convolutional Neural Network](http://www.umiacs.umd.edu/~kanazawa/papers/sicnn_workshop2014.pdf)
C++
17
star
10

Intrinsic-Image

experiments with intrinsic image decomposition
C++
16
star
11

Topic-Random-Field

Implementation of "Image Segementation with Topic Random Field" by Zhao, Fei-fei, and Xing.
MATLAB
8
star
12

Explicit_Shape_Regression

Implementation of the paper for face alignment by MSRA research.microsoft.com/en-us/.../cvpr12_facealignment.pdf
MATLAB
7
star
13

Basic-Classification

ML Fall '10 project 1
Python
4
star
14

Class-Notes

All of my class notes!
Emacs Lisp
4
star
15

Nonlinear-Diffusion

bare minimum illustration of 3 nonlinear image denoising methods
MATLAB
3
star
16

Complex-Classification

ML Fall '11 project 2
Python
2
star
17

Collective-Classification

C++
2
star
18

Instagram-Scraper

Scrape images from instagram
Ruby
2
star
19

Formal-Reasoning-in-Computer-Science

University of Maryland open study group on mathematical proofs, theoretical arguments, probability theory and randomized algorithms. Focus on solving problems. Content has been chosen to complement graduate-level work in computer science.
Emacs Lisp
2
star
20

Unsupervised-Learning

UMD Fall '11 CMS726 Machine Learning Project 3 with Hall Daume.
Python
1
star