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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhu, Huilin, Yuan, Jingling, Yang, Zhengwei, Guo, Yu, Zhong, Xian, He, Shengfeng
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866929717319303168
author Zhu, Huilin
Yuan, Jingling
Yang, Zhengwei
Guo, Yu
Zhong, Xian
He, Shengfeng
author_facet Zhu, Huilin
Yuan, Jingling
Yang, Zhengwei
Guo, Yu
Zhong, Xian
He, Shengfeng
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2502_10677
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle FocalCount: Towards Class-Count Imbalance in Class-Agnostic Counting
Zhu, Huilin
Yuan, Jingling
Yang, Zhengwei
Guo, Yu
Zhong, Xian
He, Shengfeng
Computer Vision and Pattern Recognition
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.
title FocalCount: Towards Class-Count Imbalance in Class-Agnostic Counting
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2502.10677