Papers › DAVE -- A Detect-and-Verify Paradigm for Low-Shot Counting

DAVE -- A Detect-and-Verify Paradigm for Low-Shot Counting

25 Apr 2024arXiv:2404.16622archive 2025-07-28

Jer Pelhan, Alan Lukežič, Vitjan Zavrtanik, Matej Kristan

Low-shot counters estimate the number of objects corresponding to a selected category, based on only few or no exemplars annotated in the image. The current state-of-the-art estimates the total counts as the sum over the object location density map, but does not provide individual object locations and sizes, which are crucial for many applications. This is addressed by detection-based counters, which, however fall behind in the total count accuracy. Furthermore, both approaches tend to overestimate the counts in the presence of other object classes due to many false positives. We propose DAVE, a low-shot counter based on a detect-and-verify paradigm, that avoids the aforementioned issues by first generating a high-recall detection set and then verifying the detections to identify and remove the outliers. This jointly increases the recall and precision, leading to accurate counts. DAVE outperforms the top density-based counters by ~20% in the total count MAE, it outperforms the most recent detection-based counter by ~20% in detection quality and sets a new state-of-the-art in zero-shot as well as text-prompt-based counting.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 18 code samples harvested from 1 repository linked to this paper: 16 ran (of which 10 constructed an object rather than computing a result; 14 with no instrument failure: 0 honoured, 0 violated, 14 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 18 samples from 1 repository, 16 ran (14 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

jerpelhan/dave officialmentioned in papermentioned on GitHubpytorchSyntology: 18 samples, 16 ran (2 instrument-failed) · 2 unverified 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

18 samples harvested: 16 ran (of which 10 constructed an object rather than computing a result; 14 with no instrument failure: 0 honoured, 0 violated, 14 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · our draft was wrong
1ran; the contract check could not run
14ran
2unverified

Licence: 0 of the 18 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 jerpelhan/dave. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 5 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

jerpelhan/dave official repository 18 samples, 16 ran (2 instrument-failed) · 2 unverified
Backbone in 17 papers models/dave.py ran fingerprinted MIT (permissive) · 553da3ea9f5e1cd5 · report fixture: returned Backbone · level recorded 2026-09-22
BoxList models/dave.py ran MIT (permissive) · ffcb1456b92b93e8 · report fixture: returned BoxList · level recorded 2026-09-22
ConvBlock in 61 papers
census: 8 implementations from 8 papers, 6 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 4, kind float, dtype float32
models/dave.py ran · metamorphic tier: invariant fingerprinted MIT (permissive) · cf9b257c7a9fd0fc · report fixture: signature input:Tensor/4/float · returned Tensor · level recorded 2026-09-22
ConvBlock1 models/dave.py ran fingerprinted MIT (permissive) · cc9b2570e9b960aa · report fixture: returned ConvBlock1 · level recorded 2026-09-22
DensityMapRegressor models/dave.py ran fingerprinted MIT (permissive) · d97f51d06653a3c5 · report fixture: returned DensityMapRegressor · level recorded 2026-09-22
FCOSHead models/dave.py ran MIT (permissive) · 06bd7b48a3a041aa · report fixture: returned FCOSHead · level recorded 2026-09-22
FeatureFusionModule models/dave.py ran MIT (permissive) · f48009fc79740f8c · report fixture: returned FeatureFusionModule · level recorded 2026-09-22
Feature_Transform models/dave.py ran MIT (permissive) · 129fe8076ac82fc4 · report fixture: returned Feature_Transform · level recorded 2026-09-22
Scale in 8 papers models/dave.py ran fingerprinted MIT (permissive) · 95013a850411e806 · report fixture: returned Scale · level recorded 2026-09-22
TransformerDecoder in 49 papers models/dave.py ran MIT (permissive) · 67df236913fa93d5 · report fixture: returned TransformerDecoder · level recorded 2026-09-22
TransformerDecoderLayer in 45 papers models/dave.py ran MIT (permissive) · e50245b5494e328d · report fixture: signature tgt:Tensor/3/float, appearance:Tensor/3/float, memory:Tensor/3/float, pos_emb:Tensor/3/float, query_pos_emb:Tensor/3/float, tgt_mask:Tensor/2/float, memory_mask:Tensor/2/float, tgt_key_padding_mask:Tensor/2/bool, memory_key_padding_mask:Tensor/2/bool · returned Tensor · level recorded 2026-09-24
TransformerEncoder in 96 papers models/dave.py ran · metamorphic tier: invariant MIT (permissive) · 8ea36d91ae3aa4d1 · report fixture: signature src:Tensor/3/float, pos_emb:Tensor/3/float, src_mask:NoneType/0/?, src_key_padding_mask:NoneType/0/? · returned Tensor · level recorded 2026-09-22
TransformerEncoderLayer in 90 papers models/dave.py ran MIT (permissive) · 07e1f3797315c793 · report fixture: signature src:Tensor/3/float, pos_emb:Tensor/3/float, src_mask:NoneType/0/?, src_key_padding_mask:NoneType/0/? · returned Tensor · level recorded 2026-09-24
UpsamplingLayer models/dave.py ran fingerprinted MIT (permissive) · 1d7a452dac45065b · report fixture: returned UpsamplingLayer · level recorded 2026-09-22
boxlist_nms models/dave.py ran; the contract check could not run (RAISES) MIT (permissive) · 1e5f5eabbdd857ca · report fixture: signature boxlist:BoxList/0/?, scores:Tensor/1/float, threshold:float/0/float, max_proposal:int/0/int · returned BoxList · level recorded 2026-09-22
extend_bboxes models/dave.py ran · our draft was wrong fingerprinted MIT (permissive) · 258799328b23dbb2 · report fixture: signature bboxes:Tensor/2/float, extension_factor:float/0/float · returned Tensor · level recorded 2026-09-22
COTR models/dave.py unverified MIT (permissive) · 4c6592d75bff8335 · report
mask_density models/dave.py unverified MIT (permissive) · 1af3422bfff1aac3 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for DAVE (graph method: DAVE). 20 bricks; individually on a fixture: 18 ran (of which 12 constructed an object rather than computing a result; 16 with no instrument failure: 0 honoured, 0 violated, 16 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

  1. COTR entry · level 0 · unverified · 4c6592d75bff8335
  2. Backbone helper · level 1 · ran · 553da3ea9f5e1cd5
  3. BoxList helper · level 1 · ran · ffcb1456b92b93e8
  4. DensityMapRegressor helper · level 1 · ran · d97f51d06653a3c5
  5. FCOSHead helper · level 1 · ran · 06bd7b48a3a041aa
  6. Feature_Transform helper · level 1 · ran · 129fe8076ac82fc4
  7. PositionalEncodingsFixed helper · level 1 · ran · 9f204c85d112d40e
  8. TransformerDecoder model · level 1 · ran · 67df236913fa93d5
  9. TransformerEncoder model · level 1 · ran · 8ea36d91ae3aa4d1
  10. boxlist_nms helper · level 1 · ran; the contract check could not run (RAISES) · 1e5f5eabbdd857ca
  11. extend_bboxes helper · level 1 · ran · our draft was wrong · 258799328b23dbb2
  12. mask_density helper · level 0 · unverified · 1af3422bfff1aac3
  13. UpsamplingLayer helper · level 1 · ran · 1d7a452dac45065b
  14. FeatureFusionModule helper · level 1 · ran · f48009fc79740f8c
  15. Scale helper · level 1 · ran · 95013a850411e806
  16. ConvBlock1 helper · level 1 · ran · cc9b2570e9b960aa
  17. TransformerDecoderLayer model · level 1 · ran · e50245b5494e328d
  18. TransformerEncoderLayer model · level 1 · ran · 07e1f3797315c793
  19. ConvBlock helper · level 1 · ran · cf9b257c7a9fd0fc
  20. MLP model · level 1 · ran · e75aa072e004da65

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2404.16622") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Exemplar-Free CountingFew-shot Object Counting and DetectionObjectObject CountingZero-Shot Counting

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Exemplar-Free Counting FSC147 DAVE MAE(test) 15.14 #5 of 9 Archive leaderboard report
Exemplar-Free Counting FSC147 DAVE MAE(val) 15.54 #5 of 9 Archive leaderboard report
Exemplar-Free Counting FSC147 DAVE RMSE(test) 103.49 #5 of 9 Archive leaderboard report
Exemplar-Free Counting FSC147 DAVE RMSE(val) 52.67 #5 of 9 Archive leaderboard report
Few-shot Object Counting and Detection FSC147 DAVE AP(test) 26.81 #2 of 4 Archive leaderboard report
Few-shot Object Counting and Detection FSC147 DAVE AP50(test) 62.82 #2 of 4 Archive leaderboard report
Few-shot Object Counting and Detection FSC147 DAVE MAE(test) 10.45 #2 of 4 Archive leaderboard report
Few-shot Object Counting and Detection FSC147 DAVE RMSE(test) 74.51 #2 of 4 Archive leaderboard report
Object Counting FSC147 DAVE MAE(test) 8.66 #3 of 19 Archive leaderboard report
Object Counting FSC147 DAVE MAE(val) 8.91 #3 of 19 Archive leaderboard report
Object Counting FSC147 DAVE RMSE(test) 32.36 #3 of 19 Archive leaderboard report
Object Counting FSC147 DAVE RMSE(val) 28.08 #3 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.

Methods

MAESET

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