Papers › CountGD: Multi-Modal Open-World Counting

CountGD: Multi-Modal Open-World Counting

5 Jul 2024arXiv:2407.04619archive 2025-07-28

Niki Amini-Naieni, Tengda Han, Andrew Zisserman

The goal of this paper is to improve the generality and accuracy of open-vocabulary object counting in images. To improve the generality, we repurpose an open-vocabulary detection foundation model (GroundingDINO) for the counting task, and also extend its capabilities by introducing modules to enable specifying the target object to count by visual exemplars. In turn, these new capabilities - being able to specify the target object by multi-modalites (text and exemplars) - lead to an improvement in counting accuracy. We make three contributions: First, we introduce the first open-world counting model, CountGD, where the prompt can be specified by a text description or visual exemplars or both; Second, we show that the performance of the model significantly improves the state of the art on multiple counting benchmarks - when using text only, CountGD is comparable to or outperforms all previous text-only works, and when using both text and visual exemplars, we outperform all previous models; Third, we carry out a preliminary study into different interactions between the text and visual exemplar prompts, including the cases where they reinforce each other and where one restricts the other. The code and an app to test the model are available at https://www.robots.ox.ac.uk/~vgg/research/countgd/.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2407.04619")

Code

Syntology Ran 4 of 9 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 4 ran with no contract checked.

By repository: community (archive-listed): 9 samples from 2 repositories, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

niki-amini-naieni/CountGD mentioned on GitHubpytorch report
niki-amini-naieni/countx mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 4 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

4ran
5unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

CrossAttention niki-amini-naieni/countx/models_counting_network.py community (archive-listed) ran · metamorphic tier: invariant MIT (permissive) · 4cb253256cb32632 · report
DropPath niki-amini-naieni/countx/models_counting_network.py community (archive-listed) ran · metamorphic tier: invariant fingerprinted MIT (permissive) · 59c07cf4d49e5e3c · report
Mlp niki-amini-naieni/countx/models_counting_network.py community (archive-listed) ran · metamorphic tier: invariant MIT (permissive) · 6f6aa7aeb7d08957 · report
PositionalEncodingsFixed niki-amini-naieni/CountGD/models/GroundingDINO/groundingdino.py community (archive-listed) ran MIT (permissive) · 9f204c85d112d40e · report
CountingNetwork niki-amini-naieni/countx/models_counting_network.py community (archive-listed) unverified MIT (permissive) · 7a6e35a004c4b745 · report
CrossAttentionBlock niki-amini-naieni/countx/models_counting_network.py community (archive-listed) unverified MIT (permissive) · c0ab3335e60b739b · report
GroundingDINO niki-amini-naieni/CountGD/models/GroundingDINO/groundingdino.py community (archive-listed) unverified MIT (permissive) · 52f493b1857ba9eb · report
TransformerEncoder niki-amini-naieni/CountGD/models/GroundingDINO/groundingdino.py community (archive-listed) unverified MIT (permissive) · daf42163c5ae159d · report
TransformerEncoderLayer niki-amini-naieni/CountGD/models/GroundingDINO/groundingdino.py community (archive-listed) unverified MIT (permissive) · 57469407352666b4 · report

Tasks

Object CountingOpen-vocabulary object countingZero-Shot Counting

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Object Counting FSC147 CountGD MAE(test) 5.74 #1 of 19 Archive leaderboard report
Object Counting FSC147 CountGD MAE(val) 7.1 #1 of 19 Archive leaderboard report
Object Counting FSC147 CountGD RMSE(test) 24.09 #1 of 19 Archive leaderboard report
Object Counting FSC147 CountGD RMSE(val) 26.08 #1 of 19 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections