0
点赞
收藏
分享

微信扫一扫

论文阅读《SuperPoint: Self-Supervised Interest Point Detection and Description》

niboac 2022-03-17 阅读 41

论文地址: SuperPoint: Self-Supervised Interest Point Detection and Description
代码地址:https://github.com/magicleap/SuperPointPretrainedNetwork


背景与意义

  人工标记特征点需要大量的工作量,且在特征点的语义信息不明确时难以标记;为此提出一种基于数据驱动策略获取图像中的特征点与描述符的方法;

  1. 在合成数据集上进行有监督训练得到初始特征点检测器MagicPoint;
  2. 使用Homographic Adaptation对真实场景warp得到多个变换后的视图,使用MagicPoint来得到多个视图的特征点,再将特征点反warp回原视图作为伪标签;
  3. 使用伪标签对SuperPoint结构进行训练;

网络结构

在这里插入图片描述SuperPoint Architecture结构主要包含三个部分:权值共享特征提取、兴趣点检测、描述符生成;
在这里插入图片描述
  其中权值共享特征提取使用VGG网络来得到特征图;
  兴趣点检测模块先使用CNN将特征图维度变换为 H 8 × W 8 × 65 \frac{H}{8}\times\frac{W}{8}\times65 8H×8W×65的维度,其中每个点代表原图中每个不重叠的8*8邻域块中哪个点为特征点,以及第65维代表该邻域块中没有特征点,在channel维度做softmax,最后将其reshape为原图大小;
  描述子生成模块:首先使用UCN的方法得到一个原图 1 8 \frac{1}{8} 81 大小的稀疏描述子,提高计算效率。再通过多次的双线性插值得到原图大小的描述符,然后通过 L 2 L_{2} L2得到正则化后描述符;


损失函数

  损失函数包含两个部分:特征点检测损失 L p \mathcal{L}_{p} Lp 与描述子损失 L d \mathcal{L}_{d} Ld
L ( X , X ′ , D , D ′ ; Y , Y ′ , S ) = L p ( X , Y ) + L p ( X ′ , Y ′ ) + λ L d ( D , D ′ , S ) (1) \begin{aligned} \mathcal{L}\left(\mathcal{X}, \mathcal{X}^{\prime}, \mathcal{D}, \mathcal{D}^{\prime} ; Y, Y^{\prime}, S\right)= \mathcal{L}_{p}(\mathcal{X}, Y)+\mathcal{L}_{p}\left(\mathcal{X}^{\prime}, Y^{\prime}\right)+\lambda \mathcal{L}_{d}\left(\mathcal{D}, \mathcal{D}^{\prime}, S\right) \end{aligned}\tag{1} L(X,X,D,D;Y,Y,S)=Lp(X,Y)+Lp(X,Y)+λLd(D,D,S)(1)
其中 X \mathcal{X} X 代表输入图像中得到的特征点检测的结果, Y Y Y 代表伪标签; X ′ \mathcal{X}^{\prime} X Y ′ Y^{\prime} Y 表示经过单应性变换warp后图像的特征点检测结果与其对应的伪标签;
特征点损失:
L p ( X , Y ) = 1 H c W c ∑ h = 1 ; w = 1 H c , W c l p ( x h w ; y h w ) ] (2) \mathcal{L}_{p}(\mathcal{X}, Y)=\frac{1}{H_{c} W_{c}} \sum_{h=1; w=1}^{H_{c}, W_{c}} l_{p}\left(\mathrm{x}_{h w} ; y_{h w}\right)]\tag{2} Lp(X,Y)=HcWc1h=1;w=1Hc,Wclp(xhw;yhw)](2)
其中:
l p ( x h w ; y ) = − log ⁡ ( exp ⁡ ( x h w y ) ∑ k = 1 65 exp ⁡ ( x h w k ) ) (3) l_{p}\left(\mathrm{x}_{h w} ; y\right)=-\log \left(\frac{\exp \left(\mathrm{x}_{h w y}\right)}{\sum_{k=1}^{65} \exp \left(\mathrm{x}_{h w k}\right)}\right)\tag{3} lp(xhw;y)=log(k=165exp(xhwk)exp(xhwy))(3)
描述子损失:
L d ( D , D ′ , S ) = 1 ( H c W c ) 2 ∑ h = 1 ; w = 1 H c , W c ∑ h ′ = 1 ; w ′ = 1 H c , W c l d ( d h w , d h ′ w ′ ′ ; s h w h ′ w ′ ) (4) \begin{array}{l} \mathcal{L}_{d}\left(\mathcal{D}, \mathcal{D}^{\prime}, S\right)= \frac{1}{\left(H_{c} W_{c}\right)^{2}} \sum_{h=1; w=1}^{H_{c}, W_{c}} \sum_{h^{\prime}=1; w^{\prime}=1}^{H_{c}, W_{c}} l_{d}\left(\mathbf{d}_{h w}, \mathbf{d}_{h^{\prime} w^{\prime}}^{\prime} ; s_{h w h^{\prime} w^{\prime}}\right) \end{array}\tag{4} Ld(D,D,S)=(HcWc)21h=1;w=1Hc,Wch=1;w=1Hc,Wcld(dhw,dhw;shwhw)(4)
其中 l d l_{d} ld 为Hinge-loss,如果 s = 1 s=1 s=1 时,说明两点是匹配点,则只考虑第一项,此时两点的描述符 d T d^{T} dT d ′ d^{\prime} d 两者越接近,惩罚越小,若 s = 0 s=0 s=0 时, 说明两点是非匹配点,则 两点的描述符 d T d^{T} dT d ′ d^{\prime} d 差异越大,惩罚越小;
l d ( d , d ′ ; s ) = λ d ∗ s ∗ max ⁡ ( 0 , m p − d T d ′ ) + ( 1 − s ) ∗ max ⁡ ( 0 , d T d ′ − m n ) (5) \begin{aligned} l_{d}\left(\mathbf{d}, \mathbf{d}^{\prime} ; s\right) &=\lambda_{d} * s * \max \left(0, m_{p}-\mathbf{d}^{T} \mathbf{d}^{\prime}\right) +&(1-s) * \max \left(0, \mathbf{d}^{T} \mathbf{d}^{\prime}-m_{n}\right) \end{aligned}\tag{5} ld(d,d;s)=λdsmax(0,mpdTd)+(1s)max(0,dTdmn)(5)
其中 s h w h ′ w ′ s_{h w h^{\prime} w^{\prime}} shwhw 为指示矩阵, s s s 为所有的正确匹配对集合;
s h w h ′ w ′ = { 1 ,  if  ∥ H p h w ^ − p h ′ w ′ ∥ ≤ 8 0 ,  otherwise  (6) s_{h w h^{\prime} w^{\prime}}=\left\{\begin{array}{ll} 1, & \text { if }\left\|\widehat{\mathcal{H} \mathbf{p}_{h w}}-\mathbf{p}_{h^{\prime} w^{\prime}}\right\| \leq 8 \\ 0, & \text { otherwise } \end{array}\right.\tag{6} shwhw={1,0, if Hphw phw8 otherwise (6)
其中 P h w P_{hw} Phw 为单元格 ( h , w ) (h, w) (h,w) 中心像素的位置,式6的含义为,原图的特征点以单应性矩阵H做单应性变换后的位置与原图以H做单应性变换后检测的特征点的的距离不超过8(在邻域内),说明是匹配上的;


实验结果

在这里插入图片描述

举报

相关推荐

0 条评论