Papers › Discrete-Constrained Regression for Local Counting Models

Discrete-Constrained Regression for Local Counting Models

20 Jul 2022arXiv:2207.09865archive 2025-07-28

Haipeng Xiong, Angela Yao

Local counts, or the number of objects in a local area, is a continuous value by nature. Yet recent state-of-the-art methods show that formulating counting as a classification task performs better than regression. Through a series of experiments on carefully controlled synthetic data, we show that this counter-intuitive result is caused by imprecise ground truth local counts. Factors such as biased dot annotations and incorrectly matched Gaussian kernels used to generate ground truth counts introduce deviations from the true local counts. Standard continuous regression is highly sensitive to these errors, explaining the performance gap between classification and regression. To mitigate the sensitivity, we loosen the regression formulation from a continuous scale to a discrete ordering and propose a novel discrete-constrained (DC) regression. Applied to crowd counting, DC-regression is more accurate than both classification and standard regression on three public benchmarks. A similar advantage also holds for the age estimation task, verifying the overall effectiveness of DC-regression.

PaperPDFCodeCode Syntology ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2207.09865")

Code

Syntology Ran 3 of 10 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 3 ran · our draft was wrong.

By repository: official repository: 10 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

xhp-hust-2018-2011/dcreg officialmentioned on GitHubpytorchMIT 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

10 samples harvested; 3 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
7unverified

Licence: 0 of the 10 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 xhp-hust-2018-2011/dcreg. “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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

change_padding xhp-hust-2018-2011/dcreg/Network/base_Network_module.py official repository ran · our draft was wrong MIT (permissive) · ab976e78a902391a · report
compute_rf xhp-hust-2018-2011/dcreg/Network/base_Network_module.py official repository ran · our draft was wrong MIT (permissive) · 7b2528df8884eefd · report
make_layers xhp-hust-2018-2011/dcreg/Network/CountNet.py official repository ran · our draft was wrong MIT (permissive) · bd14ee2717325fe2 · report
Class2Count xhp-hust-2018-2011/dcreg/Network/class_func.py official repository unverified MIT (permissive) · e44e8c0665a56aa6 · report
Count2Class xhp-hust-2018-2011/dcreg/Network/class_func.py official repository unverified MIT (permissive) · 14624d4f59c79aaa · report
get_config_str xhp-hust-2018-2011/dcreg/utils/IOtools.py official repository unverified MIT (permissive) · ce83548cdfb3acae · report
get_local_count xhp-hust-2018-2011/dcreg/Network/class_func.py official repository unverified MIT (permissive) · d90e035029407c5e · report
get_pad xhp-hust-2018-2011/dcreg/utils/load_data_V2.py official repository unverified MIT (permissive) · 75b9b529e82ec492 · report
interval_divide xhp-hust-2018-2011/dcreg/cls_funcs/Interval_paritition.py official repository unverified MIT (permissive) · cba361f3f6dee53a · report
load_model xhp-hust-2018-2011/dcreg/utils/IOtools.py official repository unverified MIT (permissive) · bf8495bc6c35bf0e · report

Tasks

Age EstimationClassificationCrowd Countingregression

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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