Skip to main content
QUICK REVIEW

[论文解读] Real-time Semantic Segmentation with Fast Attention

Ping Hu, Federico Perazzi|arXiv (Cornell University)|Jul 7, 2020
Advanced Neural Network Applications参考文献 58被引用 6
一句话总结

本文提出快速注意力网络(FANet),一种实时语义分割模型,通过新颖的快速空间注意力机制,在线性计算成本下高效捕捉长距离上下文依赖,实现在高分辨率图像和视频上的高精度。FANet 在 Cityscapes 上以 72 FPS 的速度实现 75.5% 的 mIoU,相比之前方法提速约 50%,同时保持了最先进精度。

ABSTRACT

In deep CNN based models for semantic segmentation, high accuracy relies on rich spatial context (large receptive fields) and fine spatial details (high resolution), both of which incur high computational costs. In this paper, we propose a novel architecture that addresses both challenges and achieves state-of-the-art performance for semantic segmentation of high-resolution images and videos in real-time. The proposed architecture relies on our fast spatial attention, which is a simple yet efficient modification of the popular self-attention mechanism and captures the same rich spatial context at a small fraction of the computational cost, by changing the order of operations. Moreover, to efficiently process high-resolution input, we apply an additional spatial reduction to intermediate feature stages of the network with minimal loss in accuracy thanks to the use of the fast attention module to fuse features. We validate our method with a series of experiments, and show that results on multiple datasets demonstrate superior performance with better accuracy and speed compared to existing approaches for real-time semantic segmentation. On Cityscapes, our network achieves 74.4$\%$ mIoU at 72 FPS and 75.5$\%$ mIoU at 58 FPS on a single Titan X GPU, which is~$\sim$50$\%$ faster than the state-of-the-art while retaining the same accuracy.

研究动机与目标

  • 为解决语义分割中高精度与实时推理之间的权衡,通过高效捕捉丰富的空间上下文和细粒度细节。
  • 在不损失空间或上下文信息的前提下,降低深度网络中自注意力机制的计算成本。
  • 通过在中间特征阶段应用空间下采样而非下采样输入图像,实现高分辨率输入的实时处理。
  • 将快速注意力机制扩展至视频语义分割,实现计算成本恒定的空间-时间上下文建模。

提出的方法

  • 引入一种快速空间注意力模块,将自注意力中的 softmax 归一化替换为余弦相似度,将复杂度从 O(n²c) 降低至 O(nc²)。
  • 利用矩阵乘法的结合律高效计算注意力图,在 n ≫ c 时相比标准自注意力实现 ∼n/c 的加速。
  • 在中间特征图上应用空间下采样,而非对输入图像进行下采样,从而在减少 FLOPs 的同时保留高分辨率空间细节。
  • 采用从深层到浅层阶段的级联特征融合策略,结合上下文与细节特征以生成最终预测。
  • 通过将快速注意力机制推广至时空上下文,实现对视频输入的扩展,计算成本恒定,与时间窗口大小无关。
  • 采用轻量级编码器-解码器架构,设计了 FANet-18 和 FANet-34 两种变体,以优化速度与精度的权衡。

实验结果

研究问题

  • RQ1能否设计一种改进的注意力机制,在显著降低计算成本的同时保持丰富的空间上下文,以实现实时语义分割?
  • RQ2如何在不增加 FLOPs 的前提下,保留实时模型中的高分辨率空间细节?
  • RQ3中间特征图的空间下采样是否能在精度和效率上优于输入图像的下采样?
  • RQ4能否将快速注意力机制扩展至视频分割,实现极低的计算开销?
  • RQ5将快速注意力与空间下采样结合,是否能在实时语义分割中同时实现最先进速度与精度?

主要发现

  • FANet 在单张 Titan X GPU 上以 72 FPS 实现 74.4% mIoU,以 58 FPS 实现 75.5% mIoU,优于之前最先进方法约 50% 的推理速度。
  • 在 CamVid 上,FANet-18 以 142 FPS 实现 29.5% mIoU,精度与速度均优于 BiseNet 和 ICNet。
  • 在 COCO-Stuff 上,FANet-34 以 142 FPS 实现 29.5% mIoU,精度与速度均超过 ICNet(640×640 分辨率)。
  • 快速注意力的时空扩展(FANet+Temp)在 Cityscapes 视频上以 58 FPS 实现 76.7% mIoU,推理速度比 PEARL 快 40 倍,效率比 Netwarp 高 200 倍。
  • FANet-18+Temp 以 72 FPS 实现 75.5% mIoU,平均推理时间仅 14ms,展现出低延迟与高吞吐量。
  • 消融实验表明,结合快速注意力与中间特征图下采样可在降低 FLOPs 的同时保持精度,证明其在高分辨率输入处理中的有效性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。