SlideShare a Scribd company logo
1 of 24
Download to read offline
Domain Adaptive Faster R-CNN
for Object Detection in the Wild
@__t2kasa__ 髙木 士 (Tsukasa Takagi)
2018/07/01 第46回 コンピュータビジョン勉強会@関東
CVPR2018読み会(前編)
自己紹介
 髙木 士 (Tsukasa Takagi)
 経歴
 ~2016/03 大阪大学 大学院電気電子情報工学専攻 修士課程
 2016/04~ キヤノン株式会社
画像認識・物体検出・Windows デスクトップアプリ
 Twitter: @__t2kasa__
 Blog: http://t2kasa.sub.jp/
背景:Domain Adaptation (DA)
 学習データとテストデータの分布が
異なる場合がある
 学習データのドメイン:ソース𝒮
 テストデータのドメイン:ターゲット𝒯
 ドメインの違いは性能低下の要因になる
 例:車載カメラで撮影した画像での認識
 天候の違い:晴れ・曇り・雨・霧
 シミュレーションとリアル
 カメラの種類
Domain Adaptationの問題設定 (1/2)
𝑃𝑆 𝑋, 𝑌 = 𝑃 𝑇 𝑋, 𝑌
学習データ テストデータ
一般的な機械学習の問題設定
学習データとテストデータのサンプルが
独立同分布の同じ確率分布から得られる
𝑃𝑆 𝑋, 𝑌
学習データ テストデータ
𝑃 𝑇 𝑋, 𝑌≠
Domain Adaptationの問題設定
学習データとテストデータのサンプルが
独立同分布の異なる確率分布から得られる
Domain Adaptationの問題設定 (2/2)
𝑃𝑆 𝑋, 𝑌
学習データ テストデータ
𝑃 𝑇 𝑋, 𝑌≠
Domain Adaptationの問題設定
学習データとテストデータのサンプルが
独立同分布の異なる確率分布から得られる
 今回のタスクの想定:Unsupervised DA
ソース𝑆のアノテーションはあるが
ターゲット𝑇のアノテーションはない
ここから本題
論文概要:Domain Adaptive Faster R-CNN
for Object Detection in the Wild
 物体検出における2つのドメインシフトに取り組む
Image-level shift:画像のスタイル・明るさ等
Instance-level shift:物体の見た目・サイズ等
 上記のドメインシフト各々に対応するDomain Adaptationのための
コンポーネントをFaster R-CNNに追加
 Cityscapes・KITTI・SIM10K間のドメインシフトにおいてFaster R-CNN
(baseline) よりも性能が向上することを確認
Faster R-CNN
 代表的な物体検出手法の一種
 2つのステップから構成
① Region Proposal Network (RPN)
で物体の候補領域を出力
② 候補領域毎にクラスと矩形の
スケール・オフセットを出力
Domain Adaptationの定式化:ℋ-divergence (1/2)
 ℋ-divergence:2つのドメイン𝒮と𝒯間の距離として定義
 識別誤差が大きい(距離𝑑ℋは小さい)
⇒ ℎは𝒮と𝒯のサンプルをうまく識別できない
⇒ 𝒮と𝒯は「近い」
⇒ Domain Adaptation!
𝑑ℋ 𝒮, 𝒯 = 2 1 − min
ℎ∈ℋ
𝑒𝑟𝑟𝒮 ℎ 𝐱 + 𝑒𝑟𝑟𝒯 ℎ 𝐱
特徴ベクトル:𝐱
ドメイン識別器(ソースを0・ターゲットを1):ℎ: 𝐱 → 0, 1
𝒮から得られたサンプルを
誤って𝒯と識別するときの誤差
𝒯から得られたサンプルを
誤って𝒮と識別するときの誤差
Domain Adaptationの定式化:ℋ-divergence (2/2)
 距離𝑑ℋを小さくすればDAがうまくできていると考えられる
⇒ 距離が小さくなるようにネットワーク𝑓を学習すればよい
 実際の学習にはGradient Reversal Layer (GRL)[Ganin+ 2014]を利用(後述)
min
𝑓
𝑑ℋ 𝒮, 𝒯 ⇔ max
𝑓
min
ℎ∈ℋ
𝑒𝑟𝑟𝒮 ℎ 𝐱 + 𝑒𝑟𝑟𝒯 ℎ 𝐱
Adversarial Training
[Ganin+ 2014] Y. Ganin, V. Lempitsky. Unsupervised Domain Adaptation by Backpropagation. ICML2015
物体検出の問題設定
Faster R-CNNでは
• 画像特徴:𝐼
• クラス:𝐶
• 矩形:𝐵
物体検出:事後分布𝑃 𝐶, 𝐵|𝐼 を学習
𝐼
𝐵𝐶
ドメインシフトがあると結合分布は一致しない:𝑃𝒮 𝐶, 𝐵, 𝐼 ≠ 𝑃𝒯 𝐶, 𝐵, 𝐼
本論文のアプローチ
 2つのDomain Adaptation
 Image-Level Adaptation
 Instance-Level Adaptation
 上記のDAが一貫するようにする
 Consistency Regularization
