{"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/distribution-matching-for-crowd-counting","title":"Distribution Matching for Crowd Counting","arxiv_id":"2009.13077","date":"2020-09-28","proceeding":"NeurIPS 2020 12","authors":["Boyu Wang","Huidong Liu","Dimitris Samaras","Minh Hoai"],"abstract":"In crowd counting, each training image contains multiple people, where each person is annotated by a dot. Existing crowd counting methods need to use a Gaussian to smooth each annotated dot or to estimate the likelihood of every pixel given the annotated point. In this paper, we show that imposing Gaussians to annotations hurts generalization performance. Instead, we propose to use Distribution Matching for crowd COUNTing (DM-Count). In DM-Count, we use Optimal Transport (OT) to measure the similarity between the normalized predicted density map and the normalized ground truth density map. To stabilize OT computation, we include a Total Variation loss in our model. We show that the generalization error bound of DM-Count is tighter than that of the Gaussian smoothed methods. In terms of Mean Absolute Error, DM-Count outperforms the previous state-of-the-art methods by a large margin on two large-scale counting datasets, UCF-QNRF and NWPU, and achieves the state-of-the-art results on the ShanghaiTech and UCF-CC50 datasets. DM-Count reduced the error of the state-of-the-art published result by approximately 16%. Code is available at https://github.com/cvlab-stonybrook/DM-Count.","url_abs":"https://arxiv.org/abs/2009.13077v2","url_pdf":"https://arxiv.org/pdf/2009.13077v2.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":"distribution-matching-for-crowd-counting","repo_url":"https://github.com/cvlab-stonybrook/DM-Count","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"crowd-counting","task_name":"Crowd Counting"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/crowd-counting-on-shanghaitech-a","task":"Crowd Counting","dataset":"ShanghaiTech A","model":"DM-Count","rank_in_archive_order":16,"of":35,"metrics":{"MAE":"59.7"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-shanghaitech-b","task":"Crowd Counting","dataset":"ShanghaiTech B","model":"DM-Count","rank_in_archive_order":15,"of":32,"metrics":{"MAE":"7.4"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-cc-50","task":"Crowd Counting","dataset":"UCF CC 50","model":"DM-Count","rank_in_archive_order":4,"of":22,"metrics":{"MAE":"211.0"},"uses_additional_data":false},{"leaderboard":"/sota/crowd-counting-on-ucf-qnrf","task":"Crowd Counting","dataset":"UCF-QNRF","model":"DM-Count","rank_in_archive_order":11,"of":23,"metrics":{"MAE":"85.6"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2009.13077","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2009.13077"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/cvlab-stonybrook/DM-Count","reach":null}],"summary":{"ran":4,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"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":"4a7bb1df79ece9e0","entry":"sinkhorn","repo":"cvlab-stonybrook/DM-Count","repo_kind":"official","path":"losses/ot_loss.py","file_url":"https://github.com/cvlab-stonybrook/DM-Count/blob/HEAD/losses/ot_loss.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":"4a7bb1df79ece9e0"}},{"code_sha256_prefix":"6fc6b09f36104fee","entry":"sinkhorn_epsilon_scaling","repo":"cvlab-stonybrook/DM-Count","repo_kind":"official","path":"losses/ot_loss.py","file_url":"https://github.com/cvlab-stonybrook/DM-Count/blob/HEAD/losses/ot_loss.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":"6fc6b09f36104fee"}},{"code_sha256_prefix":"efb7b74d984b62d7","entry":"sinkhorn_knopp","repo":"cvlab-stonybrook/DM-Count","repo_kind":"official","path":"losses/ot_loss.py","file_url":"https://github.com/cvlab-stonybrook/DM-Count/blob/HEAD/losses/ot_loss.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":"efb7b74d984b62d7"}},{"code_sha256_prefix":"7d7ce732072ce0e3","entry":"sinkhorn_stabilized","repo":"cvlab-stonybrook/DM-Count","repo_kind":"official","path":"losses/ot_loss.py","file_url":"https://github.com/cvlab-stonybrook/DM-Count/blob/HEAD/losses/ot_loss.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":"7d7ce732072ce0e3"}},{"code_sha256_prefix":"71d906d461c4d5cd","entry":"OT_Loss","repo":"cvlab-stonybrook/DM-Count","repo_kind":"official","path":"losses/ot_loss.py","file_url":"https://github.com/cvlab-stonybrook/DM-Count/blob/HEAD/losses/ot_loss.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":"71d906d461c4d5cd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}