[论文解读] Multi-class Token Transformer for Weakly Supervised Semantic Segmentation
本文提出 MCTformer,一种多类别标记的视觉Transformer模型,通过使用多个类别特定的标记来学习类别判别性注意力图,实现弱监督语义分割。通过利用类-图块注意力和自注意力生成的图块级成对亲和力,该方法生成了高质量的伪分割标签,性能优于现有方法,在 PASCAL VOC 上达到 58.2% 的 mIoU,经优化后进一步提升至 61.7%,并能与 CAM 方法互补,实现更优性能。
This paper proposes a new transformer-based framework to learn class-specific object localization maps as pseudo labels for weakly supervised semantic segmentation (WSSS). Inspired by the fact that the attended regions of the one-class token in the standard vision transformer can be leveraged to form a class-agnostic localization map, we investigate if the transformer model can also effectively capture class-specific attention for more discriminative object localization by learning multiple class tokens within the transformer. To this end, we propose a Multi-class Token Transformer, termed as MCTformer, which uses multiple class tokens to learn interactions between the class tokens and the patch tokens. The proposed MCTformer can successfully produce class-discriminative object localization maps from class-to-patch attentions corresponding to different class tokens. We also propose to use a patch-level pairwise affinity, which is extracted from the patch-to-patch transformer attention, to further refine the localization maps. Moreover, the proposed framework is shown to fully complement the Class Activation Mapping (CAM) method, leading to remarkably superior WSSS results on the PASCAL VOC and MS COCO datasets. These results underline the importance of the class token for WSSS.
研究动机与目标
- 为解决单类别标记 ViT 在弱监督语义分割中的局限性,其生成的定位图缺乏类别判别性,导致判别能力低。
- 通过引入一种类别感知的训练策略,使 Transformer 模型能够通过多个类别标记学习类别特定的注意力机制。
- 通过利用图块-图块注意力作为成对亲和力,提升类别特定注意力图的定位质量。
- 证明所提方法可与传统基于 CAM 的方法互补,生成更准确的伪真实标签。
- 确立类别标记在弱监督学习中的关键作用,与近期去除类别标记的趋势相反。
提出的方法
- 在视觉 Transformer 中引入多个类别标记,每个标记负责学习特定类别对象的表征。
- 对类别标记嵌入进行平均池化,生成类别得分,并通过真实标签监督,以强化类别特定学习。
- 利用每个类别标记的类-图块注意力图作为类别特定的对象定位图。
- 提取图块-图块注意力作为图块级成对亲和力,以无额外计算成本的方式优化定位图。
- 将类别特定注意力图与 CAM 特征融合,生成更一致且准确的伪分割标签。
- 采用多阶段训练策略,结合分类与定位监督,通过融合最后三层 Transformer 的特征以实现最佳性能。
实验结果
研究问题
- RQ1在视觉 Transformer 中使用多个类别标记,能否学习到类别特定的注意力图,从而提升弱监督语义分割中的目标定位性能?
- RQ2Transformer 中的图块-图块注意力在弱监督设置下,如何有助于优化定位图?
- RQ3所提出的基于 Transformer 的定位图能否有效与类别激活映射(CAM)方法互补,从而提升分割性能?
- RQ4在多个 Transformer 层中,最优的类别标记表征融合策略是什么,以在定位完整性和准确性之间取得平衡?
- RQ5在生成判别性定位图时,对类别标记嵌入进行平均池化是否优于其他聚合方法(如最大池化或全连接层)?
主要发现
- 所提出的 MCTformer-V1 仅使用类别特定注意力图,在 PASCAL VOC 上实现了 47.2% 的 mIoU,较 TS-CAM* 提升 5.9%。
- 当与 CAM 融合并利用图块级成对亲和力进行优化后,MCTformer-V2 在 PASCAL VOC 上达到 61.7% 的 mIoU,显著优于基线模型。
- 源自图块-图块注意力的图块级成对亲和力,使伪标签质量提升 8%,分割性能提升 3.2%。
- 对类别标记嵌入进行平均池化表现最佳(mIoU 为 47.2%),优于最大池化(26.8%)和全连接层(41.5%),因其能更好地建模空间上下文。
- 融合最后三层 Transformer 的注意力图在覆盖度与判别性之间达到最佳平衡,高层融合导致过度激活,低层融合则导致激活不足。
- 可视化结果表明,MCTformer 生成的物体轮廓更完整、更平滑,且背景噪声更少,而 TS-CAM 则存在稀疏且响应低的问题。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。