{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/clip-ebc-clip-can-count-accurately-through","title":"CLIP-EBC: CLIP Can Count Accurately through Enhanced Blockwise Classification","arxiv_id":"2403.09281","date":"2024-03-14","proceeding":null,"authors":["Yiming Ma","Victor Sanchez","Tanaya Guha"],"abstract":"We propose CLIP-EBC, the first fully CLIP-based model for accurate crowd density estimation. While the CLIP model has demonstrated remarkable success in addressing recognition tasks such as zero-shot image classification, its potential for counting has been largely unexplored due to the inherent challenges in transforming a regression problem, such as counting, into a recognition task. In this work, we investigate and enhance CLIP's ability to count, focusing specifically on the task of estimating crowd sizes from images. Existing classification-based crowd-counting frameworks have significant limitations, including the quantization of count values into bordering real-valued bins and the sole focus on classification errors. These practices result in label ambiguity near the shared borders and inaccurate prediction of count values. Hence, directly applying CLIP within these frameworks may yield suboptimal performance. To address these challenges, we first propose the Enhanced Blockwise Classification (EBC) framework. Unlike previous methods, EBC utilizes integer-valued bins, effectively reducing ambiguity near bin boundaries. Additionally, it incorporates a regression loss based on density maps to improve the prediction of count values. Within our backbone-agnostic EBC framework, we then introduce CLIP-EBC to fully leverage CLIP's recognition capabilities for this task. Extensive experiments demonstrate the effectiveness of EBC and the competitive performance of CLIP-EBC. Specifically, our EBC framework can improve existing classification-based methods by up to 44.5% on the UCF-QNRF dataset, and CLIP-EBC achieves state-of-the-art performance on the NWPU-Crowd test set, with an MAE of 58.2 and an RMSE of 268.5, representing improvements of 8.6% and 13.3% over the previous best method, STEERER. The code and weights are available at https://github.com/Yiming-M/CLIP-EBC.","url_abs":"https://arxiv.org/abs/2403.09281v3","url_pdf":"https://arxiv.org/pdf/2403.09281v3.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":"clip-ebc-clip-can-count-accurately-through","repo_url":"https://github.com/Yiming-M/CLIP-EBC","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"crowd-counting","task_name":"Crowd Counting"},{"task_slug":"density-estimation","task_name":"Density Estimation"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"ebc","method_name":"EBC"},{"method_slug":"focus","method_name":"Focus"},{"method_slug":"mae","method_name":"MAE"}],"datasets_introduced":[],"methods_introduced":[{"slug":"ebc","name":"EBC","full_name":"Enhanced Blockwise Classification"}],"results":[{"leaderboard":"/sota/crowd-counting-on-nwpu-crowd-val","task":"Crowd Counting","dataset":"NWPU-Crowd (Val)","model":"CLIP-EBC (ViT-L/14)","rank_in_archive_order":2,"of":6,"metrics":{"MAE":"32.3","RMSE":"79.7"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-nwpu-crowd-val","task":"Crowd Counting","dataset":"NWPU-Crowd (Val)","model":"CLIP-EBC (ViT-B/16)","rank_in_archive_order":3,"of":6,"metrics":{"MAE":"36.6","RMSE":"81.7"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-nwpu-crowd-val","task":"Crowd Counting","dataset":"NWPU-Crowd (Val)","model":"CLIP-EBC (ResNet50)","rank_in_archive_order":4,"of":6,"metrics":{"MAE":"38.6","RMSE":"90.3"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-nwpu-crowd-val","task":"Crowd Counting","dataset":"NWPU-Crowd (Val)","model":"DMCount-EBC","rank_in_archive_order":5,"of":6,"metrics":{"MAE":"39.6","RMSE":"95.8"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-nwpu-crowd-val","task":"Crowd Counting","dataset":"NWPU-Crowd (Val)","model":"CSRNet-EBC","rank_in_archive_order":6,"of":6,"metrics":{"MAE":"42.9","RMSE":"100.1"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-a","task":"Crowd Counting","dataset":"ShanghaiTech A","model":"CLIP-EBC (ViT-B/16)","rank_in_archive_order":6,"of":35,"metrics":{"MAE":"52.5","RMSE":"85.9"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-a","task":"Crowd Counting","dataset":"ShanghaiTech A","model":"CLIP-EBC (ResNet50)","rank_in_archive_order":8,"of":35,"metrics":{"MAE":"54.0","RMSE":"83.2"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-a","task":"Crowd Counting","dataset":"ShanghaiTech A","model":"DMCount-EBC","rank_in_archive_order":18,"of":35,"metrics":{"MAE":"62.3","RMSE":"98.9"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-a","task":"Crowd Counting","dataset":"ShanghaiTech A","model":"CSRNet-EBC","rank_in_archive_order":21,"of":35,"metrics":{"MAE":"66.3","RMSE":"105.0"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-b","task":"Crowd Counting","dataset":"ShanghaiTech B","model":"CLIP-EBC (ViT-L/14)","rank_in_archive_order":3,"of":32,"metrics":{"MAE":"5.9","RMSE":"9.2"},"uses_additional_data":true},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-b","task":"Crowd Counting","dataset":"ShanghaiTech B","model":"CLIP-EBC (ResNet50)","rank_in_archive_order":4,"of":32,"metrics":{"MAE":"6.0","RMSE":"10.1"},"uses_additional_data":true},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-b","task":"Crowd Counting","dataset":"ShanghaiTech B","model":"CLIP-EBC (ViT-B/16)","rank_in_archive_order":9,"of":32,"metrics":{"MAE":"6.6","RMSE":"10.5"},"uses_additional_data":true},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-b","task":"Crowd Counting","dataset":"ShanghaiTech B","model":"CSRNet-EBC","rank_in_archive_order":13,"of":32,"metrics":{"MAE":"6.9","RMSE":"11.3"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-b","task":"Crowd Counting","dataset":"ShanghaiTech B","model":"DMCount-EBC","rank_in_archive_order":14,"of":32,"metrics":{"MAE":"7.0","RMSE":"10.9"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-qnrf","task":"Crowd Counting","dataset":"UCF-QNRF","model":"DMCount-EBC (16, dynamic)","rank_in_archive_order":2,"of":23,"metrics":{"MAE":"75.90","RMSE":"130.48"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-qnrf","task":"Crowd Counting","dataset":"UCF-QNRF","model":"DMCount-EBC (32, dynamic)","rank_in_archive_order":3,"of":23,"metrics":{"MAE":"76.06","RMSE":"127.72"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-qnrf","task":"Crowd Counting","dataset":"UCF-QNRF","model":"DMCount-EBC","rank_in_archive_order":4,"of":23,"metrics":{"MAE":"77.2","RMSE":"130.4"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-qnrf","task":"Crowd Counting","dataset":"UCF-QNRF","model":"CSRNet-EBC","rank_in_archive_order":5,"of":23,"metrics":{"MAE":"79.3","RMSE":"135.8"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-qnrf","task":"Crowd Counting","dataset":"UCF-QNRF","model":"CLIP-EBC (ViT-B/16)","rank_in_archive_order":7,"of":23,"metrics":{"MAE":"80.3","RMSE":"139.3"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-qnrf","task":"Crowd Counting","dataset":"UCF-QNRF","model":"CLIP-EBC (ResNet50)","rank_in_archive_order":8,"of":23,"metrics":{"MAE":"80.5","RMSE":"136.6"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.09281","atlas_url":"https://app.syntology.ai/?focus=2403.09281","mcp":null,"developers":"https://syntology.ai/developers","held":true,"reason":"arxiv_id_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"agent_calls":[{"tool":"get_citation_path","arguments":{"paper_1":"2403.09281"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2403.09281\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2403.09281"},"call":"get_concepts_for_paper(arxiv_id=\"2403.09281\")"}],"by_repo":[{"repo":"Yiming-M/CLIP-EBC","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2203.12119"],"harvested_for_calls":[{"arxiv_id":"2203.12119","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2203.12119"},"call":"get_harvested_code_for_paper(arxiv_id=\"2203.12119\")"}]}],"by_repo_harvested_for_is":"harvested_for: the arXiv ids (as Syntology's graph holds them) of every paper whose samples Syntology's graph links to this repository, in arXiv-id order, complete; the page names the first 3 and says how many more. A link only: it does not say the papers are the same work, that one copied the other, or that the code implements this paper's method; harvested_for_calls gives the get_harvested_code_for_paper call for each arXiv-shaped id among them","by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"c1b374645015f7b23fc9756fb7deda8eff0201f535de634d33ccf5e41d2f9e37","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}