{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/dave-a-detect-and-verify-paradigm-for-low","title":"DAVE -- A Detect-and-Verify Paradigm for Low-Shot Counting","arxiv_id":"2404.16622","date":"2024-04-25","proceeding":null,"authors":["Jer Pelhan","Alan Lukežič","Vitjan Zavrtanik","Matej Kristan"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2404.16622v1","url_pdf":"https://arxiv.org/pdf/2404.16622v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"dave-a-detect-and-verify-paradigm-for-low","repo_url":"https://github.com/jerpelhan/dave","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"exemplar-free-counting","task_name":"Exemplar-Free Counting"},{"task_slug":"few-shot-object-counting-and-detection","task_name":"Few-shot Object Counting and Detection"},{"task_slug":"object","task_name":"Object"},{"task_slug":"object-counting","task_name":"Object Counting"},{"task_slug":"zero-shot-counting","task_name":"Zero-Shot Counting"}],"methods":[{"method_slug":"mae","method_name":"MAE"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/exemplar-free-counting-on-fsc147","task":"Exemplar-Free Counting","dataset":"FSC147","model":"DAVE","rank_in_archive_order":5,"of":9,"metrics":{"MAE(test)":"15.14","MAE(val)":"15.54","RMSE(test)":"103.49","RMSE(val)":"52.67"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-object-counting-and-detection-on","task":"Few-shot Object Counting and Detection","dataset":"FSC147","model":"DAVE","rank_in_archive_order":2,"of":4,"metrics":{"AP(test)":"26.81","AP50(test)":"62.82","MAE(test)":"10.45","RMSE(test)":"74.51"},"uses_additional_data":false},{"leaderboard":"/sota/object-counting-on-fsc147","task":"Object Counting","dataset":"FSC147","model":"DAVE","rank_in_archive_order":3,"of":19,"metrics":{"MAE(test)":"8.66","MAE(val)":"8.91","RMSE(test)":"32.36","RMSE(val)":"28.08"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2404.16622","atlas_url":"https://app.syntology.ai/?focus=2404.16622","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.16622"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jerpelhan/dave","reach":null}],"summary":{"ran":14,"ran_fixture":1,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":18,"ran":16,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"553da3ea9f5e1cd5","entry":"Backbone","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"553da3ea9f5e1cd5"}},{"code_sha256_prefix":"ffcb1456b92b93e8","entry":"BoxList","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ffcb1456b92b93e8"}},{"code_sha256_prefix":"cf9b257c7a9fd0fc","entry":"ConvBlock","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf9b257c7a9fd0fc"}},{"code_sha256_prefix":"cc9b2570e9b960aa","entry":"ConvBlock1","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cc9b2570e9b960aa"}},{"code_sha256_prefix":"d97f51d06653a3c5","entry":"DensityMapRegressor","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d97f51d06653a3c5"}},{"code_sha256_prefix":"06bd7b48a3a041aa","entry":"FCOSHead","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"06bd7b48a3a041aa"}},{"code_sha256_prefix":"f48009fc79740f8c","entry":"FeatureFusionModule","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f48009fc79740f8c"}},{"code_sha256_prefix":"129fe8076ac82fc4","entry":"Feature_Transform","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"129fe8076ac82fc4"}},{"code_sha256_prefix":"95013a850411e806","entry":"Scale","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"95013a850411e806"}},{"code_sha256_prefix":"67df236913fa93d5","entry":"TransformerDecoder","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67df236913fa93d5"}},{"code_sha256_prefix":"e50245b5494e328d","entry":"TransformerDecoderLayer","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e50245b5494e328d"}},{"code_sha256_prefix":"8ea36d91ae3aa4d1","entry":"TransformerEncoder","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ea36d91ae3aa4d1"}},{"code_sha256_prefix":"07e1f3797315c793","entry":"TransformerEncoderLayer","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"07e1f3797315c793"}},{"code_sha256_prefix":"1d7a452dac45065b","entry":"UpsamplingLayer","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1d7a452dac45065b"}},{"code_sha256_prefix":"1e5f5eabbdd857ca","entry":"boxlist_nms","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1e5f5eabbdd857ca"}},{"code_sha256_prefix":"258799328b23dbb2","entry":"extend_bboxes","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"258799328b23dbb2"}},{"code_sha256_prefix":"4c6592d75bff8335","entry":"COTR","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c6592d75bff8335"}},{"code_sha256_prefix":"1af3422bfff1aac3","entry":"mask_density","repo":"jerpelhan/dave","repo_kind":"official","path":"models/dave.py","file_url":"https://github.com/jerpelhan/dave/blob/HEAD/models/dave.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1af3422bfff1aac3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}