AFreeCA: Annotation-Free Counting for All

Adrian d'Alessandro, Ali Mahdavi-Amiri, Ghassan Hamarneh
2/14/2026

No official code found. Best implementation: adrian-dalessandro/AFreeCA (4 stars, last commit 2024-07-05). 1 more below.

Abstract

Object counting methods typically rely on manually annotated datasets. The cost of creating such datasets has restricted the versatility of these networks to count objects from specific classes (such as humans or penguins), and counting objects from diverse categories remains a challenge. The availability of robust text-to-image latent diffusion models (LDMs) raises the question of whether these models can be utilized to generate counting datasets. However, LDMs struggle to create images with an exact number of objects based solely on text prompts but they can be used to offer a dependable \textit{sorting} signal by adding and removing objects within an image. Leveraging this data, we initially introduce an unsupervised sorting methodology to learn object-related features that are subsequently refined and anchored for counting purposes using counting data generated by LDMs. Further, we present a density classifier-guided method for dividing an image into patches containing objects that can be reliably counted. Consequently, we can generate counting data for any type of object and count them in an unsupervised manner. Our approach outperforms other unsupervised and few-shot alternatives and is not restricted to specific object classes for which counting data is available. Code to be released upon acceptance.

View on arXivView PDF

Code Implementations(2)

Code repository for "AFreeCA: Annotation-Free Counting for All", which has been accepted to ECCV 2024

40PythonJul 3, 20242 years agoNOASSERTION

Project page for "AFreeCA: Annotation-Free Counting for All", which has been accepted to ECCV 2024

00CSS, HTMLJul 3, 20241 years ago

Similar Papers

Cite this paper

@article{dalessandro2026afreeca,
  title  = {AFreeCA: Annotation-Free Counting for All},
  author = {Adrian d'Alessandro and Ali Mahdavi-Amiri and Ghassan Hamarneh},
  year   = {2026},
  eprint = {2403.04943},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2403.04943},
  journal = {ECCV 2024 2024}
}

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/2403.04943.svg)](https://codeofpaper.com/paper/2403.04943)

Discussion