Giter Site home page Giter Site logo

hunglethanh9 / ai-challenger-pose-estimation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from galaxy-fangfang/ai-challenger-pose-estimation

0.0 2.0 0.0 5.86 MB

human pose estimation based on pose tensorflow

Python 13.40% Shell 0.08% Makefile 0.03% C++ 85.55% C 0.94%

ai-challenger-pose-estimation's Introduction

Human Pose Estimation with TensorFlow

This is a modified version of pose-tensorflow for AI challenger I just train the model for 600000 iterations while the original project requires 1800000 iterations for multi-person pose estimation on COCO dataset. So the final score is just 0.36.

Here you can find the implementation of the Human Body Pose Estimation algorithm, presented in the ArtTrack and DeeperCut papers:

Eldar Insafutdinov, Leonid Pishchulin, Bjoern Andres, Mykhaylo Andriluka and Bernt Schiele DeeperCut: A Deeper, Stronger, and Faster Multi-Person Pose Estimation Model. In European Conference on Computer Vision (ECCV), 2016

Eldar Insafutdinov, Mykhaylo Andriluka, Leonid Pishchulin, Siyu Tang, Evgeny Levinkov, Bjoern Andres and Bernt Schiele ArtTrack: Articulated Multi-person Tracking in the Wild. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017

For more information visit http://pose.mpi-inf.mpg.de

Python 3 is required to run this code. First of all, you should install TensorFlow as described in the official documentation. We recommended to use virtualenv.

You will also need to install the following Python packages:

$ pip3 install scipy scikit-image matplotlib pyyaml easydict cython munkres

When running training or prediction scripts, please make sure to set the environment variable TF_CUDNN_USE_AUTOTUNE to 0 (see this ticket for explanation).

If your machine has multiple GPUs, you can select which GPU you want to run on by setting the environment variable, eg. CUDA_VISIBLE_DEVICES=0.

Demo code

Multiple People

# Compile dependencies
$ ./compile.sh

# Download pre-trained model files
$ cd models/coco
$ ./download_models.sh
$ cd -

# Run demo of multi person pose estimation
$ TF_CUDNN_USE_AUTOTUNE=0 python3 demo/demo_multiperson.py

Training models

Please follow these instructions Before training the models you need to download the ImageNet pre-trained ResNet weights

$ cd models/pretrained
$ ./download.sh

Training parameters are specfied in th pose_cfg.ymlfile. The author of the preliminary project provides 3 ways to train the models:

  • Single person(with MPII Pose Dataset)
  • Multi-person(with MS COCO dataset)
  • train on my own dataset I chosse the second way: training a model with MS COCO dataset (Multi-person)
  1. Download the AI challenger dataset keypoint datasets. Unpack it to the path <path to dataset>to have the following directory structure:
<path to dataset>/COCO/annotations/keypoint_train_annotations_20170909.json
<path to dataset>/COCO/images/train2014/*.jpg
  1. transform the annotation format of AI challenger dataset to COCO format:
python ai2coco_art_neckhead_json.py --keypoint_json (<path to 'keypoint_train_annotations_20170909.json'>) --img_dir (train2014/)
  1. the output json is in the same directory of keypoint_train_annotations_20170909.json's, rename the json: coco_art_neckhead_keypoint_train_annotations_20170909.json to person_keypoints_train2014.json and put it in the directory:
<path to dataset>/COCO/annotations/
  1. Download pairwise statistics:
$ cd models/coco
$ ./download_models.sh
  1. Edit the training definition file models/coco/train/pose_cfg.yamlsuch that:
dataset: /scratch2/ygan/bisheng/fang/dataset/COCO
save_iters: 10000
  1. Modify the models snapshots directory to the absolute directory in train.py, such that:
model_name = '/scratch2/ygan/bisheng/fang/pose-tensorflow/snapshots/' + cfg.snapshot_prefix
  1. Train the model
$ cd models/coco/train/
$ TF_CUDNN_USE_AUTOTUNE=0 CUDA_VISIBLE_DEVICES=0 python3 ../../../train.py

Note that: there is no space around =in the above command TF_CUDNN_USE_AUTOTUNE=0and CUDA_VISIBLE_DEVICES=0

Citation

Please cite ArtTrack and DeeperCut in your publications if it helps your research:

@inproceedings{insafutdinov2017cvpr,
    title = {ArtTrack: Articulated Multi-person Tracking in the Wild},
    booktitle = {CVPR'17},
    url = {http://arxiv.org/abs/1612.01465},
    author = {Eldar Insafutdinov and Mykhaylo Andriluka and Leonid Pishchulin and Siyu Tang and Evgeny Levinkov and Bjoern Andres and Bernt Schiele}
}

@article{insafutdinov2016eccv,
    title = {DeeperCut: A Deeper, Stronger, and Faster Multi-Person Pose Estimation Model},
    booktitle = {ECCV'16},
    url = {http://arxiv.org/abs/1605.03170},
    author = {Eldar Insafutdinov and Leonid Pishchulin and Bjoern Andres and Mykhaylo Andriluka and Bernt Schiele}
}

AI-challenger-pose-estimation

ai-challenger-pose-estimation's People

Contributors

galaxy-fangfang 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.