CounTR: Transformer-based Generalised Visual Counting
About
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.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Object Counting | FSC-147 (test) | MAE11.95 | 297 | |
| Object Counting | FSC-147 (val) | MAE13.13 | 211 | |
| Car Object Counting | CARPK (test) | MAE5.75 | 116 | |
| Object Counting | FSC-147 1.0 (test) | MAE11.95 | 50 | |
| Object Counting | FSC-147 1.0 (val) | MAE13.13 | 50 | |
| Counting | CARPK | MAE5.75 | 41 | |
| Object Counting | FSCD-LVIS (test) | MAE34.76 | 21 | |
| Few-shot Object Counting | FSC147 1.0 (val) | MAE13.13 | 19 | |
| Few-shot Object Counting | FSC147 1.0 (test) | MAE11.95 | 19 | |
| Object Counting | COCO (test) | RMSE31.11 | 16 |