• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created almost 6 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Chainer implementation of Pose Proposal Networks

chainer-pose-proposal-net

  • This is an (unofficial) implementation of Pose Proposal Networks with Chainer including training and prediction tools.

License

Copyright (c) 2018 Idein Inc. & Aisin Seiki Co., Ltd. All rights reserved.

This project is licensed under the terms of the license.

Training

Prepare Dataset

MPII

  • If you train with COCO dataset you can skip.
  • Access MPII Human Pose Dataset and jump to Download page. Then download and extract both Images (12.9 GB) and Annotations (12.5 MB) at ~/work/dataset/mpii_dataset for example.

Create mpii.json

We need decode mpii_human_pose_v1_u12_1.mat to generate mpii.json. This will be used on training or evaluating test dataset of MPII.

$ sudo docker run --rm -v $(pwd):/work -v path/to/dataset:mpii_dataset -w /work idein/chainer:4.5.0 python3 convert_mpii_dataset.py mpii_dataset/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat mpii_dataset/mpii.json

It will generate mpii.json at path/to/dataset. Where path/to/dataset is the root directory of MPII dataset, for example, ~/work/dataset/mpii_dataset. For those who hesitate to use Docker, you may edit config.ini as necessary.

COCO

  • If you train with MPII dataset you can skip.
  • Access COCO dataset and jump to Dataset -> download. Then download and extract 2017 Train images [118K/18GB], 2017 Val images [5K/1GB] and 2017 Train/Val annotations [241MB] at ~/work/dataset/coco_dataset:/coco_dataset for example.

Running Training Scripts

OK let's begin!

$ cat begin_train.sh
cat config.ini
docker run --rm \
-v $(pwd):/work \
-v ~/work/dataset/mpii_dataset:/mpii_dataset \
-v ~/work/dataset/coco_dataset:/coco_dataset \
--name ppn_idein \
-w /work \
idein/chainer:5.1.0 \
python3 train.py
$ sudo bash begin_train.sh
  • Optional argument --runtime=nvidia maybe require for some environment.
  • It will train a model the base network is MobileNetV2 with MPII dataset located in path/to/dataset on host machine.
  • If we would like to train with COCO dataset, edit a part of config.ini as follow:

before

# parts of config.ini
[dataset]
type = mpii

after

# parts of config.ini
[dataset]
type = coco
  • We can choice ResNet based network as the original paper adopts. Edit a part of config.ini as follow:

before

[model_param]
model_name = mv2

after

[model_param]
# you may also choice resnet34 and resnet50
model_name = resnet18

Prediction

  • Very easy, all we have to do is, for example:
$ sudo bash run_predict.sh ./trained
  • If you would like to configure parameter or hide bounding box, edit a part of config.ini as follow:
[predict]
# If `False` is set, hide bbox of annotation other than human instance.
visbbox = True
# detection_thresh
detection_thresh = 0.15
# ignore human its num of keypoints is less than min_num_keypoints
min_num_keypoints= 1

Demo: Realtime Pose Estimation

We tested on an Ubuntu 16.04 machine with GPU GTX1080(Ti)

Build Docker Image for Demo

We will build OpenCV from source to visualize the result on GUI.

$ cd docker/gpu
$ cat build.sh
docker build -t ppn .
$ sudo bash build.sh

Here is an result of ResNet18 trained with COCO running on laptop PC.

Run video.py

  • Set your USB camera that can recognize from OpenCV.

  • Run video.py

$ python video.py ./trained

or

$ sudo bash run_video.sh ./trained

High Performance Version

  • To use feature of Static Subgraph Optimizations to accelerate inference speed, we should install Chainer 5.y.z and CuPy 5.y.z e.g. 5.0.0 or 5.1.0 .
  • Prepare high performance USB camera so that takes more than 60 FPS.
  • Run high_speed.py instead of video.py
  • Do not fall from the chair with surprise :D.

Appendix

Pre-trained Model

  • Without training, you can try our software by downloading pre-trained model from our release page

Our Demo

Actcast

Citation

Please cite the paper in your publications if it helps your research:

