AdaBins: Depth Estimation Using Adaptive Bins
论文链接
作者:Shariq Farooq Bhat, Ibraheem Alhashim, Peter Wonka
一、摘要
We address the problem of estimating a high quality dense depth map from a single RGB input image. We start out with a baseline encoder-decoder convolutional neural network architecture and pose the question of how the global processing of information can help improve overall depth estimation. To this end, we propose a transformer-based architecture block that divides the depth range into bins whose center value is estimated adaptively per image. The final depth values are estimated as linear combinations of the bin centers. We call our new building block AdaBins. Our results show a decisive improvement over the state-of- the-art on several popular depth datasets across all metrics. We also validate the effectiveness of the proposed block with an ablation study and provide the code and corresponding pre-trained weights of the new state-of-the-art model.
二、介绍
- 动机:作者相信在高分辨率下进行全局处理的效果要好得多,认为先前工作的网络结构没有进行足够的全局分析(卷积层的一个缺点就是只有当空间分辨率很小时才能处理全局信息)
- 主要贡献:
- 设计了"AdaBins"后处理模块,对网络的输出进行全局分析,细化输出
- 本文可视为《Deep Ordinal Regression Network for Monocular Depth Estimation》的扩展:针对不同图像进行自适应深度区间划分并通过对每个深度区间的中心值进行线性组合来估计深度值避免了离散化造成的伪影现象

三、模型结构
- mViT模块:

估计深度区间需要同时使用全局与局部信息,于是作者提出使用全局注意力来进行估计。启发于Vision Transformer(ViT),作者使用一个更小版本的transformer称为mini-ViT。该模块首先接收来自解码器的输出- 通过一个核为的卷积,再将输出展平为,其中即为transformer输入序列的有效长度;在将序列输入transformer之前为它添加位置编码(随机初始化参数);之后在第一维输出上添加一个MLP层输出一个N维的区间长度向量,再将其标准化(添加一个偏置项以保证每个区间长度大于0)
- 解码层的输出表示高分辨率的局部像素级信息,将它通过一个卷积层后与transformer从第2维到第C+1维的输出向量进行矩阵乘法(相当于将输出视为一个的卷积核)得到区域注意力图
- 整体结构:

其中的编码器部分是预训练的”EfficientNet_B5“,解码器部分是标准的上采样(双线性插值);之后将输出送入"mViT"模块,该模块有两个输出:
- N维的区间长度向量:通过下式(Eq.2)计算深度区间中心向量
- 区域注意力图:通过一个卷积层将输出通道变为N维,最后经过Softmax得到每个像素对应于N个深度区间的概率
最后,通过将Softmax分数与深度区间中心进行线性组合得到最终的深度值(Eq.3):
四、损失函数
作者采用两种损失函数一起控制网络的学习:
- Pixel-wise depth loss:使用之前深度估计工作的损失函数(缩放版的尺度不变损失)
- Bin-center density loss: 使用3D重建网络的chamfer损失函数
前面部分表示中任意元素到的最小距离和,后面表示中任意元素到的最小距离和
最终的损失为:
五、实验
基准实验

消融实验
- 损失函数

- 区间划分策略与回归方法


- 区间划分个数

效果

可以看出估计出的深度效果不错但是室外数据集对于图像上面的部分估计出的深度效果不是很好
六、总结
本文作为《DORN》的扩展同样将深度估计视为分类任务,不过有关深度区间划分采用自适应的方法而非固定策略。还借鉴ViT的方法将transformer应用于视觉任务进行全局信息处理