Giter Site home page Giter Site logo

convolutional-pose-machines-tensorflow's Introduction

Convolutional Pose Machines - Tensorflow

This is the Tensorflow implementation of Convolutional Pose Machines, one of the state-of-the-art models for 2D body and hand pose estimation.

With some additional features:

  • Easy multi-stage graph construction
  • Kalman filters for smooth pose estimation

Environments

  • Windows 10 / Ubuntu 16.04
  • Tensorflow 1.2.0
  • OpenCV 3.2

How to start

Download models

Put downloaded models in the models/weights folder.

Run demo scripts

There are two scripts, demo_cpm_body.py for body pose estimation and demo_cpm_hand.py for hand pose estimation. I take demo_cpm_hand.py for example.

First set the DEMO_TYPE. If you want to pass an image, then put the path to image here. If you want a live demo through a webcam, there are few options.

  • MULTI will show multiple stages output heatmaps and the final pose estimation simultaneously.
  • SINGLE will only show the final pose estimation.
  • HM will show each joint heatmap of last stage separately.

The CPM structure assumes the body or hand you want to estimate is located in the middle of the frame. If you want to avoid that, one way is to add a detector at the begining, and feed the detected bounding box image into this model.

Build your own model

See models/nets for model definition, I take models/nets/cpm_hand.py for example.

  • Create a model instance
  • Set how many stages you want the model to have (at least 2)
  • Call build_loss if you want to do the training
  • Use self.train_op to optimize the model

Please see train.py for an example.

convolutional-pose-machines-tensorflow's People

Contributors

timctho avatar

Watchers

 avatar  avatar

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.