[论文解读] CounTR: Transformer-based Generalised Visual Counting
CounTR 引入了一种基于 Transformer 的开放世界、从零-shot 到少-shot 的视觉计数架构,利用示例引导的注意力与自监督预训练,在 FSC-147 上达到最先进的结果。
In this paper, we consider the problem of generalised visual object counting, with the goal of developing a computational model for counting the number of objects from arbitrary semantic categories, using arbitrary number of "exemplars", i.e. zero-shot or few-shot counting. To this end, we make the following four contributions: (1) We introduce a novel transformer-based architecture for generalised visual object counting, termed as Counting Transformer (CounTR), which explicitly capture the similarity between image patches or with given "exemplars" with the attention mechanism;(2) We adopt a two-stage training regime, that first pre-trains the model with self-supervised learning, and followed by supervised fine-tuning;(3) We propose a simple, scalable pipeline for synthesizing training images with a large number of instances or that from different semantic categories, explicitly forcing the model to make use of the given "exemplars";(4) We conduct thorough ablation studies on the large-scale counting benchmark, e.g. FSC-147, and demonstrate state-of-the-art performance on both zero and few-shot settings.
研究动机与目标
- 促进支持任意语义类别和可变数量示例的开放世界视觉对象计数(从零-shot 到少-shot)
- 开发一个基于 Transformer 的 Counting TRansformer(CounTR),利用自注意力对图像区域与示例进行比较
- 提出两阶段训练方案:先进行基于 MAE 的自监督预训练,再进行监督微调以进行计数
- 引入可扩展的马赛克数据合成管线,以缓解长尾计数并改善示例条件
- 在 FSC-147 上展示零-shot 与少-shot 设置下的最先进性能
提出的方法
- 提出 CounTR:一种基于 Transformer 的架构,其中图像 ViT 编码器输出特征令牌,示例特征单独编码以用于在特征交互模块(FIM)中的跨注意力
- FIM 使用解码器风格的 Transformer 层,实现图像补丁与示例表示之间的跨注意力与自注意力,生成一个密度图
- 一个渐进式解码器将 FIM 的输出上采样为二维密度图;最终计数是该密度图的和
- 两阶段训练:首先对 ViT 编码器进行 MAE 的自监督预训练(图像重建),然后进行计数的监督微调
- 一个可扩展的马赛克数据生成管线(拼贴与混合),以创建具有大量实例和多样背景的图像,解决长尾分布问题
- 在推理阶段进行归一化与裁剪策略,以校准预测并处理极小对象或示例放置问题
实验结果
研究问题
- RQ1一个基于 Transformer 的模型能否在给定零或少量示例的情况下,将计数泛化到任意对象类别?
- RQ2自监督预训练是否会在零-shot 和少-shot 设置下提高计数性能?
- RQ3训练数据的合成马赛克是否能够缓解长尾分布并在高实例场景中提高计数?
- RQ4有哪些有效的推理时策略可以校准基于示例引导的密度输出?
主要发现
- CounTR 在 FSC-147 的零-shot 和少-shot 设置下达到最先进的 MAE/RMSE(例如:零-shot 验证集 MAE 18.07,RMSE 71.84;测试集 MAE 14.71,RMSE 106.87。)
- 自监督 MAE 预训练显著优于仅进行监督微调的性能
- 马赛克数据合成进一步提升了结果,尤其是在具有大量实例的图像上
- 推理阶段的归一化和裁剪进一步提升计数精度,特别是在少-shot 设置中
- CounTR 使用 3 个示例时保持鲁棒性,在 1、2、3 次示例之间差异很小
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。