作者:Lukas von Stumberg, Patrick Wenzel, Qadeer Khan, Daniel Cremers
机构: 慕尼黑工业大学, Artisense
链接: https://vision.in.tum.de/gn-net
本文将定位问题分解为两个步骤:
- 在构建好的地图中寻找与当前图像最接近的图像
- 追踪其相对位姿
本文解决的问题是第二个步骤,即relocalization tracking 问题。
作者提出了一个图像特征提取网络,该网络提取的特征图可以替代直接SLAM中的图像用于定位、回环检测等,相比直接使用图像,特征图的鲁棒性更强。
该网络需要有以下的特点:
- 对于同一场景中的不同时间季节拍摄的图像,提取的特征图是相似的。
- 对于不同场景拍摄的图像其提取的特征图是不同的。
- 对于初始的错误匹配位置,高斯牛顿算法可以朝着小范围内的正确匹配位置更新。
网络结构:
U-Net based,网络将(w,h,c)的输入图像 I I I映射为(w,h,d)的特征图 F F F。
损失函数:
L contrastive ( F a , F b , l ) = L pos ( F a , F b , l ) + L n e g ( F a , F b , l ) L p o s ( F a , F b , l ) = 1 N p o s ∑ N p o s D f e a t 2 L n e g ( F a , F b , l ) = 1 N n e g ∑ N n e g max ( 0 , M − D f e a t ) 2 其 中 D feat = ∥ F a l ( u a ) − F b l ( u b ) ∥ 2 \begin{aligned}\mathcal{L}_{\text {contrastive }}\left(\mathbf{F}_{a}, \mathbf{F}_{b}, l\right)=\mathcal{L}_{\text {pos }}\left(\mathbf{F}_{a}, \mathbf{F}_{b}, l\right)+\mathcal{L}_{\mathrm{neg}}\left(\mathbf{F}_{a}, \mathbf{F}_{b}, l\right)\end{aligned}\\\begin{aligned}\mathcal{L}_{\mathrm{pos}}\left(\mathbf{F}_{a}, \mathbf{F}_{b}, l\right)=& \frac{1}{N_{\mathrm{pos}}} \sum_{N_{\mathrm{pos}}} D_{\mathrm{feat}}^{2} \\\mathcal{L}_{\mathrm{neg}}\left(\mathbf{F}_{a}, \mathbf{F}_{b}, l\right)=& \frac{1}{N_{\mathrm{neg}}} \sum_{N_{\mathrm{neg}}} \max \left(0, M-D_{\mathrm{feat}}\right)^{2}\end{aligned}\\其中 \quad D_{\text {feat }}=\left\|\mathbf{F}_{a}^{l}\left(\mathbf{u}_{a}\right)-\mathbf{F}_{b}^{l}\left(\mathbf{u}_{b}\right)\right\|_{2} Lcontrastive (Fa,Fb,l)=Lpos (Fa,Fb,l)+Lneg(Fa,Fb,l)Lpos(Fa,Fb,l)=Lneg(Fa,Fb,l)=Npos1Npos∑Dfeat2Nneg1Nneg∑max(0,M−Dfeat)2其中Dfeat =∥∥Fal(ua)−Fbl(ub)∥∥2
最大化匹配点对之间的特征距离,最小化非匹配点对之间的特征距离。
高斯牛顿算法:
高斯牛顿损失函数:
E
(
x
)
=
−
log
f
X
(
x
)
=
1
2
(
x
−
μ
)
T
H
(
x
−
μ
)
+
log
(
2
π
)
−
1
2
log
(
∣
H
∣
)
\begin{array}{r}E(\mathbf{x})=-\log f_{X}(\mathbf{x})= \frac{1}{2}(\mathbf{x}-\boldsymbol{\mu})^{T} \mathbf{H}(\mathbf{x}-\boldsymbol{\mu})+\log (2 \pi)-\frac{1}{2} \log (|\mathbf{H}|)\end{array}
E(x)=−logfX(x)=21(x−μ)TH(x−μ)+log(2π)−21log(∣H∣)
算法步骤:
首先提取特征图F,然后计算每一个正确匹配对之间的损失并求和。
对每一个正确匹配对:
- 假设像素ua对应ub,则在ub附近随机选择一个起始位置xs
- 记xs像素对应的特征图 上的向量为fs
- 特征残差为r
- 计算雅各比矩阵J以及海森矩阵H(为保证可逆附加了一个小量),以及b
- 计算由xs迭代的下一个匹配位置u,理想情况下u的位置应当与ub重合
- 更新损失函数值
实验验证:
同一场景不同光照下,特征图相似度很高(使用PCA降维后的可视化结果)