SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Unsupervised Monocular Depth
Estimation
with Left-Right Consistency
arXivTimes勉強会
2017/08/09
山内隆太郎
Motivation
• CNNで単眼深度推定を行いたい
• 教師データを集めるのが大変
• →ステレオ画像から単眼深度推定を学習させられないか?
Idea
• Depth mapを直接推定するのではなく、Disparity map(視差)を
推定する
• Disparity map:左(右)画像のあるピクセルをどのくらい右(左)
に動かせば右(左)画像の対応するピクセルに一致するか?
• 平行な二台のカメラで撮られた画像において、カメラの近くに
ある物体ほど左右で位置のずれが大きい(無限遠ではズレ0)
• 実際の深度=Scale factor / Disparity
Disparity
Processing flow
• 左画像から、左右のDisparity mapを生成する
• オリジナル画像とDisparity mapをもとに、反対側
の画像を合成する
• オリジナル画像と合成画像の差をlossとして学習
How to make opposite Image.
• 右(左)画像と左(右)dispマップから左(右)画像をつくりたい
• この操作は微分可能でなくてはならない
• →Bilinear Samplerを使う
• Spatial Transformer Networks
[https://arxiv.org/abs/1506.02025]参照
Bilinear Sampler
Right Image
Left disp map
Generated Left Image
Bilinear Sampler (2)
• 左画像のピクセルL[x, y]に対応するのはR[x+disp_L[x, y], y]
• この座標は
R[floor(x+disp_L[x, y]), y], R[ceil(x+disp_L[x, y]), y]
の内分点
• したがって上の二点のピクセル値に内分比をかけて足し合わせ
た点をL[x, y]の予測値とする
内分比は
disp_L[x, y]-floor(disp_L[x, y]) : ceil(disp_L[x, y])- disp_L[x, y]
→この操作は微分可能
• 問題点:隣接するピクセル間の値の差が大きいところばかり学
習する→ Disparity Smoothness Loss(後述)を導入
Loss
• Appearance Matching Loss
合成された画像とオリジナルの差
• Disparity Smoothness Loss
近い点は距離が近いという仮定
• Left-Right Disparity Consistency Loss
左右のDisparity mapはある程度似ているという仮定
Appearance Matching Loss
𝐶 𝑎𝑝
𝑙 =
1
𝑁
𝑖,𝑗
𝛼 1 − 𝑆𝑆𝐼𝑀 𝐼𝑖𝑗
𝑙
, 𝐼𝑖𝑗
𝑙
2
+ 1 − 𝛼 ‖𝐼𝑖𝑗
𝑙
− 𝐼𝑖𝑗
𝑙
‖
• SSIMは画像の質を評価する関数
Image Quality Assessment: From Error Visibility to Structural Similarity
[http://www.cns.nyu.edu/pub/lcv/wang03-preprint.pdf]参照
• 𝑆𝑆𝐼𝑀 𝑥, 𝑦 ≔
2𝜇 𝑥 𝜇 𝑦+𝐶1 2𝜎 𝑥𝑦+𝐶2
(𝜇 𝑥
2+𝜇 𝑦
2+𝐶1)(𝜎 𝑥+𝜎 𝑦+𝐶2)
μやσはk×kのカーネルごとに計算される
Disparity Smoothness Loss
𝐶 𝑑𝑠
𝑙
=
1
𝑁
𝑖,𝑗
𝜕 𝑥 𝑑𝑖𝑗
𝑙
𝑒−‖𝜕 𝑥 𝐼𝑖𝑗
𝑙
‖
+ 𝜕 𝑦 𝑑𝑖𝑗
𝑙
𝑒−‖𝜕 𝑦 𝐼𝑖𝑗
𝑙
‖
• あるピクセルに対応するdisparityが上下左右のピクセルの
disparityとあまり離れないようにする
• ピクセルの画素値の勾配で重み付け
Left-Right Disparity Consistency Loss
𝐶𝑙𝑟
𝑙
=
1
𝑁
𝑖,𝑗
|𝑑𝑖𝑗
𝑙
− 𝑑𝑖𝑗+𝑑 𝑖𝑗
𝑙
𝑟
|
• Bilinear Samplerによって左(右)disparity mapから右
(左)disparity mapを合成し、互いに一致するようにする
Loss
𝐶𝑠 = 𝛼 𝑎𝑝 𝐶 𝑎𝑝
𝑙 + 𝐶 𝑎𝑝
𝑟 + 𝛼 𝑑𝑠 𝐶 𝑑𝑠
𝑙
+ 𝐶 𝑑𝑠
𝑟
+ 𝛼𝑙𝑟 𝐶𝑙𝑟
𝑙
+ 𝐶𝑙𝑟
𝑟
Model
• VGG or ResNet
• 各スケールでdisparity mapを生成する
• Batch Normalizationはとくに効果なし
Model (2)
Result
• KITTI, Cityspacesで実験
Result (2)
実装してみた
• Chainerで実装
• VGG版
• KITTIで学習
• 学習4日くらい
上:オリジナル(左)
中:disparity map
下:合成された右画像

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

[DL輪読会]A Higher-Dimensional Representation for Topologically Varying Neural R...
[DL輪読会]A Higher-Dimensional Representation for Topologically Varying Neural R...[DL輪読会]A Higher-Dimensional Representation for Topologically Varying Neural R...
[DL輪読会]A Higher-Dimensional Representation for Topologically Varying Neural R...
 
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
 
【メタサーベイ】Neural Fields
【メタサーベイ】Neural Fields【メタサーベイ】Neural Fields
【メタサーベイ】Neural Fields
 
SSII2020SS: 微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
SSII2020SS:  微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​SSII2020SS:  微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
SSII2020SS: 微分可能レンダリングの最新動向 〜「見比べる」ことによる3次元理解 〜​
 
【DL輪読会】DiffRF: Rendering-guided 3D Radiance Field Diffusion [N. Muller+ CVPR2...
【DL輪読会】DiffRF: Rendering-guided 3D Radiance Field Diffusion [N. Muller+ CVPR2...【DL輪読会】DiffRF: Rendering-guided 3D Radiance Field Diffusion [N. Muller+ CVPR2...
【DL輪読会】DiffRF: Rendering-guided 3D Radiance Field Diffusion [N. Muller+ CVPR2...
 
[DL輪読会]Deep High-Resolution Representation Learning for Human Pose Estimation
[DL輪読会]Deep High-Resolution Representation Learning for Human Pose Estimation[DL輪読会]Deep High-Resolution Representation Learning for Human Pose Estimation
[DL輪読会]Deep High-Resolution Representation Learning for Human Pose Estimation
 
[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
 
実装レベルで学ぶVQVAE
実装レベルで学ぶVQVAE実装レベルで学ぶVQVAE
実装レベルで学ぶVQVAE
 
Skip Connection まとめ(Neural Network)
Skip Connection まとめ(Neural Network)Skip Connection まとめ(Neural Network)
Skip Connection まとめ(Neural Network)
 
[DL輪読会]GLIDE: Guided Language to Image Diffusion for Generation and Editing
[DL輪読会]GLIDE: Guided Language to Image Diffusion  for Generation and Editing[DL輪読会]GLIDE: Guided Language to Image Diffusion  for Generation and Editing
[DL輪読会]GLIDE: Guided Language to Image Diffusion for Generation and Editing
 
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
 
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
 
Visual slam
Visual slamVisual slam
Visual slam
 
Cvpr 2021 manydepth
Cvpr 2021 manydepthCvpr 2021 manydepth
Cvpr 2021 manydepth
 
【論文読み会】BEiT_BERT Pre-Training of Image Transformers.pptx
【論文読み会】BEiT_BERT Pre-Training of Image Transformers.pptx【論文読み会】BEiT_BERT Pre-Training of Image Transformers.pptx
【論文読み会】BEiT_BERT Pre-Training of Image Transformers.pptx
 
Semantic segmentation
Semantic segmentationSemantic segmentation
Semantic segmentation
 
【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
 
[CVPR2020読み会@CV勉強会] 3D Packing for Self-Supervised Monocular Depth Estimation
[CVPR2020読み会@CV勉強会] 3D Packing for Self-Supervised Monocular Depth Estimation[CVPR2020読み会@CV勉強会] 3D Packing for Self-Supervised Monocular Depth Estimation
[CVPR2020読み会@CV勉強会] 3D Packing for Self-Supervised Monocular Depth Estimation
 
20160724_cv_sfm_revisited
20160724_cv_sfm_revisited20160724_cv_sfm_revisited
20160724_cv_sfm_revisited
 

Kürzlich hochgeladen

Kürzlich hochgeladen (7)

業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 

[論文解説]Unsupervised monocular depth estimation with Left-Right Consistency

  • 1. Unsupervised Monocular Depth Estimation with Left-Right Consistency arXivTimes勉強会 2017/08/09 山内隆太郎
  • 2. Motivation • CNNで単眼深度推定を行いたい • 教師データを集めるのが大変 • →ステレオ画像から単眼深度推定を学習させられないか?
  • 3. Idea • Depth mapを直接推定するのではなく、Disparity map(視差)を 推定する • Disparity map:左(右)画像のあるピクセルをどのくらい右(左) に動かせば右(左)画像の対応するピクセルに一致するか? • 平行な二台のカメラで撮られた画像において、カメラの近くに ある物体ほど左右で位置のずれが大きい(無限遠ではズレ0) • 実際の深度=Scale factor / Disparity
  • 5. Processing flow • 左画像から、左右のDisparity mapを生成する • オリジナル画像とDisparity mapをもとに、反対側 の画像を合成する • オリジナル画像と合成画像の差をlossとして学習
  • 6. How to make opposite Image. • 右(左)画像と左(右)dispマップから左(右)画像をつくりたい • この操作は微分可能でなくてはならない • →Bilinear Samplerを使う • Spatial Transformer Networks [https://arxiv.org/abs/1506.02025]参照
  • 7. Bilinear Sampler Right Image Left disp map Generated Left Image
  • 8. Bilinear Sampler (2) • 左画像のピクセルL[x, y]に対応するのはR[x+disp_L[x, y], y] • この座標は R[floor(x+disp_L[x, y]), y], R[ceil(x+disp_L[x, y]), y] の内分点 • したがって上の二点のピクセル値に内分比をかけて足し合わせ た点をL[x, y]の予測値とする 内分比は disp_L[x, y]-floor(disp_L[x, y]) : ceil(disp_L[x, y])- disp_L[x, y] →この操作は微分可能 • 問題点:隣接するピクセル間の値の差が大きいところばかり学 習する→ Disparity Smoothness Loss(後述)を導入
  • 9. Loss • Appearance Matching Loss 合成された画像とオリジナルの差 • Disparity Smoothness Loss 近い点は距離が近いという仮定 • Left-Right Disparity Consistency Loss 左右のDisparity mapはある程度似ているという仮定
  • 10. Appearance Matching Loss 𝐶 𝑎𝑝 𝑙 = 1 𝑁 𝑖,𝑗 𝛼 1 − 𝑆𝑆𝐼𝑀 𝐼𝑖𝑗 𝑙 , 𝐼𝑖𝑗 𝑙 2 + 1 − 𝛼 ‖𝐼𝑖𝑗 𝑙 − 𝐼𝑖𝑗 𝑙 ‖ • SSIMは画像の質を評価する関数 Image Quality Assessment: From Error Visibility to Structural Similarity [http://www.cns.nyu.edu/pub/lcv/wang03-preprint.pdf]参照 • 𝑆𝑆𝐼𝑀 𝑥, 𝑦 ≔ 2𝜇 𝑥 𝜇 𝑦+𝐶1 2𝜎 𝑥𝑦+𝐶2 (𝜇 𝑥 2+𝜇 𝑦 2+𝐶1)(𝜎 𝑥+𝜎 𝑦+𝐶2) μやσはk×kのカーネルごとに計算される
  • 11. Disparity Smoothness Loss 𝐶 𝑑𝑠 𝑙 = 1 𝑁 𝑖,𝑗 𝜕 𝑥 𝑑𝑖𝑗 𝑙 𝑒−‖𝜕 𝑥 𝐼𝑖𝑗 𝑙 ‖ + 𝜕 𝑦 𝑑𝑖𝑗 𝑙 𝑒−‖𝜕 𝑦 𝐼𝑖𝑗 𝑙 ‖ • あるピクセルに対応するdisparityが上下左右のピクセルの disparityとあまり離れないようにする • ピクセルの画素値の勾配で重み付け
  • 12. Left-Right Disparity Consistency Loss 𝐶𝑙𝑟 𝑙 = 1 𝑁 𝑖,𝑗 |𝑑𝑖𝑗 𝑙 − 𝑑𝑖𝑗+𝑑 𝑖𝑗 𝑙 𝑟 | • Bilinear Samplerによって左(右)disparity mapから右 (左)disparity mapを合成し、互いに一致するようにする
  • 13. Loss 𝐶𝑠 = 𝛼 𝑎𝑝 𝐶 𝑎𝑝 𝑙 + 𝐶 𝑎𝑝 𝑟 + 𝛼 𝑑𝑠 𝐶 𝑑𝑠 𝑙 + 𝐶 𝑑𝑠 𝑟 + 𝛼𝑙𝑟 𝐶𝑙𝑟 𝑙 + 𝐶𝑙𝑟 𝑟
  • 14. Model • VGG or ResNet • 各スケールでdisparity mapを生成する • Batch Normalizationはとくに効果なし
  • 18. 実装してみた • Chainerで実装 • VGG版 • KITTIで学習 • 学習4日くらい 上:オリジナル(左) 中:disparity map 下:合成された右画像