CountFormer: A Transformer Framework for Learning Visual Repetition and Structure in Class-Agnostic Object Counting
Not on the map. Why?
Abstract (arXiv)
Humans can often count unfamiliar objects by observing visual repetition and composition, rather than relying only on object categories. However, many exemplar-free counting models struggle in such situations and may overcount when objects contain symmetric components, repeated substructures, or partial occlusion. We introduce CountFormer, a controlled adaptation of a density-regression framework inspired by CounTR, where the image encoder is replaced with the self-supervised vision foundation model DINOv2. The resulting transformer features are combined with explicit two-dimensional positional embeddings and decoded by a lightweight convolutional network to produce a density map whose integral gives the final count. Our goal is not to propose a new counting architecture, but to study whether foundation-based representations improve structural consistency under a strictly exemplar-free setting. On FSC-147, CountFormer achieves competitive performance under the official benchmark (MAE 19.06, RMSE 118.45). Qualitative analysis suggests fewer part-level overcounting errors for some structurally complex objects, while overall error remains broadly consistent with prior approaches. Sensitivity analysis shows that evaluation metrics are strongly affected by a small number of extreme high-density scenes. Overall, the results highlight the role of representation quality in exemplar-free object counting.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 15 of its 19 references that are in the map. First posted on arXiv 27 Oct 2025.
Builds on
15 of 19 references.
References · 15
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2023DINOv2: Learning Robust Visual Features without Supervisioncited by 7,974
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,968
- 2023Teaching CLIP to Count to Tencited by 198
- 2021Learning To Count Everythingcited by 150
- 2016A Large Contextual Dataset for Classification, Detection and Counting of Cars with Deep Learningcited by 86
- 2018Class-Agnostic Countingcited by 85
- 2023CLIP-Count: Towards Text-Guided Zero-Shot Object Countingcited by 83
- 2022CounTR: Transformer-based Generalised Visual Countingcited by 79
- 2023Zero-shot Object Countingcited by 57
- 2022Learning to Count Anything: Reference-less Class-agnostic Counting with Weak Supervisioncited by 41
3 more
- 2023Open-world Text-specified Object Countingcited by 41
- 2022Exemplar Free Class Agnostic Countingcited by 32
- 2022No Token Left Behind: Explainability-Aided Image Classification and Generationcited by 25
Built on by
Not cited yet.