Image-Level Adaptation
 ベイズの定理より
𝑃(𝐶, 𝐵, 𝐼) = 𝑃(𝐶, 𝐵|𝐼)𝑃(𝐼)
 共変量シフト(入出力規則は変化しないが入力の分布が異なること)を仮定
ドメインによらず画像𝐼が与えられたときの出力は同じ
𝑃𝒮(𝐶, 𝐵|𝐼) = 𝑃𝒯(𝐶, 𝐵|𝐼)
𝑃𝒮(𝐼) = 𝑃𝒯(𝐼)
となるようにしたい
(そうすれば共変量シフトの仮定より𝑃𝒮 𝐶, 𝐵, 𝐼 = 𝑃𝒯 (𝐶, 𝐵, 𝐼)が成り立つ)
Instance-Level Adaptation
 ベイズの定理より
𝑃(𝐶, 𝐵, 𝐼) = 𝑃(𝐶|𝐵, 𝐼)𝑃(𝐵, 𝐼)
 共変量シフトを仮定
ドメインによらず物体を含む画像領域 𝐵, 𝐼 が与えられたときの出力は同じ
𝑃𝒮 𝐶|𝐵, 𝐼 = 𝑃𝒯 𝐶|𝐵, 𝐼
𝑃𝒮(𝐵, 𝐼) = 𝑃𝒯(𝐵, 𝐼)
となるようにしたい
(そうすれば共変量シフトの仮定より𝑃𝒮 𝐶, 𝐵, 𝐼 = 𝑃𝒯 (𝐶, 𝐵, 𝐼)が成り立つ)
Joint Adaptation
 Image-Level Adaptation:𝑃𝒮(𝐼) = 𝑃𝒯(𝐼)
 Instance-Level Adaptation:𝑃𝒮(𝐵, 𝐼) = 𝑃𝒯(𝐵, 𝐼)
 𝑃(𝐵, 𝐼) = 𝑃(𝐵|𝐼)𝑃(𝐼)と分解できるので,𝑃𝒮(𝐵|𝐼) = 𝑃𝒯(𝐵|𝐼)を仮定すると
2つのAlignmentについて
𝑃𝒮(𝐼) = 𝑃𝒯(𝐼) ⇔ 𝑃𝒮(𝐵, 𝐼) = 𝑃𝒯(𝐵, 𝐼)
 しかし𝑃(𝐵|𝐼)をドメイン間で一致させるのは難しい
実際には周辺分布𝑃(𝐼)を完全に一致させるのは困難
矩形のアノテーションはソースにしかない
Consistency Regularization
 前スライド:𝑃(𝐵|𝐼)をドメイン間で一致させるのは難しい
 ドメインのラベルを𝐷と表記すると
 Image-levelのドメイン識別器:𝑃(𝐷|𝐼)
 Instance-levelのドメイン識別器:𝑃(𝐷|𝐵, 𝐼)
 ベイズの定理より 𝑃(𝐷|𝐵, 𝐼)𝑃(𝐵|𝐼) = 𝑃(𝐵|𝐷, 𝐼)𝑃(𝐷|𝐼)
• 𝑃(𝐵|𝐼):ドメイン不変の矩形のpredictor
• 𝑃(𝐵|𝐷, 𝐼):ドメイン依存の矩形のpredictor
もし𝑃(𝐷|𝐼) = 𝑃(𝐷|𝐵, 𝐼)とできるなら,𝑃(𝐵|𝐼)に近づくように𝑃(𝐵|𝐷, 𝐼)を学習できる
⇒ そこで𝑃(𝐷|𝐼) = 𝑃(𝐷|𝐵, 𝐼)となる正則化項を損失関数に入れる
矩形のアノテーションはソースにしかないので𝑃(𝐵|𝐷 = 0, 𝐼)のみ矩形のpredictorを学習できる
⇒ この学習時に𝑃 𝐵|𝐼 = 𝑃 𝐵|𝐷, 𝐼 となるなら,ドメイン間で𝑃 𝐵|𝐼 がうまく一致していると考えられる
モデルアーキテクチャと損失関数 (1/3)
ℒ 𝑖𝑚𝑔 = − ෍
𝑖,𝑢,𝑣
𝐷𝑖 log 𝑝𝑖
𝑢,𝑣
+ 1 − 𝐷𝑖 log 1 − 𝑝𝑖
𝑢,𝑣
ℒ 𝑖𝑚𝑔:画像全体から得られた画像特徴に対する損失
ℒ 𝑖𝑛𝑠 = − ෍
𝑖,𝑗
𝐷𝑖 log 𝑝𝑖,𝑗 + 1 − 𝐷𝑖 log 1 − 𝑝𝑖,𝑗
ℒ 𝑖𝑛𝑠:ROIから得られた画像特徴に対する損失
・Image-levelとInstance-levelの各々のドメイン識別器の出力が一貫するようにする
ℒ 𝑐𝑠𝑡 = − ෍
𝑖,𝑗
1
𝐼
෍
𝑢,𝑣
𝑝𝑖
𝑢,𝑣
− 𝑝𝑖,𝑗
2
・ドメイン識別器はドメインの識別誤差を小さくしようとする
・ネットワークはドメイン間の距離が小さくなるように
(ドメインの識別誤差が大きくなるように)特徴ベクトルを出力する
ℒ 𝑐𝑠𝑡:Consistency Regularizer
モデルアーキテクチャと損失関数 (2/3)
𝐿 = 𝐿 𝑑𝑒𝑡 + 𝜆 𝐿𝑖𝑚𝑔 + 𝐿𝑖𝑛𝑠 + 𝐿 𝑐𝑠𝑡
Faster R-CNN
loss
Domain Adaptation
Components
𝐿 𝑑𝑒𝑡 = 𝐿 𝑟𝑝𝑛 + 𝐿 𝑟𝑜𝑖
𝐿𝑖𝑛𝑠
𝐿𝑖𝑚𝑔
𝐿 𝑐𝑠𝑡
モデルアーキテクチャと損失関数 (3/3)
Gradient Rerversal Layer (GRL)
 Gradient Reversal Layer
 Forward:恒等写像
 Backward:勾配の符号を反転
