Human pose estimation 101
with Tensorflow
Jaewook Kang, Ph.D.
jwkang10@gmail.com�Oct. 2018
1
© 2017-2018
Jaewook Kang
All Rights Reserved
누구나 TensorFlow!
J. Kang Ph.D.
소 개
(2018, 10-~)
2
Jaewook Kang (강재욱)
누구나 TensorFlow!
J. Kang Ph.D.
Human Pose Estimation
3
누구나 TensorFlow!
J. Kang Ph.D.
Human Pose Estimation
4
3D Human Pose Estimation in the Wild by Adversarial Learning, CVPR2018
Wei Yang, Wanli Ouyang, Xiaolong Wang, Jimmy Ren, Hongsheng Li, Xiaogang Wang
누구나 TensorFlow!
J. Kang Ph.D.
Human Pose Estimation
5
누구나 TensorFlow!
J. Kang Ph.D.
2D single pose estimation
6
누구나 TensorFlow!
J. Kang Ph.D.
Human Pose Estimation
Localization + Classification
7
누구나 TensorFlow!
J. Kang Ph.D.
Human Pose Estimation
Localization + Classification
8
(x,y)=(0.34,0.92)
(x,y)=(0.34,0.92)
(x,y)=(0.34,0.92)
(x,y)=(0.34,0.92)
누구나 TensorFlow!
J. Kang Ph.D.
Human Pose Estimation
Localization + Classification
9
Head
Neck
Rshoulder
Lshoulder
누구나 TensorFlow!
J. Kang Ph.D.
Human Pose Estimation
10
Pose coordinate
Prediction
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
11
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
12
Image credit: http://www.1000ventures.com/design_elements/selfmade/elephant_holistic-6perceptions.png
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
13
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
14
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
15
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
Toshev, A., Szegedy, C., “Deeppose: Human pose estimation via deep neural networks,” CVPR 2014
16
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
17
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
18
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
19
: 회귀 함수
: 전처리 함수
: 후처리 함수
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
20
AlexNet
X
Input image
Coordinate prediction
Head = (0.1,0.3)
Neck = (0.2,0.6)
Rshoulder = (0.8,0.1)
….
Y
True coordinate
(y0,y1,....,yk)
L2 loss
Train
.
.
.
.
전처리
후처리
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
Special thank to 피카소! :-)
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
�
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
�
.
*
1st regression
(y0,y1)^S=0
2nd regression
(y0,y1)^S=1
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
AlexNet
X with i-th box
from prev stage
Displacement
prediction
L2 loss
Train
Displacement
from prev stage
.
Single stage regressor
전처리
후처리
누구나 TensorFlow!
J. Kang Ph.D.
DeepPose (Alexander’14)
X
Input image
True coordinate
Y=(y0,y1,....,yk)
1st stage
regressor
.
S-th stage
regressor
Coordinate
prediction
Head = (0.1,0.3)
Neck = (0.2,0.6)
Rshoulder = (0.8,0.1)
….
.
.
X
Input image
Displacement
누구나 TensorFlow!
J. Kang Ph.D.
Convolutional Heatmap Regressor
�
26
누구나 TensorFlow!
J. Kang Ph.D.
Convolutional Heatmap Regressor
27
image credit: https://arxiv.org/abs/1609.01743
누구나 TensorFlow!
J. Kang Ph.D.
Convolutional Heatmap Regressor
28
Model
X
Input image
Heatmap prediction
Y
True coordinate
(y0,y1,....,yk)
Some loss fn
Train
Heatmap
generator
.
.
.
True
Heatmap
.
누구나 TensorFlow!
J. Kang Ph.D.
Convolutional Heatmap Regressor
29
누구나 TensorFlow!
J. Kang Ph.D.
Multiscale Understanding
30
누구나 TensorFlow!
J. Kang Ph.D.
Multiscale Understanding
31
누구나 TensorFlow!
J. Kang Ph.D.
Multiscale Understanding
32
누구나 TensorFlow!
J. Kang Ph.D.
Multiscale Understanding
33
image credit: https://arxiv.org/abs/1602.00134
누구나 TensorFlow!
J. Kang Ph.D.
Multiscale Understanding
34
누구나 TensorFlow!
J. Kang Ph.D.
Multiscale Understanding
35
누구나 TensorFlow!
J. Kang Ph.D.
Beyond
36
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
37
Single hourglass model
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
38
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
39
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
40
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
41
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
42
git downloadL: http://git-scm.com/downloads |
[git fork는 웹에서 ] $ git init $ git branch -r origin/HEAD -> origin/master origin/develop origin/features/fb_proj_baselines origin/master $ git checkout -t origin/features/fb_proj_baselines
|
|
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
43
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
44
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
45
Layer | Type | Kernel size | Stride | Activation |
D4 | batchnorm | - | - | - |
D3 | Conv | 1x1 | 1 | relu |
D2 | batchnorm | - | - | - |
D1 | Conv | 3x3 | 1 | None |
In | Input | - | - | - |
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
46
Layer | Type | OutputMaps | Output Size | Filter size | Stride | Activation |
DS2 | max pool | 32 | N/2 x N/2 | 3x3 | 2 | None |
DS1 | Depthwise Separable Conv | 32 | NxN | - | - | - |
In | Input | 32 | NxN | - | - | - |
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
47
Layer | Type | OutputMaps | Output Size |
US2 | Depthwise separable conv | 32 | NxN |
US1 | resize_bilinear | 32 | NxN |
In | Input | 32 | N/2 x N/2 |
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
48
Layer | Type | OutputMaps | Output Size | Filter size | Stride | Activation |
R4 | maxpool | 32 | 64x64 | 3x3 | 2 | - |
R3 | Depthwise separable conv | 32 | 128x128 | - | - | - |
R2 | batchnorm | 32 | 128x128 | - | - | - |
R1 | Conv | 32 | 128x128 | 7x7 | 2 | relu |
In | Input | 3 | 256x256 | - | - | - |
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
49
Layer | Type | OutputMaps | Output Size | filter size | Activation |
HU10 | upsample | 32 | 64x64 | | |
HC9 | conv → add skip connection from HD1 out | 32 | 32x32 | 1x1 | relu |
HU8 | upsample | 32 | 32x32 | | |
HC7 | conv → add skip connection from HD2 out | 32 | 16x16 | 1x1 | relu |
HU6 | upsample | 32 | 16x16 | | |
HC5 | conv → add skip connection from HD3 out | 32 | 8x8 | 1x1 | relu |
HB4 | Depthwise separable conv | 32 | 8x8 | | |
HD3 | downsample | 32 | 8x8 | | |
HD2 | downsample | 32 | 16x16 | | |
HD1 | downsample | 32 | 32x32 | | |
In | Input | 32 | 64x64 | | |
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
50
Layer | Type | OutputMaps | Output Size | Filter size | Stride | Activation |
out | conv + dropout | 14 | 64x64 | 1x1 | 1 | None |
In | Input | 32 | 64x64 | - | - | - |
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
51
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
52
HD1
HD2
HD3
HB4
HU6
HC5
HC7
HU8
HU10
HC9
누구나 TensorFlow!
J. Kang Ph.D.
Tiny Pose Est in Tensorflow
53
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
54
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
55
누구나 TensorFlow!
J. Kang Ph.D.
Awesome Pose estimation Repo
56
누구나 TensorFlow!
J. Kang Ph.D.
Proj: Tiny Pose Est in Tensorflow
57
AWS 실행방법 |
$ git clone <your git http> $ git init $ git branch -r $ git checkout -t origin/features/fb_proj_baselines $ cd tf-tiny-pose-estimation $ cd tfmodules $ python trainer.py $ tensorboard --logdir ./export ------------------------------ Local $ git commit -m “first comment” $ git add . $ git push AWS $ git pull $ python trainer.py winscp
|
|
누구나 TensorFlow!
J. Kang Ph.D.
Note
58
누구나 TensorFlow!
J. Kang Ph.D.
Update 10/15
59
누구나 TensorFlow!
J. Kang Ph.D.
Update 10/16
60
누구나 TensorFlow!
J. Kang Ph.D.
모두연 MoT랩 소개
61
누구나 TensorFlow!
J. Kang Ph.D.