Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
102 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Point, Segment and Count: A Generalized Framework for Object Counting (2311.12386v3)

Published 21 Nov 2023 in cs.CV

Abstract: Class-agnostic object counting aims to count all objects in an image with respect to example boxes or class names, \emph{a.k.a} few-shot and zero-shot counting. In this paper, we propose a generalized framework for both few-shot and zero-shot object counting based on detection. Our framework combines the superior advantages of two foundation models without compromising their zero-shot capability: (\textbf{i}) SAM to segment all possible objects as mask proposals, and (\textbf{ii}) CLIP to classify proposals to obtain accurate object counts. However, this strategy meets the obstacles of efficiency overhead and the small crowded objects that cannot be localized and distinguished. To address these issues, our framework, termed PseCo, follows three steps: point, segment, and count. Specifically, we first propose a class-agnostic object localization to provide accurate but least point prompts for SAM, which consequently not only reduces computation costs but also avoids missing small objects. Furthermore, we propose a generalized object classification that leverages CLIP image/text embeddings as the classifier, following a hierarchical knowledge distillation to obtain discriminative classifications among hierarchical mask proposals. Extensive experimental results on FSC-147, COCO, and LVIS demonstrate that PseCo achieves state-of-the-art performance in both few-shot/zero-shot object counting/detection. Code: https://github.com/Hzzone/PseCo

Point, Segment and Count: A Generalized Framework for Object Counting

The paper "Point, Segment and Count: A Generalized Framework for Object Counting" introduces an innovative approach to address the challenges of class-agnostic object counting within images, applicable in both few-shot and zero-shot settings. Object counting traditionally demands extensive training data with annotations, often specific to predefined categories. This research presents a generalized framework, termed PseCo, leveraging foundational models such as the Segment Anything Model (SAM) and Contrastive Language-Image Pre-Training (CLIP) to efficiently count objects by detecting and segmenting objects through a sequence of steps: point, segment, and count.

Core Framework and Methodology

The research builds on the zero-shot capabilities of SAM and CLIP, demonstrating their combined utility in object detection and counting without compromising on generalization. SAM provides the mechanism to segment potential objects through point prompts, while CLIP offers a robust classification capability to process these segmentations in alignment with textual or visual prompts.

  • Pointing (Localization): The framework employs a class-agnostic object localization approach, aiming to accurately identify object locations using a minimal yet efficient point-based strategy. This is modeled akin to keypoint estimation, utilizing a point decoder that leverages SAM's image encoder to predict a heatmap for object detection, guiding subsequent segmentation.
  • Segmenting (Detection): SAM is utilized to generate hierarchical mask proposals for these points, enabling detailed segmentation of objects, including smaller or densely packed entities that are often overlooked.
  • Counting (Classification): This step entrusts CLIP with the task of classifying the segmented regions to derive accurate object counts. To enhance the classification process, hierarchical knowledge distillation is applied, aligning features extracted from segmented regions with CLIP's vision-language embeddings for refined discrimination among object masks.

The combination of these stages within PseCo not only reduces computational overhead but also enhances the detection fidelity, particularly in complex or cluttered scenes.

Experimental Evaluation

The efficacy of PseCo was validated across various benchmark datasets such as FSC-147, COCO, and LVIS, comparing favorably against established density-based and detection-based object counting methodologies. The results illustrate PseCo’s superior performance in zero-shot transfer scenarios—a key advantage given the adaptive real-world applications of object counting across novel or untrained categories.

Implications and Future Directions

This research significantly broadens the horizon for class-agnostic object counting by integrating advanced zero-shot learning models. The use of hierarchical distillation and the effective reduction of computational costs present promising advancements for practical implementations in surveillance, automated analysis, and resource-constrained environments.

Future explorations could enhance the scalability and robustness of PseCo, particularly in edge computing applications, by further optimizing the integration and processing efficiencies of SAM and CLIP. Additionally, the adaptability of such frameworks to 3D or video datasets offers a prospective avenue for expanding the impact of this generalized object counting strategy in dynamic contexts.

In conclusion, the research presents a robust and adaptable framework for object counting that addresses current limitations and sets a new benchmark for future developments in zero-shot and few-shot learning paradigms.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (5)
  1. Zhizhong Huang (36 papers)
  2. Mingliang Dai (2 papers)
  3. Yi Zhang (994 papers)
  4. Junping Zhang (65 papers)
  5. Hongming Shan (91 papers)
Citations (5)
Github Logo Streamline Icon: https://streamlinehq.com