arXiv:2502.10677cs.CV2025-02被引 1

解决无类别计数中类别数量不平衡问题,提升少样本场景下的计数精度。

FocalCount: Towards Class-Count Imbalance in Class-Agnostic Counting

  • 利用多特征估计图像类别数,动态加权修正计数偏差。
  • 提出Focal-MSE损失函数,增强对稀有类别的误差敏感度。
  • 在少样本与零样本场景下均表现更优,适合复杂场景计数任务。

在无类别目标计数任务中,目标是估计图像中对象实例的总数而不区分具体类别。现有方法常忽略类别特异性输出,导致需细分类别时出现偏差。这主要源于两个问题:1)数据集中单类别图像占主导,使模型将特定类别泛化为所有对象的代表;2)训练使用均方误差损失,对各类别错误施加相同惩罚,导致稀有类别错误对整体损失贡献小,难以被察觉。为此,本文提出FocalCount,通过多样化特征属性估计图像中类别数量,并将其作为加权因子校正类别计数偏差。同时引入Focal-MSE损失,结合二元交叉熵生成更强误差梯度,提升模型对稀有类别错误的敏感性。实验表明,该方法显著增强模型区分具体类别与总体数量的能力,在三个物体计数数据集上均实现更优性能与可扩展性,尤其在少样本与零样本场景表现突出。代码即将开源。

原文摘要 · Abstract (English)

In class-agnostic object counting, the goal is to estimate the total number of object instances in an image without distinguishing between specific categories. Existing methods often predict this count without considering class-specific outputs, leading to inaccuracies when such outputs are required. These inaccuracies stem from two key challenges: 1) the prevalence of single-category images in datasets, which leads models to generalize specific categories as representative of all objects, and 2) the use of mean squared error loss during training, which applies uniform penalization. This uniform penalty disregards errors in less frequent categories, particularly when these errors contribute minimally to the overall loss. To address these issues, we propose {FocalCount}, a novel approach that leverages diverse feature attributes to estimate the number of object categories in an image. This estimate serves as a weighted factor to correct class-count imbalances. Additionally, we introduce {Focal-MSE}, a new loss function that integrates binary cross-entropy to generate stronger error gradients, enhancing the model's sensitivity to errors in underrepresented categories. Our approach significantly improves the model's ability to distinguish between specific classes and general counts, demonstrating superior performance and scalability in both few-shot and zero-shot scenarios across three object counting datasets. The code will be released soon.

目标计数类别不平衡少样本学习

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