{"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/afreeca-annotation-free-counting-for-all","title":"AFreeCA: Annotation-Free Counting for All","arxiv_id":"2403.04943","date":"2024-03-07","proceeding":null,"authors":["Adriano D'Alessandro","Ali Mahdavi-Amiri","Ghassan Hamarneh"],"abstract":"Object counting methods typically rely on manually annotated datasets. The cost of creating such datasets has restricted the versatility of these networks to count objects from specific classes (such as humans or penguins), and counting objects from diverse categories remains a challenge. The availability of robust text-to-image latent diffusion models (LDMs) raises the question of whether these models can be utilized to generate counting datasets. However, LDMs struggle to create images with an exact number of objects based solely on text prompts but they can be used to offer a dependable \\textit{sorting} signal by adding and removing objects within an image. Leveraging this data, we initially introduce an unsupervised sorting methodology to learn object-related features that are subsequently refined and anchored for counting purposes using counting data generated by LDMs. Further, we present a density classifier-guided method for dividing an image into patches containing objects that can be reliably counted. Consequently, we can generate counting data for any type of object and count them in an unsupervised manner. Our approach outperforms other unsupervised and few-shot alternatives and is not restricted to specific object classes for which counting data is available. Code to be released upon acceptance.","url_abs":"https://arxiv.org/abs/2403.04943v2","url_pdf":"https://arxiv.org/pdf/2403.04943v2.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":"afreeca-annotation-free-counting-for-all","repo_url":"https://github.com/adrian-dalessandro/afreeca","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"object","task_name":"Object"},{"task_slug":"object-counting","task_name":"Object Counting"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.04943","atlas_url":"https://app.syntology.ai/?focus=2403.04943","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.04943"}},"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":"deterministic:regex_extraction","url":"https://github.com/adrian-dalessandro/AFreeCA","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"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":8,"samples":[{"code_sha256_prefix":"a151445cba47167c","entry":"augment_config","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/utils/experiments.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/utils/experiments.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a151445cba47167c"}},{"code_sha256_prefix":"566ac2c8576f4ae1","entry":"feature_cosine","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/utils/similarity.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/utils/similarity.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"566ac2c8576f4ae1"}},{"code_sha256_prefix":"9c2dfb8c6453b55b","entry":"rank_func","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/layers/diffrank.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/layers/diffrank.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9c2dfb8c6453b55b"}},{"code_sha256_prefix":"a94f7d08ed2b28b0","entry":"rank_normalised","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/layers/diffrank.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/layers/diffrank.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a94f7d08ed2b28b0"}},{"code_sha256_prefix":"29d5df2e4b0103af","entry":"setup","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/utils/experiments.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/utils/experiments.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"29d5df2e4b0103af"}},{"code_sha256_prefix":"5087dabc55a4072d","entry":"true_ranker","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/layers/diffrank.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/layers/diffrank.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5087dabc55a4072d"}},{"code_sha256_prefix":"9af56d30fd83fb5b","entry":"get_callbacks","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/utils/experiments.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/utils/experiments.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9af56d30fd83fb5b"}},{"code_sha256_prefix":"e206fc48a205628f","entry":"labels_normalized","repo":"adrian-dalessandro/AFreeCA","repo_kind":"official","path":"src/utils/similarity.py","file_url":"https://github.com/adrian-dalessandro/AFreeCA/blob/HEAD/src/utils/similarity.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e206fc48a205628f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}