SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.07538 · 2019

Locate, Size and Count: Accurately Resolving People in Dense Crowds via Detection

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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 9 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; 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/1906.07538.json · badge: /api/ran/1906.07538.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
val-iisc/lsc-cnn canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
Vivek-23-Titan/Crowd_Detection community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
FunctionStatusWhere it lives
apply_nms Ran
ran on a synthesized input
Vivek-23-Titan/Crowd_Detection/utils_nms.py
code served (permissive licence) · get_code("f9bda08c909ec8bd")
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 tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Create small test data for apply_nms function
# The function expects:
# - confidence_map: list/tuple of 4 arrays
# - hmap: list/tuple of 4 arrays  
# - wmap: list/tuple of 4 arrays
# - dotmap_pred_downscale: int (default 2)
# - thresh: float (default 0.3)

# Create small spatial maps (3x4 spatial dimensions)
height, width = 3, 4

# Create confidence maps - 4 of them
confidence_map = [
    np.random.rand(height, width),
    np.random.rand(height, width),
    np.random.rand(height, width),
    np.random.rand(height, width)
]

# Create height maps - 4 of them
hmap = [
    np.random.rand(height, width) * 10,
    np.random.rand(height, width) * 10,
    np.random.rand(height, width) * 10,
    np.random.rand(height, width) * 10
]

# Create width maps - 4 of them
wmap = [
    np.random.rand(height, width) * 10,
    np.random.rand(height, width) * 10,
    np.random.rand(height, width) * 10,
    np.random.rand(height, width) * 10
]

# Ensure some positive values exist so NMS has detections to process
confidence_map[0][0, 0] = 0.9
confidence_map[0][1, 1] = 0.8
confidence_map[1][2, 2] = 0.7

hmap[0][0, 0] = 5.0
hmap[0][1, 1] = 4.0
hmap[1][2, 2] = 3.0

wmap[0][0, 0] = 6.0
wmap[0][1, 1] = 5.0
wmap[1][2, 2] = 4.0

ARGS = {
    'confidence_map': confidence_map,
    'hmap': hmap,
    'wmap': wmap,
    'dotmap_pred_downscale': 2,
    'thresh': 0.3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
compute_box_weights Ran
ran on a synthesized input
val-iisc/lsc-cnn/utils/loss_weights.py
code served (permissive licence) · get_code("3a4a60bd9854e290")
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 ndarray, ndim 2, dtype family float, shape (3, 4) 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 numpy as np

# Create a small histogram array
# The function expects a 2D array where:
# - First dimension represents different levels/scales
# - Second dimension represents channels (must be at least 4 based on c_0 = hist[:, 3])
hist = np.array([
    [10.0, 20.0, 15.0, 5.0],
    [8.0, 16.0, 12.0, 4.0],
    [6.0, 12.0, 9.0, 3.0]
], dtype=np.float32)

ARGS = {
    "hist": hist
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 4) — shape (3, 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
extract_conf_points Ran
ran on a synthesized input
val-iisc/lsc-cnn/utils/apply_nms.py
code served (permissive licence) · get_code("ea608e199ea71d7a")
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 tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Create small confidence maps
# confidence_map should be indexable with [0] and [1], each being a 2D array
height, width = 4, 3
confidence_map = np.array([
    np.random.rand(height, width),  # confidence_map[0]
    np.random.rand(height, width)   # confidence_map[1]
])

# Create corresponding hmap (heat map) with same structure
hmap = np.array([
    np.random.rand(height, width),  # hmap[0]
    np.random.rand(height, width)   # hmap[1]
])

ARGS = {
    "confidence_map": confidence_map,
    "hmap": hmap
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
find_game_metric Ran
ran on a synthesized input
val-iisc/lsc-cnn/utils/game.py
code served (permissive licence) · get_code("ad4f7ebb7049535f")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np
import torch

torch.manual_seed(0)

# Create small ground truth and prediction arrays
# Make them divisible by 8 to avoid resize issues
gt = np.random.randint(0, 10, size=(16, 16)).astype(np.float32)
pred = np.random.randint(0, 10, size=(16, 16)).astype(np.float32)

ARGS = {
    "gt": gt,
    "pred": pred,
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
game_metric Ran
ran on a synthesized input
val-iisc/lsc-cnn/utils/game.py
code served (permissive licence) · get_code("1ecdcad5f0e411b8")
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 float32, ndim 0, dtype family float, shape () 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 numpy as np
import torch

torch.manual_seed(0)

# The function expects:
# - level: an integer that controls grid subdivision (2^level cuts, 4^level blocks)
# - gt: a 2D numpy array (ground truth)
# - pred: a 2D numpy array (prediction), same shape as gt

# Create small test arrays with distinct dimensions for probing
level = 2
h, w = 8, 6  # Distinct dimensions: 8 and 6

# Create ground truth and prediction arrays
gt = np.random.randint(0, 10, size=(h, w)).astype(np.float32)
pred = np.random.randint(0, 10, size=(h, w)).astype(np.float32)

ARGS = {
    "level": level,
    "gt": gt,
    "pred": pred,
}
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 float32, ndim 0, dtype family float, shape () — shape () 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_filename Ran
ran; our contract draft was wrong, not the code
val-iisc/lsc-cnn/utils/logging_tools.py
code served (permissive licence) · get_code("e2dcff4d996a1569")
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) and returned str. The image it ran in was not recorded. If your copy returns the same type 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 as nn

torch.manual_seed(0)

# Analyze the function:
# get_filename(net_name, epochs_over)
# - net_name: used in string concatenation, so needs to be a string
# - epochs_over: converted to string with str(), so needs to be an int or numeric type

ARGS = {
    'net_name': 'resnet50',
    'epochs_over': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
is_square Ran
ran on a synthesized input
val-iisc/lsc-cnn/utils/nms.py
code served (permissive licence) · get_code("925f23b10b193d5d")
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 ndarray, ndim 1, dtype family float, shape (4,) 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 numpy as np

# Create small numpy arrays for testing
# inter: array of intersection values (some perfect squares, some not)
inter = np.array([4.0, 9.0, 5.0, 16.0], dtype=np.float32)

# areas: array of area values (some perfect squares, some not)
areas = np.array([1.0, 4.0, 3.0, 9.0], dtype=np.float32)

ARGS = {
    "inter": inter,
    "areas": areas
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
load_net Ran
ran on a synthesized input
val-iisc/lsc-cnn/utils/logging_tools.py
code served (permissive licence) · get_code("c0b38f026afda7d1")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 as nn
import tempfile
import os

torch.manual_seed(0)

# Create a simple neural network module
class SimpleNet(nn.Module):
    def __init__(self):
        super(SimpleNet, self).__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a temporary directory for the checkpoint file
tmpdir = tempfile.mkdtemp()

# Create a checkpoint file
net = SimpleNet()
checkpoint = {
    'state_dict': net.state_dict(),
    'epoch': 42
}
checkpoint_path = os.path.join(tmpdir, 'checkpoint.pth')
torch.save(checkpoint, checkpoint_path)

# Create a simple netfns object (can be any callable or object)
def dummy_netfns():
    pass

# Define ARGS
ARGS = {
    'networks': SimpleNet(),
    'netfns': dummy_netfns,
    'idx': 0,
    'fdir': tmpdir,
    'name': 'checkpoint.pth',
    'set_epoch': True
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
nms Ran
ran on a synthesized input
val-iisc/lsc-cnn/utils/nms.py
code served (permissive licence) · get_code("4127a61b05160f71")
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 list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Construct detections array: [x1, y1, x2, y2, score]
# Each row is [x1, y1, x2, y2, confidence_score]
dets = np.array([
    [10.0, 20.0, 50.0, 60.0, 0.9],
    [15.0, 25.0, 55.0, 65.0, 0.7],
    [100.0, 100.0, 150.0, 150.0, 0.8],
], dtype=np.float32)

# Threshold for NMS (intersection over union)
thresh = 0.3

ARGS = {
    "dets": dets,
    "thresh": thresh,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
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
upsample_single Ran
ran on a synthesized input
Vivek-23-Titan/Crowd_Detection/utils_model.py
code served (permissive licence) · get_code("c44e5d4145ceecd3")
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, 6, 6) 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 a small sparse 4D tensor (batch=2, channels=4, height=3, width=3)
# The function expects a sparse tensor with some non-zero values
input_tensor = torch.zeros(2, 4, 3, 3)
# Add some sparse values
input_tensor[0, 0, 1, 1] = 5.0
input_tensor[1, 2, 0, 2] = 3.0
input_tensor[0, 1, 2, 1] = 2.0

ARGS = {
    "input_": input_tensor,
    "factor": 2,
}
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, 6, 6) — shape (2, 4, 6, 6) 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
compute_boxes_and_sizes Not yet run
unverified (harvested, no recorded run)
Vivek-23-Titan/Crowd_Detection/utils_model.py
code served (permissive licence) · get_code("46648bce97152072")
How it ran

no invocation recorded.

get_upsample_output Not yet run
unverified (harvested, no recorded run)
Vivek-23-Titan/Crowd_Detection/utils_model.py
code served (permissive licence) · get_code("fa8bb179e519ff2e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 11 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
get_filename 1 other paper
1 later
2009.06420 (2020-09)
Completely Self-Supervised Crowd Counting via Distribution Matching

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-22.

Repositories linked to this paper

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

Abstract

We introduce a detection framework for dense crowd counting and eliminate the need for the prevalent density regression paradigm. Typical counting models predict crowd density for an image as opposed to detecting every person. These regression methods, in general, fail to localize persons accurate enough for most applications other than counting. Hence, we adopt an architecture that locates every person in the crowd, sizes the spotted heads with bounding box and then counts them. Compared to normal object or face detectors, there exist certain unique challenges in designing such a detection system. Some of them are direct consequences of the huge diversity in dense crowds along with the need to predict boxes contiguously. We solve these issues and develop our LSC-CNN model, which can reliably detect heads of people across sparse to dense crowds. LSC-CNN employs a multi-column architecture with top-down feedback processing to better resolve persons and produce refined predictions at multiple resolutions. Interestingly, the proposed training regime requires only point head annotation, but can estimate approximate size information of heads. We show that LSC-CNN not only has superior localization than existing density regressors, but outperforms in counting as well. The code for our approach is available at https://github.com/val-iisc/lsc-cnn.

For agents

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

get_harvested_code_for_paper("1906.07538")
get_code_for_paper("1906.07538")
have("1906.07538")

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

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

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

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

Connect an agent — have() is free.