Code Monkey home page Code Monkey logo

human-pose-estimation's Introduction

Human pose estimation via Convolutional Part Heatmap Regression

This repository implements a demo of the Human pose estimation via Convolutional Part Heatmap Regression paper Bulat&Tzimiropoulos.

Note: New code capable of running on devices with limited resources, for Human Pose Estimation and Face Alignment was released. For a demo please check: https://github.com/1adrianb/binary-human-pose-estimation

Requirement

  • Install the latest Torch version
  • Install python 2.7 using the package manager

Torch packages

Most of the listed package can be installed by simple running

luarocks install [packagename]

For sh and fb.python packages please visit their github repositories and carrefully follow the instruction provided by their authors.

Python packages

Trained models

By default, on the first run the scripts will attempt to automatically download the models, however for your convinience they are provided also for separate usage.

Dataset used LSP error MPII error
MPII - 89.7
MPII + LSP 90.7 -

Usage

The provided code comes along with a series of options. In order to list them please run:

th main.lua --help

To run a demo on 10 random images:

th main.lua -dataset lsp 

To evaluate the model on the validation set for LSP/MPII:

th main.lua -dataset lsp -eval

If you have installed cudnn4 or cudnn5 you can run the demo faster:

th main.lua -dataset lsp -eval -usecudnn

The demo doesn't require a GPU, however having one will speed up the process.

Notes

For more details/questions please visit the project page or send an email at [email protected]

Warning: The script will download by default both the models and the dataset(~15Gb), if you wan't to avoid this or you already have them downloaded please move them in the corresponding folders in datasets/[datasetname]_dataset/. Running the demo for lsp dataset will require only ~700Mb of space.

human-pose-estimation's People

Contributors

1adrianb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

human-pose-estimation's Issues

Error msg

I tried to evaluate the LSP dataset but I got this error:

In 1 module of nn.Sequential:
In 2 module of nn.ConcatTable:
In 1 module of nn.Sequential:
/root/torch/install/share/lua/5.1/nn/THNN.lua:110: bad argument #3 to 'v' (cannot convert 'struct THFloatTensor *' to 'struct THDoubleTensor *')
stack traceback:
        [C]: in function 'v'
        /root/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'SpatialConvolutionMM_updateOutput'
        /root/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:96: in function </root/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:92>
        [C]: in function 'xpcall'
        /root/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        /root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function </root/torch/install/share/lua/5.1/nn/Sequential.lua:41>
        [C]: in function 'xpcall'
        /root/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        /root/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function </root/torch/install/share/lua/5.1/nn/ConcatTable.lua:9>
        [C]: in function 'xpcall'
        /root/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        /root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
        main.lua:100: in main chunk
        [C]: in function 'dofile'
        /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
        [C]: at 0x00406670

Do you know what causes it? Thanks

Multi-person detection

hello authors,

Sorry i want to ask a question related to Multi-person detection.
I want to ask wheter the COCO person dataset is specialized for multi-person?
i have trained a simple model using FCN for face keypoint regression. Can you please tell me how we can get heatmaps of muliple faces in the bottom-up approach. My current model takes input of 96x96x1 image and gives 96x96x15 size heatmaps for 15 keypoints. I trained my model using datset consisting of images with single face. Do i need the datset with multiple faces? and do I need bouding box information or mask information too?

Please give me your advice
thank you

Hi, I have some questions about your method

Hi, thanks for sharing the code of your work.
I have some questions about your method.

Have you tried end-to-end learning (joint learning of detector and regression network)? If so, can you tell me the performance and hyper-parameters (e.g., learning rate)?

Also, how the performance change if deconv layer is initialized by random gaussian distribution( not initialized as bilinear upsampling)?

Suggestion of Dockerfile for easy installation

I have found it rather tedious to deploy torch and its dependencies on my computer.
Here is a dockerfile I wrote to do the job pretty much automatically (note that it requires the nvidia wrapper to docker):

https://gist.github.com/pixelou/e06d8b049001254575d745be2b2b0402

FROM nvidia/cuda:8.0-cudnn5-devel

WORKDIR /root

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends openssl ca-certificates \
	git-core cmake curl wget unzip gfortran libreadline-dev ncurses-dev \
	libgoogle-glog-dev libboost-dev libboost-thread-dev libopenblas-dev

# Core Torch packages
RUN git clone https://github.com/torch/luajit-rocks.git
RUN cd luajit-rocks && mkdir build && cd build \
    && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
             -DWITH_LUAJIT21=ON -DLUAJIT_ENABLE_LUA52COMPAT=ON .. \
    && make && make install
RUN luarocks install torch
RUN luarocks install trepl

# Common torch package
RUN luarocks install luafilesystem
RUN luarocks install --server=http://luarocks.org/dev luash
RUN luarocks install nn
RUN luarocks install optnet
RUN luarocks install xlua
RUN luarocks install cudnn

# Extra torch package
RUN apt-get install -y --no-install-recommends libjpeg-dev libpng-dev \
	graphicsmagick-imagemagick-compat
RUN luarocks install image
RUN apt-get install -y --no-install-recommends python2.7-dev python-numpy
RUN git clone https://github.com/facebook/thpp.git
RUN cd thpp/thpp && mkdir build && cd build \
    && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
       -DNO_THRIFT=ON -DNO_FOLLY=ON -DNO_TESTS=ON .. \
    && make && make install
RUN luarocks install fbpython

# Pull project
RUN git clone https://github.com/1adrianb/human-pose-estimation

CMD /bin/bash

deploy like so:

curl -O https://gist.githubusercontent.com/pixelou/e06d8b049001254575d745be2b2b0402/raw/9585f22ba540a2fb07b54c4c3b8e314a53010199/Dockerfile
nvidia-docker build -t humposest -f ./Dockerfile
nvidia-docker run -it humposest bash

Body parts heatmap

Hello author
did you use Gaussian filter to draw ellipse shape. How can I achieve this?

thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.