一、基本信息
標題:Semi-Supervised Deep Learning for Monocular Depth Map Prediction
時間:2017
引用格式:Kuznietsov Y, Stuckler J, Leibe B. Semi-supervised deep learning for monocular depth map prediction[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 2017: 6647-6655.
二、研究背景
監督學習:需要大量標記數據,激光雷達RGBD等獲取的數據存在噪聲且稀疏,激光與照相機的投影中心不重合
無監督學習:對應沒有紋理的地方,預測不了
總結一下深度預測發展:
Saxena et al. 第一個基於監督學習方法,使用MRF,手動提取特徵
Eigen et al.使用CNN,由粗到細的多層網絡。筆記
Li et al.使用CNN結合CRFs超像素分割
Liu et al.端到端訓練一元勢和成對勢的CNN特徵,連續深度和高斯假設??
Laina et al.使用ResNet構建深度卷積,得到預測密度更大
此後,圖像的深度轉移的思想[或者將深度圖預測與語義分割相結合
Garg et al. FCN FlowNet 使用光測誤差。(利用一階泰勒近似將損失線性化,因此需要從粗到細的訓練??)
Xie et al. 視差方法,最小化像素級重建誤差。
Godard et al.也是視差方法,最小重建誤差,但是使用左右約束。筆記
三、創新點
本文提出使用監督和非監督結合的方法。一個訓練配對圖需要2張深度圖(LiDAR獲得),2張RGB圖。
令CNN預測的深度倒數ρ ( x ) \rho(\mathbf{x}) ρ ( x ) 和激光雷達得到的深度Z ( x ) Z(\mathbf{x}) Z ( x ) 對應關係:
ρ ( x ) − 1 = ! Z ( x ) \rho(\mathbf{x})^{-1} \stackrel{!}{=} Z(\mathbf{x}) ρ ( x ) − 1 = ! Z ( x )
圖像減去視差f b ρ ( x ) f b \rho(\mathbf{x}) f b ρ ( x ) :
ω ( x , ρ ( x ) ) : = x − f b ρ ( x ) \omega(\mathbf{x}, \rho(\mathbf{x})):=\mathbf{x}-f b \rho(\mathbf{x}) ω ( x , ρ ( x ) ) : = x − f b ρ ( x )
令左圖I 1 I_1 I 1 等於右圖I 2 I_2 I 2 -視差:
I 1 ( x ) = ! I 2 ( ω ( x , ρ ( x ) ) ) I_{1}(\mathbf{x}) \stackrel{!}{=} I_{2}(\omega(\mathbf{x}, \rho(\mathbf{x}))) I 1 ( x ) = ! I 2 ( ω ( x , ρ ( x ) ) )
結合左右圖像:
I left ( x ) = ! I right ( ω ( x , ρ ( x ) ) ) I right ( x ) = ! I left ( ω ( x , − ρ ( x ) ) ) \begin{array}{c}
I_{\text {left}}(\mathbf{x}) \stackrel{!}{=} I_{\text {right}}(\omega(\mathbf{x}, \rho(\mathbf{x}))) \\
I_{\text {right}}(\mathbf{x}) \stackrel{!}{=} I_{\text {left}}(\omega(\mathbf{x},-\rho(\mathbf{x})))
\end{array} I left ( x ) = ! I right ( ω ( x , ρ ( x ) ) ) I right ( x ) = ! I left ( ω ( x , − ρ ( x ) ) )
損失函數
Supervised loss.
L θ S = ∑ x ∈ Ω Z , l ∥ ρ l , θ ( x ) − 1 − Z l ( x ) ∥ δ + ∑ x ∈ Ω Z , r ∥ ρ r , θ ( x ) − 1 − Z r ( x ) ∥ δ \begin{aligned}
\mathcal{L}_{\boldsymbol{\theta}}^{S}=\sum_{\mathbf{x} \in \Omega_{Z, l}}\left\|\rho_{l, \boldsymbol{\theta}}(\mathbf{x})^{-1}-Z_{l}(\mathbf{x})\right\|_{\delta}
&+\sum_{\mathbf{x} \in \Omega_{Z, r}}\left\|\rho_{r, \boldsymbol{\theta}}(\mathbf{x})^{-1}-Z_{r}(\mathbf{x})\right\|_{\delta}
\end{aligned} L θ S = x ∈ Ω Z , l ∑ ∥ ∥ ρ l , θ ( x ) − 1 − Z l ( x ) ∥ ∥ δ + x ∈ Ω Z , r ∑ ∥ ∥ ρ r , θ ( x ) − 1 − Z r ( x ) ∥ ∥ δ
θ \theta θ 是CNN參數那麼預測的深度倒數:ρ r / l , θ \rho_{r/l, \theta} ρ r / l , θ ,∥ ⋅ ∥ δ \|\cdot\|_{\delta} ∥ ⋅ ∥ δ 是berHu範數,結合了L1和L2範數:
∥ d ∥ δ = { ∣ d ∣ , d ≤ δ d 2 + δ 2 2 δ , d > δ \|d\|_{\delta}=\left\{\begin{array}{l}|d|, d \leq \delta \\ \frac{d^{2}+\delta^{2}}{2 \delta}, d>\delta\end{array}\right. ∥ d ∥ δ = { ∣ d ∣ , d ≤ δ 2 δ d 2 + δ 2 , d > δ
δ = 0.2 max x ∈ Ω Z ( ∣ ρ ( x ) − 1 − Z ( x ) ∣ ) \delta=0.2 \max _{\mathbf{x} \in \Omega_{Z}}\left(\left|\rho(\mathbf{x})^{-1}-Z(\mathbf{x})\right|\right) δ = 0 . 2 x ∈ Ω Z max ( ∣ ∣ ρ ( x ) − 1 − Z ( x ) ∣ ∣ )
Unsupervised loss.
L θ U = ∑ x ∈ Ω U , l ∣ ( G σ ∗ I l ) ( x ) − ( G σ ∗ I r ) ( ω ( x , ρ l , θ ( x ) ) ) ∣ + ∑ x ∈ Ω U , r ∣ ( G σ ∗ I r ) ( x ) − ( G σ ∗ I l ) ( ω ( x , − ρ r , θ ( x ) ) ) ∣ \begin{array}{c}
\mathcal{L}_{\boldsymbol{\theta}}^{U}=\sum_{\mathbf{x} \in \Omega_{U, l}}\left|\left(\mathbf{G}_{\sigma} * I_{l}\right)(\mathbf{x})-\left(\mathbf{G}_{\sigma} * I_{r}\right)\left(\omega\left(\mathbf{x}, \rho_{l, \boldsymbol{\theta}}(\mathbf{x})\right)\right)\right| \\
+\sum_{\mathbf{x} \in \Omega_{U, r}}\left|\left(\mathbf{G}_{\sigma} * I_{r}\right)(\mathbf{x})-\left(\mathbf{G}_{\sigma} * I_{l}\right)\left(\omega\left(\mathbf{x},-\rho_{r, \boldsymbol{\theta}}(\mathbf{x})\right)\right)\right|
\end{array} L θ U = ∑ x ∈ Ω U , l ∣ ( G σ ∗ I l ) ( x ) − ( G σ ∗ I r ) ( ω ( x , ρ l , θ ( x ) ) ) ∣ + ∑ x ∈ Ω U , r ∣ ( G σ ∗ I r ) ( x ) − ( G σ ∗ I l ) ( ω ( x , − ρ r , θ ( x ) ) ) ∣
G σ \mathrm{G}_{\sigma} G σ 是高斯核,模糊是爲了去噪,使用σ = 1 p x \sigma=1 \mathrm{px} σ = 1 p x
Regularization loss.
L θ R = ∑ i ∈ { l , r } ∑ x ∈ Ω ∣ ϕ ( ∇ I i ( x ) ) ⊤ ∇ ρ i ( x ) ∣ L_{\boldsymbol{\theta}}^{R}=\sum_{i \in\{l, r\}} \sum_{\mathbf{x} \in \Omega}\left|\phi\left(\nabla I_{i}(\mathbf{x})\right)^{\top} \nabla \rho_{i}(\mathbf{x})\right| L θ R = i ∈ { l , r } ∑ x ∈ Ω ∑ ∣ ∣ ∣ ϕ ( ∇ I i ( x ) ) ⊤ ∇ ρ i ( x ) ∣ ∣ ∣
ϕ ( g ) = ( exp ( − η ∣ g x ∣ ) , exp ( − η ∣ g y ∣ ) ) ⊤ \phi(\mathbf{g})=\left(\exp \left(-\eta\left|g_{x}\right|\right), \exp \left(-\eta\left|g_{y}\right|\right)\right)^{\top} ϕ ( g ) = ( exp ( − η ∣ g x ∣ ) , exp ( − η ∣ g y ∣ ) ) ⊤
η = 1 255 \eta=\frac{1}{255} η = 2 5 5 1
防止預測梯度太大作用,個人理解:當預測梯度∇ ρ i ( x ) \nabla \rho_{i}(\mathbf{x}) ∇ ρ i ( x ) 很大時,而真實梯度很小,導致ϕ ( ∇ I i ( x ) ) ⊤ \phi\left(\nabla I_{i}(\mathbf{x})\right)^{\top} ϕ ( ∇ I i ( x ) ) ⊤ 很大,所以L θ R L_{\boldsymbol{\theta}}^{R} L θ R 就很大。保持梯度一致性的意思。。。
總損失
L θ ( I l , I r , Z l , Z r ) = λ t L θ S ( I l , I r , Z l , Z r ) + γ L θ U ( I l , I r ) + L θ R ( I l , I r ) \begin{array}{l}
\mathcal{L}_{\boldsymbol{\theta}}\left(I_{l}, I_{r}, Z_{l}, Z_{r}\right)=
\quad \lambda_{t} \mathcal{L}_{\boldsymbol{\theta}}^{S}\left(I_{l}, I_{r}, Z_{l}, Z_{r}\right)+\gamma \mathcal{L}_{\boldsymbol{\theta}}^{U}\left(I_{l}, I_{r}\right)+\mathcal{L}_{\boldsymbol{\theta}}^{R}\left(I_{l}, I_{r}\right)
\end{array} L θ ( I l , I r , Z l , Z r ) = λ t L θ S ( I l , I r , Z l , Z r ) + γ L θ U ( I l , I r ) + L θ R ( I l , I r )
λ t \lambda_{t} λ t 和γ \gamma γ 是權衡參數
網絡結構
用的殘差網絡Flownet
2種殘差塊:
上投影殘差塊:
具體網絡結構:
四、實驗結果
9就是系列2 左右約束方法,然後看到本文方法可以結合真實深度預測得到比較精準結果,同時對於真實深度沒有掃描的地方,通過CNN進行學習。
五、結論與思考
作者結論
總結
本文在有深度標籤數據下是個結合CNN的方法,但是大多數情況是沒有深度。要是以後有深度相機集成到手機上,這個方法不失爲增強方法。
思考
參考