arXiv:2510.14260cs.CV2025-10

提出新型注意力机制,让立体匹配更准更快,支持实时边缘设备运行。

MatchAttention: Embedding Explicit Matching Constraints into Attention for Efficient Stereo Matching

  • 用可学习的相对位置约束注意力采样,兼顾长程匹配与线性复杂度。
  • 在Middlebury、KITTI等数据集上达到顶尖精度,边缘设备推理仅需9.3毫秒。
  • 适合追求高精度或实时推理的立体匹配应用场景。

标准注意力机制不适用于立体匹配:全局注意力复杂度平方增长且无显式匹配约束,局部注意力虽高效却丢失长程对应关系。本文提出MatchAttention,通过将查询与匹配键之间的相对位置作为可学习的注意力采样组件,显式嵌入匹配约束。以该可学习相对位置为中心,采用小范围连续采样窗口,既保证匹配约束又实现严格线性复杂度下的长程对应。可微分的连续注意力采样(CAS)操作支持亚像素精度,级联的MatchAttention块通过残差连接迭代优化相对位置。构建了两种变体:MatchAttentionXL注重精度,MatchAttentionRT面向实时边缘推理。前者在Middlebury V3上达领先精度,在KITTI 2012/2015和ETH3D上取得最优结果;后者在RTX 4060 Ti上仅需9.3毫秒,在Jetson Orin NX 16 GB上为79.1毫秒,1024×512分辨率下首次实现零样本泛化下的实时边缘推理。代码已开源。

原文摘要 · Abstract (English)

Standard attention mechanisms are not well suited to stereo matching. Global attention scales quadratically and provides no explicit matching constraint, while local attention is efficient but loses long-range correspondences. We propose MatchAttention, an attention mechanism that embeds an explicit matching constraint into attention by treating the relative position between a query and its matched key as a learnable component of attention sampling. Centering a small contiguous sampling window on this learnable relative position enforces the matching constraint and supports long-range correspondence at strictly linear attention complexity. A differentiable contiguous attention sampling (CAS) operator enables sub-pixel accuracy, and cascaded MatchAttention blocks iteratively refine the relative positions through residual connections. We instantiate MatchAttention as a hierarchical coarse-to-fine stereo network with two variants. MatchAttentionXL targets accuracy and MatchAttentionRT targets real-time edge inference. MatchAttentionXL achieves state-of-the-art accuracy on Middlebury V3 and top results across KITTI 2012/2015 and ETH3D. MatchAttentionRT runs at 9.3 ms on RTX 4060 Ti and 79.1 ms on Jetson Orin NX 16 GB at 1024 x 512, making it the first stereo model to deliver real-time edge inference without sacrificing zero-shot generalization. The code is available at https://github.com/TingmanYan/MatchAttention.

立体匹配注意力机制边缘推理实时系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。