cs.CVFeb 23, 2026

CountEx: Fine-Grained Counting via Exemplars and Exclusion

Authors: Yifeng Huang, Gia Khanh Nguyen, Minh Hoai

Organizations: Department of Computer Science, Stony Brook University, Stony Brook, NY, USA · Australian Institute for Machine Learning, Adelaide University, SA, Australia

Abstract

This paper presents CountEx, a discriminative visual counting framework designed to address a key limitation of existing prompt-based methods: the inability to explicitly exclude visually similar distractors. While current approaches allow users to specify what to count via inclusion prompts, they often struggle in cluttered scenes with confusable object categories, leading to ambiguity and overcounting. CountEx enables users to express both inclusion and exclusion intent, specifying what to count and what to ignore, through multimodal prompts including natural language descriptions and optional visual exemplars. At the core of CountEx is a novel Discriminative Query Refinement module, which jointly reasons over inclusion and exclusion cues by first identifying shared visual features, then isolating exclusion-specific patterns, and finally applying selective suppression to refine the counting query. To support systematic evaluation of fine-grained counting methods, we introduce CoCount, a benchmark comprising 1,780 videos and 10,086 annotated frames across 97 category pairs. Experiments show that CountEx achieves substantial improvements over state-of-the-art methods for counting objects from both known and novel categories. The data and code are available at https://github.com/bbvisual/CountEx.

Figures & tables

Explore similar work

CardsList
  1. Count Anything at Any Granularity

    May 11, 2026Chang Liu, Haoning Wu, Weidi XieObject CountingMultimodal Large Language Models

  2. RECOUNT: Reference-guided Counting with Synthetic Visual Exemplars

    Aug 20, 2026Adriano D'Alessandro, Ali Mahdavi-Amiri, Ghassan HamarnehObject Counting

  3. Count Anything

    May 29, 2026Mengqi Lei, Shuokun Cheng, Wei Bao +4Object Counting