1
DEEP LEARNING JP
[DL Papers]
http://deeplearning.jp/
“Focal Loss for Dense Object Detection (ICCV 2017)”
土居健人, 岩崎研
書誌情報
• ICCV2017 Student Best Paper
• 著者: T.Lin, P. Goyal, R. Girshick, K. He, P. Dolla ́r
– 物体検出でおなじみのR. Girshick氏とK. He氏の名も
• 引用数: 2017年は56
• 選定理由
– シンプルな手法で大きな成果をあげた
– クラスの不均衡の問題に興味があった
– 分類や領域分割など他のタスクにも適用できそう
– 最近Facebookの研究グループがDetectronを公開したのでタイムリー
• 注釈の無い図は本論文からの引用
2
論文概要
• 物体検出タスクにおいてone-stage detectorの精度を高めたい
– one-stage detector (YOLO, SSDなど)
– two-stage detector (Faster R-CNN系)
• 学習時のクラスの不均衡がone-stage detectorの検出精度に悪影
響を与えることを指摘
– 物体 (positive) << 背景 (negative)
– 背景(hard negative) << 背景(easy negative)
• クラスの不均衡を調整するためFocal Lossという損失関数を提案し,
one-stage detector(ReinaNet)でCOCOデータセットのsotaを達成.
3
4
※kawanoさんのYOLO9000の発表資料から引用
J. Redmon (2017)
One-stage detectors
• 一段のCNNで直接bounding box
の座標とクラスを推定する
• 代表的なモデルはYOLO, SSD
• two-stage detectorに比べると,
検出速度が速く,精度は劣る
5
J. Redmon (2016)
Two-stage detector
• 以下の2段階のプロセスで物体検出をする手法
– ①候補領域の抽出
– ②クラス,bounding boxの座標の推定
• 代表的なモデルはFaster R-CNN
• 検出精度が高いが,速度がやや遅い
6
S. Ren (2016)
speed/accuracy trade-off
7(J. Huang 2017)
本論文の仮説
仮説
クラスの不均衡がone-stage detectorの検出精度に悪影響を与えている.
8
one-stage detector
• 膨大な数(~100k)の抽出領域のほと
んどがeasy negative example
• 学習にあまり役立たないサンプルの数
が圧倒的になってしまっている.
• two-stage detectorではこのような不均
衡は起こっていない.
positive example
hard negative easy negative
※フリー素材
不均衡データ問題への対策
目標
クラスの不均衡の解決によりone-stage detectorの性能を上げる
先行研究
• boostrapping
• hard example mining
– 学習に寄与するデータのみサンプリングする.
提案手法
• 新たな損失関数 (Focal Loss)
9
Focal Loss
10
• αt : クラス間の重み付け
• (1-pt)γ : easy exampleをdown-weight
実装が簡単!!
実験
データセット
• COCO benchmark
11
RetinaNet
• ResNetベース
• subnetでbounding box, クラス推定
• 各ピクセルごとに領域を抽出
Focal Lossの効果
• Focal Lossの最適なパラメータの探索
– α = 0.25
– γ = 2.0
Focal Lossの適用により精度が向上
最適なαとγの探索が必要
12
OHEMとの比較
• Online Hard Example Mining (OHEM)
との比較
– OHEMは学習時にhard exampleをサン
プリングする手法
• OHEMよりも良い結果になった
– 筆者はeasy negativeを全く学習に使わ
ないのはよく無いのではと考察
13
easy negativeの損失の低減
• 累積分布関数により各抽出領域の損失への寄与を可視化.
• γ=2において負例の損失のほとんどがhard exampleからなるこ
とがわかる.
14
ベンチマークとの比較①
• two-stageの検出器の精度を上回り,state of the art.
15
ベンチマークとの比較②
• 速さ,精度ともに優れている.
16
まとめ
• 学習時のクラス不均衡がone-stage detectorの性能を下げて
いることを発見.
• 不均衡に対処するためにFocal Lossを提案.
• COCOベンチマークで検証し,既存の手法を速度と精度の両
方で上回った.
17
感想
• シンプルな手法で大きな成果を上げていてすごい.
• 各ピクセルごとに領域を抽出するRetinaNetはFocal Lossと相
性が良さそう.
– 大量に無駄な領域を抽出してもFocal Lossで調整できる.
• 分類やセグメンテーションなど他のタスクにも応用できそう
– X. Zhou et al. Focal FCN: Towards Small Object Segmentation with
Limited Training Data, arXiv, 2017.
– 多クラス問題の場合,超パラメータの探索が課題
18
参考文献
T. Lin et al. Focal Loss for Dense Object Detection. In ICCV, 2017.
J. Redmon and A. Farhadi. YOLO9000: Better, faster, stronger. In CVPR, 2017.
J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. You only look once: Unified, real-time object
detection. In CVPR, 2016.
S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: To- wards real-time object detection with
region proposal net- works. In NIPS, 2015.
J. Huang, V. Rathod, C. Sun, M. Zhu, A. Korattikara, A. Fathi, I. Fischer, Z.Wojna, Y. Song, S.
Guadarrama, and K. Murphy. Speed/accuracy trade-offs for modern convolu- tional object
detectors. 2017.
X. Zhou et al. Focal FCN: Towards Small Object Segmentation with Limited Training Data. arXiv, 2017.
19

[DL輪読会]Focal Loss for Dense Object Detection