12. ・前処理
− データ集合 S から T 個のサブセット作成
・For t = 1, 2, …, T サブセットの数だけ木を作成
IF エントロピー H(S)=0 or 指定した深さDに達した
・末端ノード作成
ELSE
・分岐関数候補をランダムに K 個選択
・ For k = 1, 2, …, K
- 候補 k を用いてサンプルの分割
- 候補 k の情報利得算出
・最も情報利得Iが高い候補を選択
・単純ベイズ識別器作成
学習アルゴリズム
Random Forestsの学習アルゴリズム
12
13. サブセットの作成
• サンプル集合 S を用意
‒ サンプルi ∈ S には特徴ベクトル vi, 教師信号 ci が付与
• サブセットの作成
‒ T 個のサブセットをランダムに作成
13
サブセット S1 サブセット S2 サブセット ST
サンプル集合 S
15. 学習アルゴリズム
15
・前処理
− データ集合 S から T 個のサブセット作成
・For t = 1, 2, …, T サブセットの数だけ木を作成
IF エントロピー H(S)=0 or 指定した深さDに達した
・末端ノード作成
ELSE
・分岐関数候補をランダムに K 個選択
・ For k = 1, 2, …, K
- 候補 k を用いてサンプルの分割
- 候補 k の情報利得算出
・最も情報利得Iが高い候補を選択
・単純ベイズ識別器作成
Random Forestsの学習アルゴリズム
20. 学習アルゴリズム
20
・前処理
− データ集合 S から T 個のサブセット作成
・For t = 1, 2, …, T サブセットの数だけ木を作成
IF エントロピー H(S)=0 or 指定した深さDに達した
・末端ノード作成
ELSE
・分岐関数候補をランダムに K 個選択
・ For k = 1, 2, …, K
- 候補 k を用いてサンプルの分割
- 候補 k の情報利得算出
・最も情報利得Iが高い候補を選択
・単純ベイズ識別器作成
Random Forestsの学習アルゴリズム
21. サンプルの分割と情報利得の算出
• 分岐関数候補を用いてサンプルを分割
• 情報利得 I により候補を評価
21
Sl : 左に分岐するサンプル集合
Sr : 右に分岐するサンプル集合
H : 情報エントロピー
Sj : 親ノードのサンプル集合
Ij = H(Sj)
i=L,R
|Si
j|
|Sj|
H(Si
j)
Sl = {i Sj|fk(vi) < tk}
Sr = Sj Sl
= H(Sj)
|Sl|
|Sj|
H(Sl)
|Sr|
|Sj|
H(Sr)
30. 学習アルゴリズム
30
・前処理
− データ集合 S から T 個のサブセット作成
・For t = 1, 2, …, T サブセットの数だけ木を作成
IF エントロピー H(S)=0 or 指定した深さDに達した
・末端ノード作成
ELSE
・分岐関数候補をランダムに K 個選択
・ For k = 1, 2, …, K
- 候補 k を用いてサンプルの分割
- 候補 k の情報利得算出
・最も情報利得Iが高い候補を選択
・単純ベイズ識別器作成
Random Forestsの学習アルゴリズム
35. ・前処理
− データ集合 S から T 個のサブセット作成
・For t = 1, 2, …, T サブセットの数だけ木を作成
IF エントロピー H(S)=0 or 指定した深さDに達した
・末端ノード作成
ELSE
・分岐関数候補をランダムに K 個選択
・ For k = 1, 2, …, K
- 候補 k を用いてサンプルの分割
- 候補 k の情報利得算出
・最も情報利得Iが高い候補を選択
・単純ベイズ識別器作成
学習アルゴリズム
35
Random Forestsの学習アルゴリズム
36. 単純ベイズ識別器の作成
• T 個の決定木をトラバーサル
36
……
tree t1
tree tT
v v
P1(c|v) Pt(c|v)
P(c|v) =
1
T
T
t=1
Pt(c|v)識別結果の統合:
単純ベイズ識別器: Ci = arg max
ci
P(ci|v)
+ …… +
Average
=T 8
7 6
54 32
1
37. 実装上の注意点
• 学習サンプルの各クラスのサンプル数が不均等の場合
→ Inverse Label Frequencyが必要
• 学習サンプル I すべてを用いてクラスの頻度分布を作成
‒ あるサンプル i ∈ I に付けられているラベルを ciを利用
• カテゴリの頻度分布作成時に重み付け
37
c =
i I
[c = ci]
1
カテゴリ C
頻度
138. CV分野への応用1
• Conditional Regression Forestsによる
顔向き推定と顔特徴点の推定 [Dantone, M. et al., 2012]
‒ 入力:パッチ(Haar-like特徴:領域間の輝度差)
‒ 出力:顔向き,器官位置
138
etection using Conditional Regression Forests
Gall1,2
Gabriele Fanelli1
Luc Van Gool1,3
for Intelligent Systems, Germany 3
KU Leuven, Belgium
ch jgall@tue.mpg.de vangool@esat.kuleuven.be
mages is a
ethods that
es. Here we
ask. While
acial image
m the entire
he relations
xperiments,
emonstrate
regression
aluated the
e Wild [20]
ieved while
like human
Figure 1. Our approach estimates facial feature points from 2D
images in real-time.
spatial relations between image patches and facial features
139. CV分野への応用2
• Regression Forestsによる人体姿勢推定[Taylor2012]
‒ Regression Forestによるパーツ座標の回帰推定
‒ 回帰結果による対応点群を用いた人体モデルの当てはめ
139
Overview
inferred dense
correspondences
test
images
regression forest
…
energy
function
optimizationof
modelparameters𝜃
final optimized
poses
front right top
training
images
Regression Forestによる
パーツ座標の回帰推定
回帰結果への人体モデルの当てはめ
140. Regression Forestによる人体姿勢推定
• パーツ識別ではなく、座標の回帰推定問題へ
‒ 人体座標を連続値で表現して回帰木を構築
140
Texture is mapped across body shapes and poses
From Body Parts to Dense Correspondences
increasing number of parts
classification regression
The “Vitruvian Manifold”Body Parts
Random Forestにおける教師ラベル Regression Forestにおける教師信号
168. チュートリアル資料:Random Forests[Criminisi et al., 2011]
• Classification, Regression, Density Estimation,
Manifold Learning and Semi-Supervised Learning
168
チュートリアル: http://research.microsoft.com/en-us/groups/vision/decisionforests.aspx
169. 参考文献1
•1. Random Forests
- [Breiman, 2001] L. Breiman, "Random Forests.", Machine Learning 45 (1): 5‒32,
2001.
- [Lepetit et al., 2006] V. Lepetit and P. Fua, Keypoint Recognition using
Randomized Trees , IEEE Transactions on Pattern Analysis and Machine
Intelligence, Vol. 28, Nr. 9, pp. 1465-1479, 2006.
- [Shotton et al., 2008] J. Shotton, M. Johnson, R. Cipolla, Semantic Texton
Forests for Image Categorization and Segmentation. , In Proc. IEEE CVPR
2008.
- [Amit & Geman, 1997] Y. Amit and D. Geman Y, Shape Quantization and
Recognition with Randomized Trees , Neural Computation, vol. 9, pp.
1545-1588, 1996
- [Moosmann et al., 2006] F. Moosmann, B. Triggs, and F. Jurie, Fast
Discriminative Visual Codebooks using Randomized Clustering Forests. , In
NIPS, 2006.
- [山下 et al., 2010] 山下隆義, 山内悠嗣, 藤吉弘亘, "Boosted Randomized Trees によ
る人物検出と行動の同時認識", 第13回画像の認識・理解シンポジウム(MIRU2010),
2010.
- [Geurts et al., 2006] P. Gurts, D. Ernst, and L. Wehenkel, Extremely
Randomized Trees , Machine Learning, vol. 63, issue 1, pp. 3-42, 2006. 169
170. 参考文献1
•2. 学習を用いたキーポイントマッチングの高速化
- [西村 et al., 2010] 西村孝, 清水彰一, 藤吉弘亘, "2段階のRandomized Treesを用
いたキーポイントの分類", 第13回画像の認識・理解シンポジウム(MIRU2010),
2010.
- [Özuysal et al.,2010] M. Özuysal, M. Calonder, V. Lepetit, P. Fua, Fast
Keypoint Recognition using Random Ferns IEEE Transactions on Pattern
Analysis and Machine Intelligence, Vol. 32, Nr. 3, pp. 448 - 461, 2010.
•3. Random Forestsを用いた物体検出
- [Gall et al., 2011] J.Gall, A.Yao, N.Razavi, L.Van Gool, and V. Lempitsky,
Hough forests for object detection, tracking and action recognition , IEEE
Transactions on Pattern Analysis and Machine Itelligence, vol. 33, no. 11,
pp. 2188-2202, 2011.
- [Dahang et al., 2012] Tang Danhang, Yang Liu, and Tae-Kyun Kim. Fast
Pedestrian Detection by Cascaded Random Forest with Dominant
Orientation Templates , BMVC, pp. 58.1-58.11, 2012
- [Hinterstoisser et al., 2010] S.Hinterstoisser, V. Lepetit, S. llic, P. Fua, and N.
Navab, Dominant Orientation Templates for Real-Time Detection of
Texture-Less Objects , IEEE Computer Society Conference on Computer
Vision and Pattern Recognition, 2010. 170
171. 参考文献3
•4. Random Forestsを用いた人体姿勢推定
- [Shotton et al., 2011] Jamie Shotton, Andrew Fitzgibbon, Mat Cook, Toby
Sharp, Mark Finocchio, Richard Moore, Alex Kipman, Andrew Blake, Real-
Time Human Pose Recognition in Parts from Single Depth
Images ,Computer Vision and Pattern Recognition,vol.2,pp.
1297-1304,2011.
- [Criminisi et al., 2011] A. Criminisi, J. Shotton, and E. Konukoglu, Decision
Forests for Classification, Regression, Density Estimation, Manifold
Learning and Semi-Supervised Learning, no. MSR-TR-2011-114, 28
October 2011.
•5. Regression Forests
- [Girshick R. et al., 2011] Girshick R., Shotton J., Kohli P., Criminisi A., and
Fitzgibbon A., Efficient regression of general-activity human poses from
depth images , Computer Vision (ICCV), 2011 IEEE International
Conference on, 415 -422, 2011.
- [Dantone, M. et al., 2012] Dantone M., Gall J., Fanelli G., and Van Gool L.,
Real-time facial feature detection using conditional regression forests ,
Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference
on, 2578 -2585, 2012. 171