RECOUNT: Reference-guided Counting with Synthetic Visual Exemplars

Adriano D'Alessandro, Ali Mahdavi-Amiri, Ghassan Hamarneh
8/20/2026
cs.CV

No confident code implementation found for this paper.

Abstract

Text-guided zero-shot object counters excel at spatial localization but categorize poorly on novel or fine-grained classes: natural language is too coarse to fully specify visual identity, so they fail to separate visually similar distractors. Few-shot counters sidestep this with visual exemplars, but require manual annotations on every image.

Show full abstract

To resolve this dilemma, we introduce RECOUNT, a plug-and-play framework for image-guided zero-shot counting. Rather than specify a category with a text prompt, our key insight is to specify it visually, from a single off-scene reference image. However, we find that a lone reference image provides narrow coverage of a category's appearance and is unreliable across diverse scenes. We therefore repurpose a diffusion model as an automated contrastive data engine that expands the reference into a diverse exemplar gallery, supplying the discriminative detail that text cannot. RECOUNT preserves the class-agnostic proposals of any frozen counter and offloads categorization to a separate visual module (a frozen backbone with a lightweight head trained on this synthetic data) that matches each proposal against the target and distractor galleries. Applied to a frozen counter, RECOUNT attains the best zero-shot accuracy on both benchmarks, cutting counting error (MAE) by 55% on LookAlikes and 21% on PairTally relative to the strongest prior zero-shot counter.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dalessandro2026recount,
  title  = {RECOUNT: Reference-guided Counting with Synthetic Visual Exemplars},
  author = {Adriano D'Alessandro and Ali Mahdavi-Amiri and Ghassan Hamarneh},
  year   = {2026},
  eprint = {2608.20621},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.20621v1}
}

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

Discussion