[Ganin+ 2014] Y. Ganin, V. Lempitsky. Unsupervised Domain Adaptation by Backpropagation. ICML2015
ドメインの識別誤差が
小さくなるようにパラメータを更新
ドメインの識別誤差が
大きくなるようにパラメータを更新
実験:実験設定
3種類のDomain Adaptationのケースを検証
CGと現実:SIM10k ⇒ Cityscapes
天候の違い:Cityscapes ⇒ Foggy Cityscapes
異なるカメラ:KITTI ⇒ Cityscapes
実験:DA componentsの有無と性能比較
SIM10k ⇒ Cityscapes
車のAPのみ評価
Cityscapes ⇒ Foggy Cityscapes
KITTI (K) ⇒ Cityscapes (C)
Cityscapes (C) ⇒ KITTI (K)
車のAPのみ評価
実験:Image-level alignmentと
Instance-level alignmentの有効性の比較
• Image-level alignmentがより有効
⇒ RPNに直接改善しているではないかと著者らは推測
まとめ
 物体検出における2つのドメインシフトに取り組む
 Image-level shift:画像のスタイル・明るさ等
 Instance-level shift:物体の見た目・サイズ等
 物体検出を確率論的に解釈してドメインシフトに対応するDA componentsを提案
 Image-level adaptation
 Instance-level adaptation
 Consistency Regularization
 Cityscapes・KITTI・SIM10K間のドメインシフトにおいてFaster R-CNN (baseline) より
も性能が向上することを確認
【参考】CVPR2018から DA + Object Detection
Cross-Domain Weakly-Supervised Object Detection through
Progressive Domain Adaptation
 新たな問題設定:cross-domain
weakly supervised object detection
 Instance-level annotation:ソース
 Image-level annotation:ターゲット
 ターゲットで検出されるインスタンスのクラスは
ソースのクラスと一致 or 部分集合
 提案手法
① ソースでモデルをpre-train
② ソースの画像をCycleGANで
ターゲット風に変換してfine-tune
③ fine-tuneしたモデルでターゲットの画像に
pseudo-labelingして更にfine-tune
[Inoue+ 2018] Cross-Domain Weakly-Supervised Object Detection through Progressive Domain Adaptation.

More Related Content

What's hot

最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)
最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)
最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)Shota Imai
 
[DL輪読会]Disentangling by Factorising
[DL輪読会]Disentangling by Factorising[DL輪読会]Disentangling by Factorising
[DL輪読会]Disentangling by FactorisingDeep Learning JP
 
[DL輪読会]Few-Shot Unsupervised Image-to-Image Translation
[DL輪読会]Few-Shot Unsupervised Image-to-Image Translation[DL輪読会]Few-Shot Unsupervised Image-to-Image Translation
[DL輪読会]Few-Shot Unsupervised Image-to-Image TranslationDeep Learning JP
 
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View SynthesisDeep Learning JP
 
