arXiv:2601.13871cs.CV2026-01

无需训练和先验信息,一键统计图像中任意类别的物体数量

OCCAM: Class-Agnostic, Training-Free, Prior-Free and Multi-Class Object Counting

  • 基于SAM2与改进的FINCH算法,实现无训练、无先验的计数
  • 在FSC-147和CARPK上达到领先性能,多类计数准确率超85%
  • 适用于真实场景中未知类别物体的快速统计,适合工业检测等应用

无类别依赖的目标计数(CAC)旨在统计图像中任意类别的物体实例。现有方法通常限定单类、依赖大量训练数据,并需引入视觉样例或文本提示。本文提出OCCAM,首个无需训练、无需额外信息的CAC方法,且支持多类计数。我们利用基础模型SAM2与自研的阈值型首次整数邻近聚类层次算法(FINCH),在广泛使用的基准数据集FSC-147和CARPK上实现优异表现。同时,我们构建了一个合成多类数据集,并提出更适合的评价指标F1分数。代码与数据集将公开于https://mikespanak.github.io/OCCAM_counter。

原文摘要 · Abstract (English)

Class-Agnostic object Counting (CAC) involves counting instances of objects from arbitrary classes within an image. Due to its practical importance, CAC has received increasing attention in recent years. Most existing methods assume a single object class per image, rely on extensive training of large deep learning models and address the problem by incorporating additional information, such as visual exemplars or text prompts. In this paper, we present OCCAM, the first training-free approach to CAC that operates without the need of any supplementary information. Moreover, our approach addresses the multi-class variant of the problem, as it is capable of counting the object instances in each and every class among arbitrary object classes within an image. We leverage Segment Anything Model 2 (SAM2), a foundation model, and a custom threshold-based variant of the First Integer Neighbor Clustering Hierarchy (FINCH) algorithm to achieve competitive performance on widely used benchmark datasets, FSC-147 and CARPK. We propose a synthetic multi-class dataset and F1 score as a more suitable evaluation metric. The code for our method and the proposed synthetic dataset will be made publicly available at https://mikespanak.github.io/OCCAM_counter.

目标计数无监督SAM2多类统计

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。