All Projects → princeton-vl → Pose Hg Train

princeton-vl / Pose Hg Train

Licence: other
Training and experimentation code used for "Stacked Hourglass Networks for Human Pose Estimation"

Projects that are alternatives of or similar to Pose Hg Train

Data Science Your Way
Ways of doing Data Science Engineering and Machine Learning in R and Python
Stars: ✭ 530 (-2.03%)
Mutual labels:  jupyter-notebook
Training Data Analyst
Labs and demos for courses for GCP Training (http://cloud.google.com/training).
Stars: ✭ 5,653 (+944.92%)
Mutual labels:  jupyter-notebook
Python intro
Jupyter notebooks in Russian. Introduction to Python, basic algorithms and data structures
Stars: ✭ 538 (-0.55%)
Mutual labels:  jupyter-notebook
Mtcnn Pytorch
Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
Stars: ✭ 531 (-1.85%)
Mutual labels:  jupyter-notebook
Deeplearning
深度学习入门教程, 优秀文章, Deep Learning Tutorial
Stars: ✭ 6,783 (+1153.79%)
Mutual labels:  jupyter-notebook
Intro To Python
An intro to Python & programming for wanna-be data scientists
Stars: ✭ 536 (-0.92%)
Mutual labels:  jupyter-notebook
Stock analysis for quant
Different Types of Stock Analysis in Python, R, Matlab, Excel, Power BI
Stars: ✭ 525 (-2.96%)
Mutual labels:  jupyter-notebook
Attention Networks For Classification
Hierarchical Attention Networks for Document Classification in PyTorch
Stars: ✭ 540 (-0.18%)
Mutual labels:  jupyter-notebook
Dlaicourse
Notebooks for learning deep learning
Stars: ✭ 5,355 (+889.83%)
Mutual labels:  jupyter-notebook
Torchdyn
A PyTorch based library for all things neural differential equations
Stars: ✭ 535 (-1.11%)
Mutual labels:  jupyter-notebook
Tensor Sensor
The goal of this library is to generate more helpful exception messages for numpy/pytorch matrix algebra expressions.
Stars: ✭ 532 (-1.66%)
Mutual labels:  jupyter-notebook
Digital Signal Processing Lecture
Digital Signal Processing - Theory and Computational Examples
Stars: ✭ 532 (-1.66%)
Mutual labels:  jupyter-notebook
Justenoughscalaforspark
A tutorial on the most important features and idioms of Scala that you need to use Spark's Scala APIs.
Stars: ✭ 538 (-0.55%)
Mutual labels:  jupyter-notebook
Fullstack Data Engineer
全栈数据工程师养成攻略
Stars: ✭ 531 (-1.85%)
Mutual labels:  jupyter-notebook
Notebooks
Some sample IPython notebooks for scikit-learn
Stars: ✭ 539 (-0.37%)
Mutual labels:  jupyter-notebook
Interpretable machine learning with python
Examples of techniques for training interpretable ML models, explaining ML models, and debugging ML models for accuracy, discrimination, and security.
Stars: ✭ 530 (-2.03%)
Mutual labels:  jupyter-notebook
Terrapattern
Enabling journalists, citizen scientists, humanitarian workers and others to detect “patterns of interest” in satellite imagery.
Stars: ✭ 536 (-0.92%)
Mutual labels:  jupyter-notebook
Photomosaic
Creating fun photomosaics, GIFs, and murals from your family pictures using ML & similarity search
Stars: ✭ 540 (-0.18%)
Mutual labels:  jupyter-notebook
Keras Openface
Keras-OpenFace is a project converting OpenFace from Torch implementation to a Keras version
Stars: ✭ 538 (-0.55%)
Mutual labels:  jupyter-notebook
Srflow
Official SRFlow training code: Super-Resolution using Normalizing Flow in PyTorch
Stars: ✭ 537 (-0.74%)
Mutual labels:  jupyter-notebook

Stacked Hourglass Networks for Human Pose Estimation (Training Code)

This is the training pipeline used for:

Alejandro Newell, Kaiyu Yang, and Jia Deng, Stacked Hourglass Networks for Human Pose Estimation, arXiv:1603.06937, 2016.

A pretrained model is available on the project site. You can use the option -loadModel path/to/model to try fine-tuning.

To run this code, make sure the following are installed:

Getting Started

Download the full MPII Human Pose dataset, and place the images directory in data/mpii. From there, it is as simple as running th main.lua -expID test-run (the experiment ID is arbitrary). To run on FLIC, again place the images in a directory data/flic/images then call th main.lua -dataset flic -expID test-run.

Most of the command line options are pretty self-explanatory, and can be found in src/opts.lua. The -expID option will be used to save important information in a directory like pose-hg-train/exp/mpii/test-run. This directory will include snapshots of the trained model, training/validations logs with loss and accuracy information, and details of the options set for that particular experiment.

Running experiments

There are a couple features to make experiments a bit easier:

  • Experiment can be continued with th main.lua -expID example-exp -continue it will pick up where the experiment left off with all of the same options set. But let's say you want to change an option like the learning rate, then you can do the same call as above but add the option -LR 1e-5 for example and it will preserve all old options except for the new learning rate.

  • In addition, the -branch option allows for the initialization of a new experiment directory leaving the original experiment intact. For example, if you have trained for a while and want to drop the learning rate but don't know what to change it to, you can do something like the following: th main.lua -branch old-exp -expID new-exp-01 -LR 1e-5 and then compare to a separate experiment th main.lua -branch old-exp -expID new-exp-02 -LR 5e-5.

In src/misc there's a simple script for monitoring a set of experiments to visualize and compare training curves.

Getting final predictions

To generate final test set predictions for MPII, you can call:

th main.lua -branch your-exp -expID final-preds -finalPredictions -nEpochs 0

This assumes there is an experiment that has already been run. If you just want to provide a pre-trained model, that's fine too and you can call:

th main.lua -expID final-preds -finalPredictions -nEpochs 0 -loadModel /path/to/model

Training accuracy metric

For convenience during training, the accuracy function evaluates PCK by comparing the output heatmap of the network to the ground truth heatmap. The normalization in this case will be slightly different than the normalization done when officially evaluating on FLIC or MPII. So there will be some discrepancy between the numbers, but the heatmap-based accuracy still provides a good picture of how well the network is learning during training.

Final notes

In the paper, the training time reported was with an older version of cuDNN, and after switching to cuDNN 4, training time was cut in half. Now, with a Titan X NVIDIA GPU, training time from scratch is under 3 days for MPII, and about 1 day for FLIC.

pypose/

Included in this repository is a folder with a bunch of old python code that I used. It hasn't been updated in a while, and might not be totally functional at the moment. There are a number of useful functions for doing evaluation and analysis on pose predictions and it is worth digging into. It will be updated and cleaned up soon.

Questions?

I am sure there is a lot not covered in the README at the moment so please get in touch if you run into any issues or have any questions!

Acknowledgements

Thanks to Soumith Chintala, this pipeline is largely built on his example ImageNet training code available at: https://github.com/soumith/imagenet-multiGPU.torch

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].