CounTR: Transformer-based Generalised Visual Counting

Chang Liu, Yujie Zhong, Andrew Zisserman, Weidi Xie
8/29/2022
cs.CV
transformer-attention

Official code: Verg-Avesta/CounTR (127 stars, Python, MIT, last commit 2024-07-11).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

Verg-Avesta/CounTROfficial100%
MIT

CounTR: Transformer-based Generalised Visual Counting

12712Python, ShellApr 26, 20222 years agoMIT
generalised-visual-countingvision-transformer

Similar Papers

Cite this paper

@article{liu2022countr,
  title  = {CounTR: Transformer-based Generalised Visual Counting},
  author = {Chang Liu and Yujie Zhong and Andrew Zisserman and Weidi Xie},
  year   = {2022},
  eprint = {2208.13721},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2208.13721}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.13721.svg)](https://codeofpaper.com/paper/2208.13721)

Discussion