|
| 1 | +# Realtime Multi-Person Pose Estimation |
| 2 | +This is a keras version of [Realtime Multi-Person Pose Estimation](https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation) project |
| 3 | + |
| 4 | +## Introduction |
| 5 | +Code repo for reproducing [2017 CVPR](https://arxiv.org/abs/1611.08050) paper using keras. |
| 6 | + |
| 7 | +## Results |
| 8 | + |
| 9 | +<p align="center"> |
| 10 | +<img src="https://github.com/michalfaber/keras_Realtime_Multi-Person_Pose_Estimation/blob/master/readme/dance.gif", width="720"> |
| 11 | +</p> |
| 12 | + |
| 13 | +<div align="center"> |
| 14 | +<img src="https://github.com/michalfaber/keras_Realtime_Multi-Person_Pose_Estimation/blob/master/sample_images/ski.jpg", width="300", height="300"> |
| 15 | + |
| 16 | +<img src="https://github.com/michalfaber/keras_Realtime_Multi-Person_Pose_Estimation/blob/master/readme/result.png", width="300", height="300"> |
| 17 | +</div> |
| 18 | + |
| 19 | + |
| 20 | +## Contents |
| 21 | +1. [Converting caffe model](#converting-caffe-model-to-keras-model) |
| 22 | +2. [Testing](#testing-steps) |
| 23 | +3. [Training](#training-steps) |
| 24 | + |
| 25 | +## Require |
| 26 | +1. [Keras](https://keras.io/) |
| 27 | +2. [Caffe - docker](https://hub.docker.com/r/bvlc/caffe/) required if you would like to convert caffe model to keras model. You |
| 28 | + don't have to compile/install caffe on your local machine. |
| 29 | + |
| 30 | +## Converting Caffe model to Keras model |
| 31 | +Authors of [original implementation](https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation) released already trained caffe model |
| 32 | +which you can use to extract weights data. |
| 33 | + |
| 34 | +- Download caffe model `cd model; sh get_caffe_model.sh` |
| 35 | +- Dump caffe layers to numpy data `cd ..; docker run -v [absolute path to your keras_Realtime_Multi-Person_Pose_Estimation folder]:/workspace -it bvlc/caffe:cpu python dump_caffe_layers.py` |
| 36 | + Note that docker accepts only absolute paths so you have to set the full path to the folder containing this project. |
| 37 | +- Convert caffe model (from numpy data) to keras model `python caffe_to_keras.py` |
| 38 | + |
| 39 | +## Testing steps |
| 40 | +- Convert caffe model to keras model or download already converted keras model https://www.dropbox.com/s/llpxd14is7gyj0z/model.h5 |
| 41 | +- Run the notebook `demo.ipynb`. |
| 42 | +- `python demo_image.py --image sample_images\ski.jpg` to run the picture demo. Result will be stored in the file result.png. You can use |
| 43 | +any image file as an input. |
| 44 | +- `python demo_camera.py` to run the web demo. |
| 45 | + |
| 46 | +## Training steps |
| 47 | +- Install gsutil `curl https://sdk.cloud.google.com | bash`. This is a really helpful tool for downloading large datasets. |
| 48 | +- Download the data set (~25 GB) `cd dataset; sh get_dataset.sh`, |
| 49 | +- Download [COCO official toolbox](https://github.com/pdollar/coco) in `dataset/coco/` . |
| 50 | +- `cd coco/PythonAPI; sudo python setup.py install` to install pycocotools. |
| 51 | +- Run `cd ../..; python train_pose.py` to start training. |
| 52 | + |
| 53 | +## Related repository |
| 54 | +- CVPR'16, [Convolutional Pose Machines](https://github.com/shihenw/convolutional-pose-machines-release). |
| 55 | +- CVPR'17, [Realtime Multi-Person Pose Estimation](https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation). |
| 56 | + |
| 57 | +## Citation |
| 58 | +Please cite the paper in your publications if it helps your research: |
| 59 | + |
| 60 | + @InProceedings{cao2017realtime, |
| 61 | + title = {Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields}, |
| 62 | + author = {Zhe Cao and Tomas Simon and Shih-En Wei and Yaser Sheikh}, |
| 63 | + booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, |
| 64 | + year = {2017} |
| 65 | + } |
| 66 | + |
0 commit comments