LoginSignup
16
10

More than 3 years have passed since last update.

骨格推定、及びそのトラッキングに使うメトリクスのまとめ

Last updated at Posted at 2019-06-11

はじめに

骨格推定やそのトラッキングで使用するメトリクスのまとめ

以下のメトリクスに関してまとめる
1. PCP
2. PCPm
3. PCK
4. PCKh
5. MOTA

keypoint位置の正確さを表すメトリクス

1. PCP

[1]の論文中3章に以下のような記述がある。

『A body part returned by the algorithm is considered correct if its segment endpoints lie within 50% of the length of the ground-truth segment from their annotated location.』

例えば左肘の場合、ground truthの左肘を中心として、左の2の腕の半分を半径とする円内に左肘の推定値が入ってる場合、正しいとする。

このような画像の場合

pose_metrics_00.png

pose_metrics_01.png

このような青い円内に左肘の推定値が入っていればよい。

2.PCPm

PCPだと画像中に人が小さく写ってる場合、円が小さくなって正しいと判定されるのが困難になる。この点を改善したのがPCPm。

[2]の論文中2章に以下のような記述がある。

『We define a new metric denoted as “PCPm” that uses 50% of the mean ground-truth segment length over the entire test set as a matching threshold, but otherwise follows the definition of “PCP”.』

PCPの上記青い円の半径をテストデータ全体の平均値に変更するだけ。

3.PCK

[3]の論文中7.2章に以下のような記述がある。

『We define a candidate keypoint to be correct if it falls within α · max(h, w) pixels of the ground-truth keypoint, where h and w are the height and width of the bounding box respectively, and α controls the relative threshold for considering correctness.』

まず Pase dataset とかいうものは ground truth が以下のように keypoints とその bounding box が与えられてるみたい。

pose_metrics_02.png

頭のてっぺんの keypoint に注目すると、この矩形の長辺のα倍(例えば0.1とか0.2)の中に推定値が入っていればいい。

この青い円内に入っていればいいか?

psoe_metrics_03.png

4. PCKh

[2]の論文中2章に以下の記述がある。

『We use a slight modification of the “PCK” and define the matching threshold as 50% of the head segment length. We denote this metric as “PCKh”.』

PCKh の h は head のことか?

この図でいうと

pose_metrics_04.png

このようにground truth の頭頂を中心として、頭の長さの半分の半径の円内に、頭頂の推定値が入った場合を正しい、とする?

PCPに近いね。

トラッキングにおける状況

あるkeypoint(例えば頭頂)をトラッキングするタスクの場合、メトリクスの定義は簡単でない。

まず時間軸が増えるし、IDが入れ替わる状況も存在する。

例えば以下の論文[5]のFig4で考える。

pose_metrics_05.png

まず横軸の数字がフレーム番号。

黒の点線がground truthの奇跡で、灰色の領域はトラッキングできたと判定するエリア。

ground truthがトラッキングできた場合に、その円は塗りつぶされる。

一方で赤とか青とかは推論値の奇跡。それが灰色のエリアに入った場合、TP(true positive)となり、エリアから外れるとFP(false positive)となる。

事例1 (a)

まず(a)では

pose_metrics_06.png

frame 1 で推定した位置(赤の奇跡)がずれたためFPとなった。

frame 2 ではそれがエリアに入ったため TP。

frame 3 ではよりground truthに近い位置に推論された。もちろん TP。だが離れた位置にも物体があると誤認している。こちらはFP。

frame 4 では赤い方は依然TP。一方で青いFP側がground truthの奇跡に近づいてきていると捉えられている。

frame 5 赤い方は奇跡が上側と捉えられ、青い方がground truthの奇跡に近いと推定されたため、青い方がTPと判定された。赤い方がFP。よってIDが入れ替わった。(ID switch)

frame 6 青い方はそのままTP。

以上から、6つのフレームにおいてTPが5、FPが4、FNが1、IDのswitchが1回。

事例2 (b)

次に(b)では

pose_metrics_07.png

frame 1, 2 では赤い奇跡のように物体が動いていると推定されている。(TP)

frame 3 で奇跡の推定位置がずれたためground truthと同一の物体と見なされなかった。(FP 及び FN)

frame 4 でもずれた場所に推定されているため FP 及び FN。

frame 5 では範囲内に物体を推定しているが、一度見失ったため別の物体だと判定されている(TP 及び ID switch)

frame 6 ではTP。

以上から、6つのフレームにおいてTPが4、FPが2、FNが2、IDのswitchが1。

事例3 (c)

pose_metrics_08.png

(c)ではground truth として2つの物体が与えられている。

frame 1 では2つの物体を領域内に推定しているため、上側(赤)に推定された物体をground truthの上側、下側(青)に推定された物体をground truthの下側に対応づけられた。(TP2つ)

frame 2 でも2つの物体を領域内に推定している。(TP2つ)

frame 3 では1つの物体に対して赤のような奇跡を推定した。(TP)そうすると、もう1つの推定した物体(青)は下側のground truthの範囲から外れてしまった。(FP及びFN)

frame 4, 5 でも同様。(TP, FP, FN)

frame 6 では赤を見失い、青は相変わらず範囲外に推定したため、FP, FN2

以上から、6つのフレームにおいてTPが7、FPが4、FNが5、IDのswitchが1。

事例4 (d)

(d)では

pose_metrics_09.png

frame 1, 2, 3 でground truthから近い位置に物体(赤)を推定している。TP

frame 4 では ground truthが一度消えた(occulutionなど?)。だがアルゴリズムによっては赤のように奇跡を予測して推定するだろう。別の位置にも物体(青)が推定されている。FP2

frame 5 では ground truthが再び現れたが、最も近くに推定された物体(青)にIDがふられてしまったため、ID switchが起きた。TP, FP, ID switch。

frame 6 では前フレームからの青にIDが振られている。TP, FP

以上から、6つのフレームにおいてTPが5、FPが4、IDのswitchが1。

keypointのトラッキングの正確さを表すメトリクス

以下のMOTAは論文[4]で提案された。

5. MOTA (multiple object tracking accuracy)

前節の事例集から、トラッキングの場合はFP, FN 以外に ID switchがあるとわかった。

これら3つをerrorとして考慮したのがMOTA。具体的には以下の式。

\rm MOTA = 1 - \frac{\sum_t (FN_t + FP_t + IDSW_t)}{\sum_t GT_t}

分数の部分は ground truth に対するFNとFPとID switch を足したerrorの割合。

なのでground truth以上にめっちゃ物体を誤認するとFPが大きくなって1を超える。そうするとMOTAはマイナスの値となる。つまりMOTAの値域は $(\infty, 1]$ 。

reference

[1] V.Ferrari,M.Marin-Jimenez,andA.Zisserman.Progressive search space reduction for human pose estimation. In CVPR, 2008.

[2] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In CVPR’14.

[3] Y. Yang and D. Ramanan. Articulated pose estimation with flexible mixtures-of-parts. In CVPR, 2011.

[4] K. Bernardin and R. Stiefelhagen. Evaluating multiple object tracking performance: The CLEAR MOT metrics. Image and Video Processing, 2008(1):1–10, May 2008.

[5] A. Milan, L. Leal-Taixe, I. Reid, S. Roth, and K. Schindler. Mot16: A benchmark for multi-object tracking. arXiv preprint arXiv:1603.00831, 2016.

16
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
10