Training-free Object Counting with Prompts

Page view(s)
17
Checked on Aug 20, 2025
Training-free Object Counting with Prompts
Title:
Training-free Object Counting with Prompts
Journal Title:
IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) 2024
Keywords:
Publication Date:
09 April 2024
Citation:
Shi Z, Sun Y, Zhang M. Training-free object counting with prompts[C]//Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2024: 323-331.
Abstract:
This paper tackles the problem of object counting in images. Existing approaches rely on extensive training data with point annotations for each object, making data collection labor-intensive and time-consuming. To overcome this, we propose a training-free object counter that treats the counting task as a segmentation problem. Our approach leverages the Segment Anything Model (SAM), known for its high-quality masks and zero-shot segmentation capability. However, the vanilla mask generation method of SAM lacks class-specific information in the masks, resulting in inferior counting accuracy. To overcome this limitation, we introduce a prior-guided mask generation method that incorporates three types of priors into the segmentation process, enhancing efficiency and accuracy. Additionally, we tackle the issue of counting objects specified through text by proposing a two-stage approach that combines reference object selection and prior-guided mask generation. Extensive experiments on standard datasets demonstrate the competitive performance of our training-free counter compared to learning-based approaches. This paper presents a promising solution for counting objects in various scenarios without the need for extensive data collection and counting-specific training. Code is available at https://github.com/shizenglin/training-free-object-counter.
License type:
Publisher Copyright
Funding Info:
This research / project is supported by the National Research Foundation, Singapore - AI Singapore Programme
Grant Reference no. : AISG2-RP-2021-025

This research / project is supported by the National Research Foundation, Singapore - National Research Foundation Fellowship Award
Grant Reference no. : NRF-NRFF15-2023-0001

This research / project is supported by the Early Career Investigatorship from Center for Frontier AI Research (CFAR), A*STAR - Startup grant
Grant Reference no. :

This research / project is supported by the Agency for Science, Technology and Research - Startup grant
Grant Reference no. :
Description:
© 2024 IEEE.  Personal use of this material is permitted.  Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
ISBN:

Files uploaded:

File Size Format Action
230700038v2.pdf 1.06 MB PDF Request a copy