@InProceedings{Sekii_2018_ECCV,
  author = {Sekii, Taiki},
  title = {Pose Proposal Networks},
  booktitle = {The European Conference on Computer Vision (ECCV)},
  month = {September},
  year = {2018}
  }

More Repositories

1

py-videocore

Python library for GPGPU on Raspberry Pi
Python
795
star
2

py-videocore6

Python library for GPGPU programming on Raspberry Pi 4
Python
245
star
3

qmkl

Math Kernel Library for VideoCore IV QPU
Python
68
star
4

qmkl6

BLAS library for VideoCore VI QPU (Raspberry Pi 4)
Python
66
star
5

dockworker

Docker daemon API client in Rust
Rust
61
star
6

rpi-vcsm

A Python driver for VideoCore Shared Memory (VCSM) of Raspberry Pi
Python
25
star
7

onnion

Python
22
star
8

msgpack-schema

A specification language for MessagePack data schema
Rust
17
star
9

actcast-support

13
star
10

chainer-hand-pose

Chainer implementation of Hand Pose Estimation ๐ŸŽ‰
Python
13
star
11

onnigiri

Python
12
star
12

librpimemmgr

A memory manager for Raspberry Pi
C
11
star
13

nnoir

NN Optimization IR
Python
9
star
14

gatekeeper

Gatekeeper: A SOCKS5 Server written in Rust
Rust
5
star
15

rpi-mailbox

A rust interface to mailbox of RaspberryPi
Rust
5
star
16

actix-redis-cluster

Rust
5
star
17

docker-pytorch

Dockerfile
5
star
18

actcast-app-python

DEPRECATED: Python API for Actcast app
Python
4
star
19

docker-cross-rpi

Cross-compiling toolchain for Raspberry Pi 1, 2 and 3 using crosstool-NG
Dockerfile
4
star
20

kingtime-rs

Rust binding of King of Time API
Rust
3
star
21

dnn-flop-count

Python
3
star
22

docker-actcast-rpi-app-base

Actcast base image for the Raspberry Pi
Shell
3
star
23

actfw-raspberrypi

actfw's additional components for RaspberryPi
Python
3
star
24

actfw-core

Core components of actfw, independent of specific devices
Python
3
star
25

libdrm_v3d

A thin userland wrapper for the V3D DRM driver
C
2
star
26

chainer-graphics

Differential graphics operations for Chainer
Python
2
star
27

containerd.io-for-raspbian

containerd.io (supporting armv6l, armvl7) for raspbian
Dockerfile
2
star
28

docker-chainer

Docker image for Chainer, ChainerCV and other utilities with CUDA driver.
Dockerfile
2
star
29

actix-rate-limit

Rust
2
star
30

libvc4mem

A userland library for **my own** kernel driver
C
2
star
31

multi_object_tracker

Python Library for Multi Object Tracking
Python
2
star
32

action-s3-cache

Cache dependencies and build outputs to S3
TypeScript
2
star
33

actcast-app-examples

Examples of Actcast applications
Python
2
star
34

docker-netdistiller-builder

build environment
Dockerfile
1
star
35

docker-rust-stable

Dockerfile
1
star
36

qmkl_sys

A rust interface to qmkl
Rust
1
star
37

rpi-peri-regs

A Python driver for accessing peripheral memory on Raspberry Pi
Python
1
star
38

actcast-rekognition-demo

Python
1
star
39

librpicopy

Fast implementations of memcpy and memset for Raspberry Pi
C
1
star
40

actcast-api-py-script

Actcast APIใ‚’ๅฎŸ่กŒใ™ใ‚‹Pythonใ‚นใ‚ฏใƒชใƒ—ใƒˆ
Python
1
star
41

docker-ce-for-raspbian-buster

Docker CE (supporting armv6l, armvl7) for raspbian buster
1
star
42

libv4l-sys

Rust FFI to the libv4l
Rust
1
star
43

actfw-gstreamer

actfw's additional components depending on GStreamer
Python
1
star
44

bcm_host-sys

An low level Rust interface to RaspberryPi firmware
Rust
1
star
45

tcp2socks

Proxy server converting TCP to SOCKS5
Rust
1
star