Single Domain Generalization for Few-Shot Counting via Universal Representation Matching

Xianing Chen, Si Huo, Borui Jiang, Hailin Hu, Xinghao Chen
2/10/2026

No official code found. Best implementation: jbr97/URM (7 stars, last commit 2025-06-09).

Abstract

Few-shot counting estimates the number of target objects in an image using only a few annotated exemplars. However, domain shift severely hinders existing methods to generalize to unseen scenarios. This falls into the realm of single domain generalization that remains unexplored in few-shot counting. To solve this problem, we begin by analyzing the main limitations of current methods, which typically follow a standard pipeline that extract the object prototypes from exemplars and then match them with image feature to construct the correlation map. We argue that existing methods overlook the significance of learning highly generalized prototypes. Building on this insight, we propose the first single domain generalization few-shot counting model, Universal Representation Matching, termed URM. Our primary contribution is the discovery that incorporating universal vision-language representations distilled from a large scale pretrained vision-language model into the correlation construction process substantially improves robustness to domain shifts without compromising in domain performance. As a result, URM achieves state-of-the-art performance on both in domain and the newly introduced domain generalization setting.

View on arXivView PDF

Code Implementations(1)

jbr97/URMCommunity69%

Official repository of Single Domain Generalization for Few-Shot Counting via Universal Representation Matching (CVPR 2025)

71Shell, PythonMar 16, 20251 years ago

Cite this paper

@article{chen2026single,
  title  = {Single Domain Generalization for Few-Shot Counting via Universal Representation Matching},
  author = {Xianing Chen and Si Huo and Borui Jiang and Hailin Hu and Xinghao Chen},
  year   = {2026},
  eprint = {2505.16778},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2505.16778},
  journal = {CVPR 2025 2025}
}

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

Discussion