Abstract
Class-agnostic counting (CAC) aims to count the number of objects in any category with only a few exemplars. It is crucial for solving the challenge of counting any visual class without re-finetuning, which in turn lowers deployment costs across diverse scenarios. Existing CAC methods usually formulate counting as density map regression, where the supervisory signal depends on Gaussian-kernel design. However, designing a generalized density map for objects with diverse sizes and shapes is inherently difficult, which limits the robustness of existing methods in open and heterogeneous scenes. To address this issue, we propose SeqCount, a novel sequence-modeling framework that reformulates CAC as a sequence generation task rather than density regression. Specifically, we divide the input image into N×N patches and introduce a serialization scheme that converts point annotations into an ordered sequence of discrete patch-level count tokens. We further design an encoder–decoder architecture to model the correlation among image patches, where cross-attention guides each token prediction to the relevant visual regions and masked self-attention captures dependencies among neighboring counting tokens. By replacing density estimation with discrete sequence prediction, SeqCount avoids handcrafted kernel design and provides a more flexible and interpretable counting paradigm for objects with varying scales and shapes. Experimental results on three challenging multi-category datasets, i.e., FSCD-LVIS, UAVVIC and FSC-, and three vehicle counting datasets, i.e., TRANCOS, CARPK, and PUCPR+, demonstrate that our method performs favorably against state-of-the-art methods.
| Original language | English |
|---|---|
| Article number | 104856 |
| Journal | Journal of Visual Communication and Image Representation |
| Volume | 119 |
| DOIs | |
| State | Published - Aug 2026 |
| Externally published | Yes |
Keywords
- Class-agnostic counting
- Object counting
- Sequence modeling
Fingerprint
Dive into the research topics of 'SeqCount: A sequence modeling framework for class-agnostic counting'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver