SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1908.06473 · 2019

From Open Set to Closed Set: Counting Objects by Spatial Divide-and-Conquer

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1908.06473.json · badge: /api/ran/1908.06473.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
xhp-hust-2018-2011/S-DCNet canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
jani-excergy/Crowd_Density_Estimation reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
Class2Count Ran
ran on a synthesized input
xhp-hust-2018-2011/S-DCNet/Network/class_func.py
code served (permissive licence) · get_code("22b0547059ddba3b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a pre_cls tensor with class labels in range [0, 1, 2, ...]
# Shape: (2, 4) - batch of 2, 4 predictions per item
pre_cls = torch.tensor([
    [0, 1, 2, 1],
    [1, 0, 2, 0]
], dtype=torch.long)

# Create label_indice as a numpy array
# These represent indices/boundaries (not including 0, according to docstring)
# Shape: (5,) - 5 label indices
label_indice = np.array([0.5, 1.5, 2.5, 3.0, 3.5], dtype=np.float32)

ARGS = {
    "pre_cls": pre_cls,
    "label_indice": label_indice
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Count2Class Ran
ran on a synthesized input
xhp-hust-2018-2011/S-DCNet/Network/class_func.py
code served (permissive licence) · get_code("14624d4f59c79aaa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a small count_map tensor (2D tensor with small values)
count_map = torch.tensor([[0.0, 1.0, 2.0, 3.0],
                          [1.0, 2.0, 3.0, 4.0]], dtype=torch.float32)

# Create label_indice as a numpy array with threshold values
label_indice = np.array([0.5, 1.5, 2.5], dtype=np.float32)

ARGS = {
    "count_map": count_map,
    "label_indice": label_indice
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
change_padding Ran
ran; our contract draft was wrong, not the code
jani-excergy/Crowd_Density_Estimation/pipelines/SDCNet.py
pointer only (licence: NONE) · get_code("ab976e78a902391a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jani-excergy/Crowd_Density_Estimation when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_rf Ran
ran; our contract draft was wrong, not the code
jani-excergy/Crowd_Density_Estimation/pipelines/SDCNet.py
pointer only (licence: NONE) · get_code("7b2528df8884eefd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jani-excergy/Crowd_Density_Estimation when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

count_merge_low2high_batch Ran
ran on a synthesized input
xhp-hust-2018-2011/S-DCNet/Network/merge_func.py
code served (permissive licence) · get_code("e3e5d4ef7bc36912")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 4, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors with 4 dimensions: b*1*h*w
# clow: batch=2, channels=1, height=2, width=2
clow = torch.randn(2, 1, 2, 2)

# chigh: batch=2, channels=1, height=4, width=4 (2x upsampling)
chigh = torch.randn(2, 1, 4, 4)

ARGS = {
    "clow": clow,
    "chigh": chigh,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 1, 4, 4) — shape (2, 1, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_local_count Ran
ran on a synthesized input
xhp-hust-2018-2011/S-DCNet/Network/class_func.py
code served (permissive licence) · get_code("d90e035029407c5e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 3, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small density map tensor
# Shape: (batch, channels, height, width) = (2, 1, 8, 8)
density_map = torch.rand(2, 1, 8, 8, dtype=torch.float32)

# Patch size parameter
psize = 3

# Patch stride parameter
pstride = 2

ARGS = {
    "density_map": density_map,
    "psize": psize,
    "pstride": pstride,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 1, 3, 3) — shape (2, 1, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_pad Ran
ran on a synthesized input
xhp-hust-2018-2011/S-DCNet/load_data_V2.py
code served (permissive licence) · get_code("04f28289d4f2ff3d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 64, 64) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small tensor with height and width dimensions
# Using shape (batch=2, channels=4, height=33, width=47) to have non-divisible sizes
inputs = torch.randn(2, 4, 33, 47)

# DIV parameter with default value
DIV = 64

ARGS = {
    "inputs": inputs,
    "DIV": DIV
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 64, 64) — shape (2, 4, 64, 64) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_layers Ran
ran; our contract draft was wrong, not the code
jani-excergy/Crowd_Density_Estimation/pipelines/SDCNet.py
pointer only (licence: NONE) · get_code("bd14ee2717325fe2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jani-excergy/Crowd_Density_Estimation when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 5 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
make_layers 4 other papers
2 dated earlier, 2 later
1802.10062 (2018-02)
CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes
1811.10452 (2018-11)
Context-Aware Crowd Counting
2001.03360 (2020-01)
NWPU-Crowd: A Large-Scale Benchmark for Crowd Counting and Localization
and 1 more not named here
Count2Class 1 other paper
1 later
2207.09865 (2022-07)
Discrete-Constrained Regression for Local Counting Models
change_padding 1 other paper
1 later
2207.09865 (2022-07)
Discrete-Constrained Regression for Local Counting Models
compute_rf 1 other paper
1 later
2207.09865 (2022-07)
Discrete-Constrained Regression for Local Counting Models
get_local_count 1 other paper
1 later
2207.09865 (2022-07)
Discrete-Constrained Regression for Local Counting Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Visual counting, a task that predicts the number of objects from an image/video, is an open-set problem by nature, i.e., the number of population can vary in $[0,+\infty)$ in theory. However, the collected images and labeled count values are limited in reality, which means only a small closed set is observed. Existing methods typically model this task in a regression manner, while they are likely to suffer from an unseen scene with counts out of the scope of the closed set. In fact, counting is decomposable. A dense region can always be divided until sub-region counts are within the previously observed closed set. Inspired by this idea, we propose a simple but effective approach, Spatial Divide-and- Conquer Network (S-DCNet). S-DCNet only learns from a closed set but can generalize well to open-set scenarios via S-DC. S-DCNet is also efficient. To avoid repeatedly computing sub-region convolutional features, S-DC is executed on the feature map instead of on the input image. S-DCNet achieves the state-of-the-art performance on three crowd counting datasets (ShanghaiTech, UCF_CC_50 and UCF-QNRF), a vehicle counting dataset (TRANCOS) and a plant counting dataset (MTC). Compared to the previous best methods, S-DCNet brings a 20.2% relative improvement on the ShanghaiTech Part B, 20.9% on the UCF-QNRF, 22.5% on the TRANCOS and 15.1% on the MTC. Code has been made available at: https://github. com/xhp-hust-2018-2011/S-DCNet.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1908.06473")
get_code_for_paper("1908.06473")
have("1908.06473")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1908.06473.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1908.06473.svg)](https://syntology.ai/paper/1908.06473)

Connect an agent — have() is free.