[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係についてDeep Learning JP
 
[DL輪読会]MetaFormer is Actually What You Need for Vision
[DL輪読会]MetaFormer is Actually What You Need for Vision[DL輪読会]MetaFormer is Actually What You Need for Vision
[DL輪読会]MetaFormer is Actually What You Need for VisionDeep Learning JP
 
強化学習その4
強化学習その4強化学習その4
強化学習その4nishio
 
[Ridge-i 論文よみかい] Wasserstein auto encoder
[Ridge-i 論文よみかい] Wasserstein auto encoder[Ridge-i 論文よみかい] Wasserstein auto encoder
[Ridge-i 論文よみかい] Wasserstein auto encoderMasanari Kimura
 
Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...
Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...
Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...Hideki Tsunashima
 
SakataMoriLab GNN勉強会第一回資料
SakataMoriLab GNN勉強会第一回資料SakataMoriLab GNN勉強会第一回資料
SakataMoriLab GNN勉強会第一回資料ttt_miura
 
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...Deep Learning JP
 
【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces
【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces
【DL輪読会】Efficiently Modeling Long Sequences with Structured State SpacesDeep Learning JP
 
SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​
SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​
SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​SSII
 
Layer Normalization@NIPS+読み会・関西
Layer Normalization@NIPS+読み会・関西Layer Normalization@NIPS+読み会・関西
Layer Normalization@NIPS+読み会・関西Keigo Nishida
 
[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep Networks
[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep Networks[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep Networks
[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep NetworksDeep Learning JP
 
[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networksDeep Learning JP
 
ドメイン適応の原理と応用
ドメイン適応の原理と応用ドメイン適応の原理と応用
ドメイン適応の原理と応用Yoshitaka Ushiku
 
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...Deep Learning JP
 
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)Deep Learning JP
 
[DL輪読会]Learning Latent Dynamics for Planning from Pixels
[DL輪読会]Learning Latent Dynamics for Planning from Pixels[DL輪読会]Learning Latent Dynamics for Planning from Pixels
[DL輪読会]Learning Latent Dynamics for Planning from PixelsDeep Learning JP
 

What's hot (20)

最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)
最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)
最新の多様な深層強化学習モデルとその応用(第40回強化学習アーキテクチャ講演資料)
 
[DL輪読会]Disentangling by Factorising
[DL輪読会]Disentangling by Factorising[DL輪読会]Disentangling by Factorising
[DL輪読会]Disentangling by Factorising
 
[DL輪読会]Few-Shot Unsupervised Image-to-Image Translation
[DL輪読会]Few-Shot Unsupervised Image-to-Image Translation[DL輪読会]Few-Shot Unsupervised Image-to-Image Translation
[DL輪読会]Few-Shot Unsupervised Image-to-Image Translation
 
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[DL輪読会]NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
 
[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について
 
[DL輪読会]MetaFormer is Actually What You Need for Vision
[DL輪読会]MetaFormer is Actually What You Need for Vision[DL輪読会]MetaFormer is Actually What You Need for Vision
[DL輪読会]MetaFormer is Actually What You Need for Vision
 
強化学習その4
強化学習その4強化学習その4
強化学習その4
 
[Ridge-i 論文よみかい] Wasserstein auto encoder
[Ridge-i 論文よみかい] Wasserstein auto encoder[Ridge-i 論文よみかい] Wasserstein auto encoder
[Ridge-i 論文よみかい] Wasserstein auto encoder
 
Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...
Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...
Disentanglement Survey:Can You Explain How Much Are Generative models Disenta...
 
SakataMoriLab GNN勉強会第一回資料
SakataMoriLab GNN勉強会第一回資料SakataMoriLab GNN勉強会第一回資料
SakataMoriLab GNN勉強会第一回資料
 
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
 
【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces
【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces
【DL輪読会】Efficiently Modeling Long Sequences with Structured State Spaces
 
SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​
SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​
SSII2020TS: 機械学習モデルの判断根拠の説明​ 〜 Explainable AI 研究の近年の展開 〜​
 
Layer Normalization@NIPS+読み会・関西
Layer Normalization@NIPS+読み会・関西Layer Normalization@NIPS+読み会・関西
Layer Normalization@NIPS+読み会・関西
 
[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep Networks
[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep Networks[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep Networks
[DL輪読会]Bayesian Uncertainty Estimation for Batch Normalized Deep Networks
 
[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks
 
ドメイン適応の原理と応用
ドメイン適応の原理と応用ドメイン適応の原理と応用
ドメイン適応の原理と応用
 
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
 
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
【DL輪読会】言語以外でのTransformerのまとめ (ViT, Perceiver, Frozen Pretrained Transformer etc)
 
[DL輪読会]Learning Latent Dynamics for Planning from Pixels
[DL輪読会]Learning Latent Dynamics for Planning from Pixels[DL輪読会]Learning Latent Dynamics for Planning from Pixels
[DL輪読会]Learning Latent Dynamics for Planning from Pixels
 

Similar to Domain Adaptive Faster R-CNN for Object Detection in the Wild 論文紹介

(文献紹介)深層学習による動被写体ロバストなカメラの動き推定
(文献紹介)深層学習による動被写体ロバストなカメラの動き推定(文献紹介)深層学習による動被写体ロバストなカメラの動き推定
(文献紹介)深層学習による動被写体ロバストなカメラの動き推定Morpho, Inc.
 
ICCV2019読み会「Learning Meshes for Dense Visual SLAM」
ICCV2019読み会「Learning Meshes for Dense Visual SLAM」ICCV2019読み会「Learning Meshes for Dense Visual SLAM」
ICCV2019読み会「Learning Meshes for Dense Visual SLAM」Sho Kagami
 
Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介
Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介
Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介Tsukasa Takagi
 
20161203 cv 3_d_recon_tracking_eventcamera
20161203 cv 3_d_recon_tracking_eventcamera20161203 cv 3_d_recon_tracking_eventcamera
20161203 cv 3_d_recon_tracking_eventcameraKyohei Unno
 
201209 Biopackathon 12th
201209 Biopackathon 12th201209 Biopackathon 12th
201209 Biopackathon 12thSatoshi Kume
 
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説Masaya Kaneko
 
CVPR2019 survey Domain Adaptation on Semantic Segmentation
CVPR2019 survey Domain Adaptation on Semantic SegmentationCVPR2019 survey Domain Adaptation on Semantic Segmentation
CVPR2019 survey Domain Adaptation on Semantic SegmentationYamato OKAMOTO
 
Robust Vehicle Localization in Urban Environments Using Probabilistic Maps
Robust Vehicle Localization in Urban Environments Using Probabilistic MapsRobust Vehicle Localization in Urban Environments Using Probabilistic Maps
Robust Vehicle Localization in Urban Environments Using Probabilistic MapsKitsukawa Yuki
 
全力解説!Transformer
全力解説!Transformer全力解説!Transformer
全力解説!TransformerArithmer Inc.
 
Deep learning for acoustic modeling in parametric speech generation
Deep learning for acoustic modeling in parametric speech generationDeep learning for acoustic modeling in parametric speech generation
Deep learning for acoustic modeling in parametric speech generationYuki Saito
 
第126回 ロボット工学セミナー 三次元点群と深層学習
第126回 ロボット工学セミナー 三次元点群と深層学習第126回 ロボット工学セミナー 三次元点群と深層学習
第126回 ロボット工学セミナー 三次元点群と深層学習Naoya Chiba
 
GPU上でのNLP向け深層学習の実装について
GPU上でのNLP向け深層学習の実装についてGPU上でのNLP向け深層学習の実装について
GPU上でのNLP向け深層学習の実装についてYuya Unno
 
Light weightbinocular sigasia2012_face
Light weightbinocular sigasia2012_faceLight weightbinocular sigasia2012_face
Light weightbinocular sigasia2012_faceishii yasunori
 
大規模画像認識とその周辺
大規模画像認識とその周辺大規模画像認識とその周辺
大規模画像認識とその周辺n_hidekey
 
20190131 lidar-camera fusion semantic segmentation survey
20190131 lidar-camera fusion semantic segmentation survey20190131 lidar-camera fusion semantic segmentation survey
20190131 lidar-camera fusion semantic segmentation surveyTakuya Minagawa
 
[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...
[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...
[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...Deep Learning JP
 
グラフニューラルネットワーク入門
グラフニューラルネットワーク入門グラフニューラルネットワーク入門
グラフニューラルネットワーク入門ryosuke-kojima
 
第41回関東CV勉強会 CNN-SLAM
第41回関東CV勉強会 CNN-SLAM第41回関東CV勉強会 CNN-SLAM
第41回関東CV勉強会 CNN-SLAM邦洋 長谷川
 
AGA_CVPR2017
AGA_CVPR2017AGA_CVPR2017
AGA_CVPR2017nonane
 
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleToru Tamaki
 

Similar to Domain Adaptive Faster R-CNN for Object Detection in the Wild 論文紹介 (20)

(文献紹介)深層学習による動被写体ロバストなカメラの動き推定
(文献紹介)深層学習による動被写体ロバストなカメラの動き推定(文献紹介)深層学習による動被写体ロバストなカメラの動き推定
(文献紹介)深層学習による動被写体ロバストなカメラの動き推定
 
ICCV2019読み会「Learning Meshes for Dense Visual SLAM」
ICCV2019読み会「Learning Meshes for Dense Visual SLAM」ICCV2019読み会「Learning Meshes for Dense Visual SLAM」
ICCV2019読み会「Learning Meshes for Dense Visual SLAM」
 
Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介
Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介
Learning Semantic Representations for Unsupervised Domain Adaptation 論文紹介
 
20161203 cv 3_d_recon_tracking_eventcamera
20161203 cv 3_d_recon_tracking_eventcamera20161203 cv 3_d_recon_tracking_eventcamera
20161203 cv 3_d_recon_tracking_eventcamera
 
201209 Biopackathon 12th
201209 Biopackathon 12th201209 Biopackathon 12th
201209 Biopackathon 12th
 
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
GN-Net: The Gauss-Newton Loss for Deep Direct SLAMの解説
 
CVPR2019 survey Domain Adaptation on Semantic Segmentation
CVPR2019 survey Domain Adaptation on Semantic SegmentationCVPR2019 survey Domain Adaptation on Semantic Segmentation
CVPR2019 survey Domain Adaptation on Semantic Segmentation
 
Robust Vehicle Localization in Urban Environments Using Probabilistic Maps
Robust Vehicle Localization in Urban Environments Using Probabilistic MapsRobust Vehicle Localization in Urban Environments Using Probabilistic Maps
Robust Vehicle Localization in Urban Environments Using Probabilistic Maps
 
全力解説!Transformer
全力解説!Transformer全力解説!Transformer
全力解説!Transformer
 
Deep learning for acoustic modeling in parametric speech generation
Deep learning for acoustic modeling in parametric speech generationDeep learning for acoustic modeling in parametric speech generation
Deep learning for acoustic modeling in parametric speech generation
 
第126回 ロボット工学セミナー 三次元点群と深層学習
第126回 ロボット工学セミナー 三次元点群と深層学習第126回 ロボット工学セミナー 三次元点群と深層学習
第126回 ロボット工学セミナー 三次元点群と深層学習
 
GPU上でのNLP向け深層学習の実装について
GPU上でのNLP向け深層学習の実装についてGPU上でのNLP向け深層学習の実装について
GPU上でのNLP向け深層学習の実装について
 
Light weightbinocular sigasia2012_face
Light weightbinocular sigasia2012_faceLight weightbinocular sigasia2012_face
Light weightbinocular sigasia2012_face
 
大規模画像認識とその周辺
大規模画像認識とその周辺大規模画像認識とその周辺
大規模画像認識とその周辺
 
20190131 lidar-camera fusion semantic segmentation survey
20190131 lidar-camera fusion semantic segmentation survey20190131 lidar-camera fusion semantic segmentation survey
20190131 lidar-camera fusion semantic segmentation survey
 
[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...
[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...
[DL輪読会]Differentiable Mapping Networks: Learning Structured Map Representatio...
 
グラフニューラルネットワーク入門
グラフニューラルネットワーク入門グラフニューラルネットワーク入門
グラフニューラルネットワーク入門
 
第41回関東CV勉強会 CNN-SLAM
第41回関東CV勉強会 CNN-SLAM第41回関東CV勉強会 CNN-SLAM
第41回関東CV勉強会 CNN-SLAM
 
AGA_CVPR2017
AGA_CVPR2017AGA_CVPR2017
AGA_CVPR2017
 
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
 

Domain Adaptive Faster R-CNN for Object Detection in the Wild 論文紹介

  • 1. Domain Adaptive Faster R-CNN for Object Detection in the Wild @__t2kasa__ 髙木 士 (Tsukasa Takagi) 2018/07/01 第46回 コンピュータビジョン勉強会@関東 CVPR2018読み会(前編)
  • 2. 自己紹介  髙木 士 (Tsukasa Takagi)  経歴  ~2016/03 大阪大学 大学院電気電子情報工学専攻 修士課程  2016/04~ キヤノン株式会社 画像認識・物体検出・Windows デスクトップアプリ  Twitter: @__t2kasa__  Blog: http://t2kasa.sub.jp/
  • 3. 背景:Domain Adaptation (DA)  学習データとテストデータの分布が 異なる場合がある  学習データのドメイン:ソース𝒮  テストデータのドメイン:ターゲット𝒯  ドメインの違いは性能低下の要因になる  例:車載カメラで撮影した画像での認識  天候の違い:晴れ・曇り・雨・霧  シミュレーションとリアル  カメラの種類
  • 4. Domain Adaptationの問題設定 (1/2) 𝑃𝑆 𝑋, 𝑌 = 𝑃 𝑇 𝑋, 𝑌 学習データ テストデータ 一般的な機械学習の問題設定 学習データとテストデータのサンプルが 独立同分布の同じ確率分布から得られる 𝑃𝑆 𝑋, 𝑌 学習データ テストデータ 𝑃 𝑇 𝑋, 𝑌≠ Domain Adaptationの問題設定 学習データとテストデータのサンプルが 独立同分布の異なる確率分布から得られる
  • 5. Domain Adaptationの問題設定 (2/2) 𝑃𝑆 𝑋, 𝑌 学習データ テストデータ 𝑃 𝑇 𝑋, 𝑌≠ Domain Adaptationの問題設定 学習データとテストデータのサンプルが 独立同分布の異なる確率分布から得られる  今回のタスクの想定:Unsupervised DA ソース𝑆のアノテーションはあるが ターゲット𝑇のアノテーションはない
  • 7. 論文概要:Domain Adaptive Faster R-CNN for Object Detection in the Wild  物体検出における2つのドメインシフトに取り組む Image-level shift:画像のスタイル・明るさ等 Instance-level shift:物体の見た目・サイズ等  上記のドメインシフト各々に対応するDomain Adaptationのための コンポーネントをFaster R-CNNに追加  Cityscapes・KITTI・SIM10K間のドメインシフトにおいてFaster R-CNN (baseline) よりも性能が向上することを確認
  • 8. Faster R-CNN  代表的な物体検出手法の一種  2つのステップから構成 ① Region Proposal Network (RPN) で物体の候補領域を出力 ② 候補領域毎にクラスと矩形の スケール・オフセットを出力
  • 9. Domain Adaptationの定式化:ℋ-divergence (1/2)  ℋ-divergence:2つのドメイン𝒮と𝒯間の距離として定義  識別誤差が大きい(距離𝑑ℋは小さい) ⇒ ℎは𝒮と𝒯のサンプルをうまく識別できない ⇒ 𝒮と𝒯は「近い」 ⇒ Domain Adaptation! 𝑑ℋ 𝒮, 𝒯 = 2 1 − min ℎ∈ℋ 𝑒𝑟𝑟𝒮 ℎ 𝐱 + 𝑒𝑟𝑟𝒯 ℎ 𝐱 特徴ベクトル:𝐱 ドメイン識別器(ソースを0・ターゲットを1):ℎ: 𝐱 → 0, 1 𝒮から得られたサンプルを 誤って𝒯と識別するときの誤差 𝒯から得られたサンプルを 誤って𝒮と識別するときの誤差
  • 10. Domain Adaptationの定式化:ℋ-divergence (2/2)  距離𝑑ℋを小さくすればDAがうまくできていると考えられる ⇒ 距離が小さくなるようにネットワーク𝑓を学習すればよい  実際の学習にはGradient Reversal Layer (GRL)[Ganin+ 2014]を利用(後述) min 𝑓 𝑑ℋ 𝒮, 𝒯 ⇔ max 𝑓 min ℎ∈ℋ 𝑒𝑟𝑟𝒮 ℎ 𝐱 + 𝑒𝑟𝑟𝒯 ℎ 𝐱 Adversarial Training [Ganin+ 2014] Y. Ganin, V. Lempitsky. Unsupervised Domain Adaptation by Backpropagation. ICML2015
  • 11. 物体検出の問題設定 Faster R-CNNでは • 画像特徴:𝐼 • クラス:𝐶 • 矩形:𝐵 物体検出:事後分布𝑃 𝐶, 𝐵|𝐼 を学習 𝐼 𝐵𝐶 ドメインシフトがあると結合分布は一致しない:𝑃𝒮 𝐶, 𝐵, 𝐼 ≠ 𝑃𝒯 𝐶, 𝐵, 𝐼
  • 12. 本論文のアプローチ  2つのDomain Adaptation  Image-Level Adaptation  Instance-Level Adaptation  上記のDAが一貫するようにする  Consistency Regularization
  • 13. Image-Level Adaptation  ベイズの定理より 𝑃(𝐶, 𝐵, 𝐼) = 𝑃(𝐶, 𝐵|𝐼)𝑃(𝐼)  共変量シフト(入出力規則は変化しないが入力の分布が異なること)を仮定 ドメインによらず画像𝐼が与えられたときの出力は同じ 𝑃𝒮(𝐶, 𝐵|𝐼) = 𝑃𝒯(𝐶, 𝐵|𝐼) 𝑃𝒮(𝐼) = 𝑃𝒯(𝐼) となるようにしたい (そうすれば共変量シフトの仮定より𝑃𝒮 𝐶, 𝐵, 𝐼 = 𝑃𝒯 (𝐶, 𝐵, 𝐼)が成り立つ)
  • 14. Instance-Level Adaptation  ベイズの定理より 𝑃(𝐶, 𝐵, 𝐼) = 𝑃(𝐶|𝐵, 𝐼)𝑃(𝐵, 𝐼)  共変量シフトを仮定 ドメインによらず物体を含む画像領域 𝐵, 𝐼 が与えられたときの出力は同じ 𝑃𝒮 𝐶|𝐵, 𝐼 = 𝑃𝒯 𝐶|𝐵, 𝐼 𝑃𝒮(𝐵, 𝐼) = 𝑃𝒯(𝐵, 𝐼) となるようにしたい (そうすれば共変量シフトの仮定より𝑃𝒮 𝐶, 𝐵, 𝐼 = 𝑃𝒯 (𝐶, 𝐵, 𝐼)が成り立つ)
  • 15. Joint Adaptation  Image-Level Adaptation:𝑃𝒮(𝐼) = 𝑃𝒯(𝐼)  Instance-Level Adaptation:𝑃𝒮(𝐵, 𝐼) = 𝑃𝒯(𝐵, 𝐼)  𝑃(𝐵, 𝐼) = 𝑃(𝐵|𝐼)𝑃(𝐼)と分解できるので,𝑃𝒮(𝐵|𝐼) = 𝑃𝒯(𝐵|𝐼)を仮定すると 2つのAlignmentについて 𝑃𝒮(𝐼) = 𝑃𝒯(𝐼) ⇔ 𝑃𝒮(𝐵, 𝐼) = 𝑃𝒯(𝐵, 𝐼)  しかし𝑃(𝐵|𝐼)をドメイン間で一致させるのは難しい 実際には周辺分布𝑃(𝐼)を完全に一致させるのは困難 矩形のアノテーションはソースにしかない
  • 16. Consistency Regularization  前スライド:𝑃(𝐵|𝐼)をドメイン間で一致させるのは難しい  ドメインのラベルを𝐷と表記すると  Image-levelのドメイン識別器:𝑃(𝐷|𝐼)  Instance-levelのドメイン識別器:𝑃(𝐷|𝐵, 𝐼)  ベイズの定理より 𝑃(𝐷|𝐵, 𝐼)𝑃(𝐵|𝐼) = 𝑃(𝐵|𝐷, 𝐼)𝑃(𝐷|𝐼) • 𝑃(𝐵|𝐼):ドメイン不変の矩形のpredictor • 𝑃(𝐵|𝐷, 𝐼):ドメイン依存の矩形のpredictor もし𝑃(𝐷|𝐼) = 𝑃(𝐷|𝐵, 𝐼)とできるなら,𝑃(𝐵|𝐼)に近づくように𝑃(𝐵|𝐷, 𝐼)を学習できる ⇒ そこで𝑃(𝐷|𝐼) = 𝑃(𝐷|𝐵, 𝐼)となる正則化項を損失関数に入れる 矩形のアノテーションはソースにしかないので𝑃(𝐵|𝐷 = 0, 𝐼)のみ矩形のpredictorを学習できる ⇒ この学習時に𝑃 𝐵|𝐼 = 𝑃 𝐵|𝐷, 𝐼 となるなら,ドメイン間で𝑃 𝐵|𝐼 がうまく一致していると考えられる
  • 17. モデルアーキテクチャと損失関数 (1/3) ℒ 𝑖𝑚𝑔 = − ෍ 𝑖,𝑢,𝑣 𝐷𝑖 log 𝑝𝑖 𝑢,𝑣 + 1 − 𝐷𝑖 log 1 − 𝑝𝑖 𝑢,𝑣 ℒ 𝑖𝑚𝑔:画像全体から得られた画像特徴に対する損失 ℒ 𝑖𝑛𝑠 = − ෍ 𝑖,𝑗 𝐷𝑖 log 𝑝𝑖,𝑗 + 1 − 𝐷𝑖 log 1 − 𝑝𝑖,𝑗 ℒ 𝑖𝑛𝑠:ROIから得られた画像特徴に対する損失 ・Image-levelとInstance-levelの各々のドメイン識別器の出力が一貫するようにする ℒ 𝑐𝑠𝑡 = − ෍ 𝑖,𝑗 1 𝐼 ෍ 𝑢,𝑣 𝑝𝑖 𝑢,𝑣 − 𝑝𝑖,𝑗 2 ・ドメイン識別器はドメインの識別誤差を小さくしようとする ・ネットワークはドメイン間の距離が小さくなるように (ドメインの識別誤差が大きくなるように)特徴ベクトルを出力する ℒ 𝑐𝑠𝑡:Consistency Regularizer
  • 18. モデルアーキテクチャと損失関数 (2/3) 𝐿 = 𝐿 𝑑𝑒𝑡 + 𝜆 𝐿𝑖𝑚𝑔 + 𝐿𝑖𝑛𝑠 + 𝐿 𝑐𝑠𝑡 Faster R-CNN loss Domain Adaptation Components 𝐿 𝑑𝑒𝑡 = 𝐿 𝑟𝑝𝑛 + 𝐿 𝑟𝑜𝑖 𝐿𝑖𝑛𝑠 𝐿𝑖𝑚𝑔 𝐿 𝑐𝑠𝑡
  • 19. モデルアーキテクチャと損失関数 (3/3) Gradient Rerversal Layer (GRL)  Gradient Reversal Layer  Forward:恒等写像  Backward:勾配の符号を反転 [Ganin+ 2014] Y. Ganin, V. Lempitsky. Unsupervised Domain Adaptation by Backpropagation. ICML2015 ドメインの識別誤差が 小さくなるようにパラメータを更新 ドメインの識別誤差が 大きくなるようにパラメータを更新
  • 20. 実験:実験設定 3種類のDomain Adaptationのケースを検証 CGと現実:SIM10k ⇒ Cityscapes 天候の違い:Cityscapes ⇒ Foggy Cityscapes 異なるカメラ:KITTI ⇒ Cityscapes
  • 21. 実験:DA componentsの有無と性能比較 SIM10k ⇒ Cityscapes 車のAPのみ評価 Cityscapes ⇒ Foggy Cityscapes KITTI (K) ⇒ Cityscapes (C) Cityscapes (C) ⇒ KITTI (K) 車のAPのみ評価
  • 22. 実験:Image-level alignmentと Instance-level alignmentの有効性の比較 • Image-level alignmentがより有効 ⇒ RPNに直接改善しているではないかと著者らは推測
  • 23. まとめ  物体検出における2つのドメインシフトに取り組む  Image-level shift:画像のスタイル・明るさ等  Instance-level shift:物体の見た目・サイズ等  物体検出を確率論的に解釈してドメインシフトに対応するDA componentsを提案  Image-level adaptation  Instance-level adaptation  Consistency Regularization  Cityscapes・KITTI・SIM10K間のドメインシフトにおいてFaster R-CNN (baseline) より も性能が向上することを確認
  • 24. 【参考】CVPR2018から DA + Object Detection Cross-Domain Weakly-Supervised Object Detection through Progressive Domain Adaptation  新たな問題設定:cross-domain weakly supervised object detection  Instance-level annotation:ソース  Image-level annotation:ターゲット  ターゲットで検出されるインスタンスのクラスは ソースのクラスと一致 or 部分集合  提案手法 ① ソースでモデルをpre-train ② ソースの画像をCycleGANで ターゲット風に変換してfine-tune ③ fine-tuneしたモデルでターゲットの画像に pseudo-labelingして更にfine-tune [Inoue+ 2018] Cross-Domain Weakly-Supervised Object Detection through Progressive Domain Adaptation.