[论文解读] Attention Attention Everywhere: Monocular Depth Prediction with Skip Attention
本文提出 PixelFormer,一种新颖的单目深度估计框架,将深度预测建模为像素查询优化问题,通过跳跃注意力模块(SAM)融合长程解码器特征与高分辨率编码器特征。通过从最粗粒度特征初始化查询,并利用基于窗口的交叉注意力逐步优化,模型提升了深度边界精度与泛化能力,在 NYUv2 和 KITTI 数据集上分别实现 5.3% 和 3.9% 的相对误差改进,达到当前最先进性能。
Monocular Depth Estimation (MDE) aims to predict pixel-wise depth given a single RGB image. For both, the convolutional as well as the recent attention-based models, encoder-decoder-based architectures have been found to be useful due to the simultaneous requirement of global context and pixel-level resolution. Typically, a skip connection module is used to fuse the encoder and decoder features, which comprises of feature map concatenation followed by a convolution operation. Inspired by the demonstrated benefits of attention in a multitude of computer vision problems, we propose an attention-based fusion of encoder and decoder features. We pose MDE as a pixel query refinement problem, where coarsest-level encoder features are used to initialize pixel-level queries, which are then refined to higher resolutions by the proposed Skip Attention Module (SAM). We formulate the prediction problem as ordinal regression over the bin centers that discretize the continuous depth range and introduce a Bin Center Predictor (BCP) module that predicts bins at the coarsest level using pixel queries. Apart from the benefit of image adaptive depth binning, the proposed design helps learn improved depth embedding in initial pixel queries via direct supervision from the ground truth. Extensive experiments on the two canonical datasets, NYUV2 and KITTI, show that our architecture outperforms the state-of-the-art by 5.3% and 3.9%, respectively, along with an improved generalization performance by 9.4% on the SUNRGBD dataset. Code is available at https://github.com/ashutosh1807/PixelFormer.git.
研究动机与目标
- 解决当前 SOTA 模型在物体边界处深度标注不准确的问题,尽管边缘对齐已较准确。
- 改进编码器-解码器架构中高分辨率局部特征与全局上下文特征的融合。
- 通过深度分 bin 预测实现对初始像素查询的直接监督,以更好嵌入深度信息。
- 通过自适应、图像特定的深度分 bin 方法,提升模型在分布外数据集(如 SUNRGBD)上的泛化能力。
- 用注意力机制模块替代传统的基于卷积的跳跃连接,以捕捉长程依赖关系。
提出的方法
- 模型使用视觉变换器主干网络提取分层特征,其中最粗粒度的特征图通过像素查询初始化模块用于初始化像素查询。
- 跳跃注意力模块(SAM)通过在解码器特征与邻近编码器特征之间计算基于窗口的交叉注意力,提升高分辨率下的查询优化。
- SAM 通过关注局部窗口内的相关编码器特征,实现长程特征聚合,从而在上下文整合方面超越局部卷积操作。
- 分 bin 中心预测模块(BCP)直接从初始像素查询估计图像自适应的深度分 bin,为模型提供来自真实深度标签的直接监督。
- 网络通过在离散化深度分 bin 上进行序数回归进行训练,BCP 模块使得深度监督更早且更有效地实现。
- 整体架构结合编码器-解码器结构与迭代查询优化,用注意力机制融合替代标准跳跃连接。

实验结果
研究问题
- RQ1与标准卷积跳跃连接相比,基于注意力的编码器与解码器特征融合是否能提升深度预测精度?
- RQ2从粗粒度特征初始化像素查询,并通过交叉注意力逐步优化,是否能带来更优的深度嵌入与泛化能力?
- RQ3通过分 bin 中心预测对初始像素查询进行直接监督,是否能提升模型性能与收敛速度?
- RQ4与 SOTA 模型相比,该方法在分布外数据集(如 SUNRGBD)上的泛化能力如何?
- RQ5基于窗口的交叉注意力是否能在不带来过高计算成本的前提下,有效捕捉高分辨率特征中的长程依赖?
主要发现
- 在 NYUv2 数据集上,PixelFormer 相较于前代 SOTA 模型,绝对相对误差(Abs Rel)降低了 5.3%。
- 在 KITTI 数据集上,模型在绝对相对误差上提升 3.9%,在平方相对误差(Sq Rel)上也提升 3.9%。
- 在 SUNRGBD 数据集上,模型在绝对相对误差指标上实现了 9.4% 的泛化性能提升。
- 消融实验表明,跳跃注意力模块(SAM)在 KITTI 数据集上分别比加法融合与拼接融合方法在 Abs Rel 上提升 4.0%,在 Sq Rel 上提升 4.2%。
- 分 bin 中心预测模块(BCP)通过利用初始像素查询预测深度分 bin,相比使用独立 ViT 进行分 bin 预测,性能在 Abs Rel 上提升 3.0%。
- 定性结果表明,与 NeWCRFs 相比,PixelFormer 在枕头、床等物体边界处显著减少了深度标签混淆。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。