SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.06420 · 2020

Completely Self-Supervised Crowd Counting via Distribution Matching

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2009.06420.json · badge: /api/ran/2009.06420.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/css-ccnn canonical (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
FunctionStatusWhere it lives
get_cdf Ran
ran; our contract draft was wrong, not the code
val-iisc/css-ccnn/stage2_main.py
code served (permissive licence) · get_code("1d7c0206eb68bf7c")
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 mpf. 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 numpy as np
from mpmath import gammainc

torch.manual_seed(0)

# Analyze the function:
# - x: used in Lambda * x, so should be a numeric value (float or array-like)
# - alpha: used in 1 - alpha and Lambda ** (1 - alpha), so should be numeric
# - Lambda: used in Lambda * x and Lambda ** (1 - alpha), so should be numeric

# Create valid arguments
x = 2.5
alpha = 0.3
Lambda = 1.5

ARGS = {
    "x": x,
    "alpha": alpha,
    "Lambda": Lambda
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
mpmath, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type mpf — a mpf output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a mpf 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
get_filename Ran
ran; our contract draft was wrong, not the code
val-iisc/css-ccnn/stage1_main.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
test_function Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
val-iisc/css-ccnn/stage1_main.py
code served (permissive licence) · get_code("5541e7d330afda60")
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 tuple. 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 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 numpy as np

torch.manual_seed(0)

# Create a simple network that takes input and outputs 4 logits (one per rotation class)
class SimpleRotationNetwork(nn.Module):
    def __init__(self, input_dim, num_classes):
        super().__init__()
        self.fc1 = nn.Linear(input_dim, 8)
        self.fc2 = nn.Linear(8, num_classes)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create small test data
batch_size = 2
input_dim = 4
num_classes = 4

# X: batch of 2 samples, each with 4 features
X = np.random.randn(batch_size, input_dim).astype(np.float32)

# Y: batch of 2 labels, each in range [0, 3] for the 4 rotation classes
Y = np.array([0, 2], dtype=np.int64)

# Create the network
network = SimpleRotationNetwork(input_dim, num_classes)

ARGS = {
    'X': X,
    'Y': Y,
    'network': network
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 — a tuple output has no array shape of its own; none is 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
train_function Ran
ran; our contract draft was wrong, not the code
val-iisc/css-ccnn/stage1_main.py
code served (permissive licence) · get_code("fa25a8ca8991f21b")
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 tuple. 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 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 numpy as np

torch.manual_seed(0)

# Create a simple network that takes input and outputs num_rotations logits
class SimpleRotationNetwork(nn.Module):
    def __init__(self, input_dim, num_rotations):
        super(SimpleRotationNetwork, self).__init__()
        self.fc1 = nn.Linear(input_dim, 8)
        self.fc2 = nn.Linear(8, num_rotations)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create small batch data
batch_size = 2
input_dim = 4
num_rotations = 4

# Input features: batch_size x input_dim
Xs = np.random.randn(batch_size, input_dim).astype(np.float32)

# Ground truth labels: batch_size, values in [0, 1, 2, 3]
Ys = np.array([0, 2], dtype=np.int64)

# Create network
network = SimpleRotationNetwork(input_dim, num_rotations)

# Create optimizer
optimizer = torch.optim.SGD(network.parameters(), lr=0.01)

ARGS = {
    'Xs': Xs,
    'Ys': Ys,
    'network': network,
    'optimizer': optimizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 — a tuple output has no array shape of its own; none is 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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 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
get_filename 1 other paper
1 dated earlier
1906.07538 (2019-06)
Locate, Size and Count: Accurately Resolving People in Dense Crowds via Detection

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

Repositories linked to this paper

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

Abstract

Dense crowd counting is a challenging task that demands millions of head annotations for training models. Though existing self-supervised approaches could learn good representations, they require some labeled data to map these features to the end task of density estimation. We mitigate this issue with the proposed paradigm of complete self-supervision, which does not need even a single labeled image. The only input required to train, apart from a large set of unlabeled crowd images, is the approximate upper limit of the crowd count for the given dataset. Our method dwells on the idea that natural crowds follow a power law distribution, which could be leveraged to yield error signals for backpropagation. A density regressor is first pretrained with self-supervision and then the distribution of predictions is matched to the prior by optimizing Sinkhorn distance between the two. Experiments show that this results in effective learning of crowd features and delivers significant counting performance. Furthermore, we establish the superiority of our method in less data setting as well. The code and models for our approach is available at https://github.com/val-iisc/css-ccnn.

For agents

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

get_harvested_code_for_paper("2009.06420")
get_code_for_paper("2009.06420")
have("2009.06420")

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

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

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

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

Connect an agent — have() is free.