7. 7
応用事例
[4] Dang, Qi, et al. "Deep learning based 2d human pose estimation: A survey“ Tsinghua
Science and Technology 24.6 (2019): 663-676. より図を引用
8. 8
HPEは問題設定によってサブタスクに分類される。
HPEのタスク分類 (2D or 3D)
2D HPE
キーポイントの画像上での二
次元座標を推定するタスク
3D HPE
キーポイントの実空間における
三次元座標を推定するタスク
[2] Pavllo, Dario, et al. “3d human pose estimation in video with temporal
convolutions and semi-supervised training.” Proceedings of the IEEE/CVF
Conference on Computer Vision and Pattern Recognition. 2019. より左図を引用
9. 9
HPEは問題設定によってサブタスクに分類される。
HPEのタスク分類 (Single or Multi)
Multi-person HPE
画像中の複数人の姿勢を推定
するタスク
[1] Cao, Zhe, et al. “OpenPose: realtime multi-person 2D pose estimation
using Part Affinity Fields.” IEEE transactions on pattern analysis and
machine intelligence 43.1 (2019): 172-186. より左図を引用
Single-person HPE
画像中には一人しか人が存在し
ない状況で姿勢推定するタスク
[3] Pavllo, Dario, et al. “3d human pose estimation in video with temporal
convolutions and semi-supervised training.” Proceedings of the IEEE/CVF
Conference on Computer Vision and Pattern Recognition. 2019. より左図を引用
12. 12
2D single-person HPEの手法は
1. Regression Method
各キーポイントの2D座標を直接予測。
2. Body Part Detection Method
各キーポイントの位置ごとの存在確率
をヒートマップとして出力し、これを
用いて予測結果を導く。
(現在ではこちらが主流)
の2種類に大きく分類できる。
2D single-person HPE
[4] Dang, Qi, et al. “Deep learning based 2d human pose estimation: A survey“ Tsinghua Science and Technology 24.6 (2019): 663-676. より図を引用
13. 13
DeepPose[3]は2013年に提案された、最初にDeep LearningをHPEに導
入した手法である(Regression Method)。
AlexNet[5]を用いて特徴抽出を行い、各関節点への回帰を行う
損失関数にはMSE (平均二乗誤差) を用いる。
DeepPose (1/2)
[3] Pavllo, Dario, et al. “3d human pose estimation in video with temporal convolutions and semi-supervised
training.” Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2019. 図も本論文より引用
[5] Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep convolutional
neural networks." Advances in neural information processing systems 25 (2012): 1097-1105.
15. 15
Body Part Detection Methodでは下図の様に各キーポイントの各座標に対する存在
確率を示すヒートマップを出力し、ピークとなる座標を予測座標とする。
教師データは正解座標をピークとするガウス分布を持つヒートマップで与えられる。
Regression Methodよりも教師データの情報量が多く、高い精度が期待できるので、近年では
Body Part Detection Methodが主流となっている。
本資料ではBody Part Detection Methodの代表的な手法である “Stacked Hourglass
Networks for HPE [6]”について解説する。
Stacked Hourglass Networks for HPE [6] (1/3)
[6] Newell, Alejandro, Kaiyu Yang, and Jia Deng. “Stacked hourglass networks for human pose estimation.” European
conference on computer vision. Springer, Cham, 2016. 図も本論文より引用
16. 16
Stacked Hourglass Networksと呼ばれるEncoderとDecoderの繰り返し
(Hourglass Networks) で構成されるCNN (下図左) が用いられる。
下図右はHourglass Networksの繰り返し構造の詳細を示しており、単純に
繰り返しを行うだけでなく、Skip Connectionを使っている。
さらに各繰り返し毎にヒートマップを出力し(下図右の青い四角形)、各繰
り返しのヒートマップのLoss (教師となるヒートマップとの二乗誤差) の合
計を全体のLoss関数として学習を行う。
Stacked Hourglass Networks for HPE (2/3)
[6] Newell, Alejandro, Kaiyu Yang, and Jia Deng. “Stacked hourglass networks for human pose
estimation.” European conference on computer vision. Springer, Cham, 2016. より図を引用
17. 各Hourglass Networkは下図左の構造を持ち、下図左の各直方体は下図右の
Bottleneck Residual Blockを表している。
このような構造のネットワークを用いることで、様々なスケールの情報を抽
出が可能となり、姿勢推定に有利である。
顔や手などの特徴を特定には局所的な情報が必要であり、最終的な姿勢の推定は体全
体の情報が必要となる。
Stacked Hourglass Networks for HPE (3/3)
[6] Newell, Alejandro, Kaiyu Yang, and Jia Deng. “Stacked hourglass networks for human pose
estimation.” European conference on computer vision. Springer, Cham, 2016. より図を引用
17
18. ・Percentage of Correct Keypoints (PCK)
推定されたキーポイント座標と正解座標との差が、閾値以下である割合による評価で、
高い方が高精度。閾値は人物の頭部やトルソーサイズ (トルソーは胴体部分を示す単語)
を基準とした長さで設定される。
頭部の0.5倍を基準とするときにはPCKh@0.5 (PCKhは誤字ではない)、トルソーの0.2倍
を基準とするときはPCK@0.2の様に表される。
・Percentage of Correct Parts(PCP)
キーポイント単位ではなく、腕や足等のパーツ単位の評価値。パーツの両端のキーポイ
ントの予測値と正解値の差が、各パーツの長さを基準とした閾値以下である割合を示す。
この指標はパーツが小さいときに厳しい評価をしてしまうという欠点があるので、基準
長さをトルソーで正規化するPercentage of Detected Joints (PDJ) も使われる。
18
2D single-person HPEの評価方法
28. 3D HPEはキーポイントの実空間における三次元座標を推定するタスク。
3D HPEは奥行きを推定する必要があるので、2D HPEと比較して難易度の高い
タスクである。
3D HPEもSingle-personとMulti-person手法があり、本資料ではSingle-person
をメインで扱う。
Single-personでは体の中心点 (root) に対する各キーポイントの相対三次元座標
を推定し、Multi-personではそれに加え各人同士の位置関係も推定する。
28
3D HPE
29. 29
3D single-person HPEの手法は “Direct Estimation手法” と “2D to 3D
Lifting手法” に大きく分けられる。
3D single-person HPE (1/2)
[4] Dang, Qi, et al. “Deep learning based 2d human pose estimation: A survey“ Tsinghua Science and Technology 24.6 (2019): 663-676. より図を引用
・Direct Estimation
入力画像から直接3次元座標を推定する手法。
2D手法と同じようにRegressionとBody Part Detection手法の両方が存在する。
30. 30
3D single-person HPE (2/2)
・2D to 3D Lifting
最初に既存の2D HPE手法を用いて2次元座標を推定する。
その後別のネットワークを用いて2次元座標を入力として3次元座標を推定する。
近年ではこちらの手法の方がより高い精度を実現でき、主流となっている。
3Dと比較して2Dの教師データは手に入りやすく (後述)、これを用いて2D HPE精度を高
めることで3D HPEの精度も高くなるという点で有利。
[4] Dang, Qi, et al. “Deep learning based 2d human pose estimation: A survey“ Tsinghua Science and Technology 24.6 (2019): 663-676. より図を引用
31. 31
2014年に提案された3D HPEの初期の研究で、Direct EstimationをRegression
ベースで行う手法を提案している。
各キーポイントを直接推定するRegression networkに加え、サブタスクとして
入力画像の10×10に分割された各区画に関節が存在するか否かの分類タスクを
解くDetection networkを学習。
Regressionベースの手法だが、空間におけるキーポイントの存在予測はヒートマップを用い
た手法に近い考え方で、精度の向上やOcculutionへの対応力に貢献。
3D Human Pose Estimation from Monocular Images
with Deep Convolutional Neural Network [9]
[9] Li, Sijin, and Antoni B. Chan. "3d human pose
estimation from monocular images with deep
convolutional neural network." Asian Conference
on Computer Vision. Springer, Cham, 2014.
図も本論文から引用.
32. 32
Direct EstimationをBody Part Detection
ベースで行う手法を提案。
左図上の様に、入力画像に対する3次元
ヒートマップを出力する。
ヒートマップの奥行き方向の次元は、チャ
ネル数を増やすことで表現。
CNNの構造は前述のHourglassを採用。
右図下の様に、奥行き方向の解像度を最初
のHourglassでは粗くし、徐々に解像度を
高めていく方式によりパラメータ数を削減。
特徴マップの数を徐々に増やすことに対応。
Coarse-to-Fine Volumetric Prediction for Single-Image
3D Human Pose [10]
[10] Pavlakos, Georgios, et al. "Coarse-to-fine volumetric prediction for single-image 3D human
pose." Proceedings of the IEEE conference on computer vision and pattern recognition. 2017.
図も本論文から引用.
33. 33
2D to 3D Liftingを用いた最初の3D HPEの研究。
既存の2D HPEによる出力を、3D座標を推定するネットワークに入力
ネットワークは下図の様なシンプルな構造。
3D HPEを、2D HPEタスクと奥行き推定タスクに分割して解くという発想。
3Dと比較して2Dは豊富なデータが手に入るので2D HPEの精度を上げるこ
とが出来、2D HPEの精度が高いほど3D HPEの精度も上がることを示した。
仮に2D HPEの結果としてGround Truthを与えると、非常に精度は高くなる。
A simple yet effective baseline for 3d human pose estimation[11]
[11] Martinez, Julieta, et al. "A simple yet effective baseline for 3d human pose estimation." Proceedings of the IEEE
International Conference on Computer Vision. 2017. 図も本論文から引用.
34. 34
2D to 3D Lifting手法の一つ。
まずは既存の2D HPE手法で2D Poseを推定
事前に作成してある3D Poseライブラリを用
い、各3D Poseを2Dへ射影した際に最も2D
HPEの推定結果にマッチングするものを選択。
選択された3D Poseと2D HPE結果を基に最終
的な3D座標を出力。
ライブラリは約20万もの3D Poseを含んでい
るが、マッチングは39fpsでの動作が可能。
3D Human Pose Estimation = 2D Pose Estimation + Matching [12]
[12] Chen, Ching-Hang, and Deva Ramanan. "3d human pose estimation=
2d pose estimation+ matching." Proceedings of the IEEE Conference on
Computer Vision and Pattern Recognition. 2017. 図も本論文から引用.
35. 35
3D single-person HPE の評価方法
・Mean Per Joint Position Error (MPJPE)
推定されたキーポイントと正解座標の距離の、全てのキーポイントに対する平均値。
誤差の大きさに関する評価なので、値が小さい方が精度が高い。
3D HPEの評価指標として最も広く用いられている。
・Percentage of Correct 3D Keypoinrs (3DPCK)
2DにおけるPercentage of Correct Keypoints (PCK)と同じように、推定されたキーポイ
ント座標と正解座標との差が、閾値以下である割合による評価である。
ただし、距離の測り方はPCKが体のパーツの画像上の長さであるのに対し、3DPCKは実
世界の距離であり、一般的に150mmで設定されることが多い。
36. 36
公開されている3D HPEデータセットを以下に示す。
正解データが実空間座標である為、取得する為にはモーションキャプチャ
(MoCap) 等の高価な機器が必要で、データセット作成コストが高い。
広く用いられているデータセットであるHuman3.6Mの場合、フレーム数は動画ベースで
3.6Mと多いが、被験者の数が11人と非常に少ない。
データ取得機器の問題で、環境が室内に限定されたり、Multi-personのデータ取得が難しい
等の制約がついてしまうことも多い。
2D to 3D Lifting手法では2D HPEの部分に大規模2D HPEデータを使えるので有利。
3D HPEのデータセット
[4] Dang, Qi, et al. “Deep learning based 2d human pose estimation: A survey“ Tsinghua Science and Technology 24.6 (2019): 663-676. より図を引用
40. 40
位置・向きの分かっている複数のカメラを用いた3D single-person HPE。
各カメラによる画像に対し2D HPE手法でヒートマップを出力し、各カメラの場
所・向きを考慮して幾何学的に3次元空間でのヒートマップを作成し重ね合わせる。
人間は二つの目で深度を推定できるのと同じ要領。
カメラを多くすることで精度の向上が可能。
Learnable Triangulation of Human Pose [13]
[13] Iskakov, Karim, et al. “Learnable triangulation of human pose.” Proceedings of the
IEEE/CVF International Conference on Computer Vision. 2019. 図も本論文より引用
41. まず教師なしデータに対し2D to 3D Lifting
の3D姿勢推定を行う。
3Dの結果を2Dに射影し、2D to 3D Lifting
の途中で得られた2D座標との差分をLoss関
数として学習 (2D MPJPE loss)。
教師ありデータにおける各パーツの長さを
の平均と、教師なしデータの出力結果にお
ける長さの差分もLoss関数に追加 (Bone
length L2 loss)。
本研究は時系列を考慮した動画向けの3D
single-person HPEという側面も持っている。
41
3D human pose estimation in video with temporal
convolutions and semi-supervised training [2]
[2] Pavllo, Dario, et al. "3d human pose estimation in video with temporal
convolutions and semi-supervised training." Proceedings of the IEEE/CVF
Conference on Computer Vision and Pattern Recognition. 2019.
図も本論文より引用
42. 2D及び3D HPEデータセットの詳細・作成方法
[14] Andriluka, Mykhaylo, et al. “2d human pose estimation: New benchmark and state of the art analysis.” Proceedings of the IEEE
Conference on computer Vision and Pattern Recognition. 2014. (2D HPE データ)
[15] Ionescu, Catalin, et al. “Human3. 6m: Large scale datasets and predictive methods for 3d human sensing in natural
environments.” IEEE transactions on pattern analysis and machine intelligence 36.7 (2013): 1325-1339. (3D HPEデータ)
Occlusion と呼ばれる、キーポイントが隠れている場合に関する対処
[16] Iqbal, Umar, and Juergen Gall. "Multi-person pose estimation with local joint-to-person associations." European conference on
computer vision. Springer, Cham, 2016.
[17] Fang, Hao-Shu, et al. "Rmpe: Regional multi-person pose estimation." Proceedings of the IEEE international conference on
computer vision. 2017.
人間のテクスチャレベルの推定等、キーポイント以外を出力するHPE
[18] Li, Yining, Chen Huang, and Chen Change Loy. "Dense intrinsic appearance flow for human pose transfer." Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2019.
[19] Güler, Rıza Alp, Natalia Neverova, and Iasonas Kokkinos. "Densepose: Dense human pose estimation in the wild." Proceedings
of the IEEE conference on computer vision and pattern recognition. 2018.
42
本資料で説明しなかったトピック
43. 43
動画ベースのHPE
・時系列を考慮することで精度を上げる工夫
[2] Pavllo, Dario, et al. "3d human pose estimation in video with temporal convolutions and semi-supervised training." Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2019.
・Pose Trackingという、姿勢推定+Trackingが必要になるタスク
[20] Iqbal, Umar, Anton Milan, and Juergen Gall. "Posetrack: Joint multi-person pose estimation and tracking." Proceedings of the
IEEE Conference on Computer Vision and Pattern Recognition. 2017.
[21] Ning, Guanghan, Jian Pei, and Heng Huang. "Lighttrack: A generic framework for online top-down human pose
tracking." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. 2020.
人間の手や動物等、人間の体以外に対するHPE
[22] Zimmermann, Christian, and Thomas Brox. “Learning to estimate 3d hand pose from single rgb images.” Proceedings of the IEEE
international conference on computer vision. 2017. (手の姿勢推定)
[23] Li, Chen, and Gim Hee Lee. “From Synthetic to Real: Unsupervised Domain Adaptation for Animal Pose Estimation.” Proceedings of
the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021. (動物の姿勢推定)
本資料で説明しなかったトピック