SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.13814 · ICCV · 2023

Point-Query Quadtree for Crowd Counting, Localization, and More

Hao Lu, Tongliang Liu, Zhiguo Cao, Chengxin Liu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 2 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/2308.13814.json · badge: /api/ran/2308.13814.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
cxliu0/PET community
Papers with Code archive
6 ran · 2 no recorded run
FunctionStatusWhere it lives
BasePETCount Ran
ran on a synthesized input · constructed an object; no result was computed
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("a9f4e138ebddad54")
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 an instance of its own class, BasePETCount: the run constructed the object and did not call it, so no result was computed. 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 torch.nn.functional as F

torch.manual_seed(0)

# Define a minimal backbone model
class MinimalBackbone(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(3, 256, kernel_size=3, padding=1)
    
    def forward(self, x):
        return self.conv(x)

# Define a minimal transformer
class MinimalTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(256, 256)
    
    def forward(self, x):
        return self.linear(x)

# Define a minimal args object
class Args:
    def __init__(self):
        self.hidden_dim = 256
        self.sparse_stride = 8
        self.dense_stride = 4

# Create instances
backbone = MinimalBackbone()
transformer = MinimalTransformer()
args = Args()

ARGS = {
    'backbone': backbone,
    'num_classes': 10,
    'quadtree_layer': 'sparse',
    'args': args,
    'transformer': transformer,
}
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 BasePETCount — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BasePETCount 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("1196d90bafe96f42")
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 an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "input_dim": 4,
    "hidden_dim": 8,
    "output_dim": 3,
    "num_layers": 3,
    "is_reduce": False,
    "use_relu": 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 MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP 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
PositionEmbeddingFourier Ran
ran on a synthesized input · constructed an object; no result was computed
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("5c6ae0d9339c3cdb")
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 an instance of its own class, PositionEmbeddingFourier: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn
import math

torch.manual_seed(0)

class NestedTensor(object):
    def __init__(self, tensors, mask: torch.Tensor = None):
        self.tensors = tensors
        self.mask = mask

    def to(self, device):
        cast_tensor = self.tensors.to(device)
        mask = self.mask
        if mask is not None:
            cast_mask = mask.to(device)
        else:
            cast_mask = None
        return NestedTensor(cast_tensor, cast_mask)

    def decompose(self):
        return (self.tensors, self.mask)

    def __repr__(self):
        return str(self.tensors)

# Create minimal valid inputs
batch_size = 2
height = 4
width = 3
channels = 8

# Create dummy image tensor (batch_size, channels, height, width)
x = torch.randn(batch_size, channels, height, width)

# Create mask tensor (batch_size, height, width) - False where valid, True where padded
mask = torch.zeros(batch_size, height, width, dtype=torch.bool)

# Create NestedTensor
tensor_list = NestedTensor(x, mask)

# Arguments for PositionEmbeddingFourier
ARGS = {
    'num_pos_feats': 128,
    'temperature': 10000,
    'normalize': False,
    'scale': None,
    'd_in': 1,
    'gauss_scale': 0.5
}
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 PositionEmbeddingFourier — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PositionEmbeddingFourier 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
PositionEmbeddingSine Ran
ran on a synthesized input · constructed an object; no result was computed
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("6cf4af72cee273fc")
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 an instance of its own class, PositionEmbeddingSine: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn
from typing import Optional
import math

torch.manual_seed(0)

class NestedTensor(object):
    def __init__(self, tensors, mask: Optional[torch.Tensor]):
        self.tensors = tensors
        self.mask = mask

    def to(self, device):
        cast_tensor = self.tensors.to(device)
        mask = self.mask
        if mask is not None:
            assert mask is not None
            cast_mask = mask.to(device)
        else:
            cast_mask = None
        return NestedTensor(cast_tensor, cast_mask)

    def decompose(self):
        return (self.tensors, self.mask)

    def __repr__(self):
        return str(self.tensors)

# Create a NestedTensor input
batch_size = 2
height = 4
width = 3
channels = 8

# Tensors: (batch, channels, height, width)
tensors = torch.randn(batch_size, channels, height, width)

# Mask: (batch, height, width) - True for padded positions, False for valid
mask = torch.zeros(batch_size, height, width, dtype=torch.bool)
mask[0, 3, :] = True  # Pad last row of first batch
mask[1, 2:, :] = True  # Pad last 2 rows of second batch

nested_tensor_input = NestedTensor(tensors, mask)

ARGS = {
    'num_pos_feats': 128,
    'temperature': 10000,
    'normalize': False,
    'scale': None,
}
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 PositionEmbeddingSine — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PositionEmbeddingSine 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
_max_by_axis_pad Ran
ran, honoured the contract we drafted
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("1913326686611a1a")
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 torch

torch.manual_seed(0)

# Analyzing the function:
# - _max_by_axis_pad takes `the_list` as parameter
# - the_list is indexed with [0] and iterated over [1:]
# - Each element (sublist) is iterable with enumerate
# - Each item in sublist supports max() comparison
# - Indices 1 and 2 of maxes are accessed and modified
# So the_list needs to be a list of lists where each sublist has at least 3 numeric elements

the_list = [
    [10, 100, 200],
    [5, 150, 180],
    [8, 120, 250]
]

ARGS = {
    "the_list": the_list
}
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 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
nested_tensor_from_tensor_list Ran
ran; our contract draft was wrong, not the code
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("59c5d55512e01869")
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 NestedTensor. 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
from typing import List
from torch import Tensor

torch.manual_seed(0)

# Create a list of 3D tensors with different sizes
# Shape: (channels, height, width) with distinct dimensions
tensor1 = torch.randn(3, 4, 5)  # 3 channels, 4 height, 5 width
tensor2 = torch.randn(3, 6, 7)  # 3 channels, 6 height, 7 width

tensor_list = [tensor1, tensor2]

ARGS = {
    "tensor_list": tensor_list,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NestedTensor — a NestedTensor output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NestedTensor 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
PET Not yet run
unverified (harvested, no recorded run)
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("09f51e55cb78fd40")
How it ran

no invocation recorded.

build_position_encoding Not yet run
unverified (harvested, no recorded run)
cxliu0/PET/models/pet.py
code served (permissive licence) · get_code("f57a0aab388112d0")
How it ran

no invocation 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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 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.

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

We show that crowd counting can be viewed as a decomposable point querying process. This formulation enables arbitrary points as input and jointly reasons whether the points are crowd and where they locate. The querying processing, however, raises an underlying problem on the number of necessary querying points. Too few imply underestimation; too many increase computational overhead. To address this dilemma, we introduce a decomposable structure, i.e., the point-query quadtree, and propose a new counting model, termed Point quEry Transformer (PET). PET implements decomposable point querying via data-dependent quadtree splitting, where each querying point could split into four new points when necessary, thus enabling dynamic processing of sparse and dense regions. Such a querying process yields an intuitive, universal modeling of crowd as both the input and output are interpretable and steerable. We demonstrate the applications of PET on a number of crowd-related tasks, including fully-supervised crowd counting and localization, partial annotation learning, and point annotation refinement, and also report stateof-the-art performance. For the first time, we show that a single counting model can address multiple crowd-related tasks across different learning paradigms. Code is available at https://github.com/cxliu0/PET. CNN Progressive Encoder Attention Point-Query Quadtree Quadtree Splitter Sparse Querying Points CNN Backbone Object Querying Prediction Head no split no split split split Crowd Prediction prob, loc prob, loc no person prob, loc no person prob, loc prob, loc no person candidate points decoded point queries no person no person ℱ Rectangle-Window Attention Decoding Within Rectangle Window

For agents

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

get_harvested_code_for_paper("2308.13814")
get_code_for_paper("2308.13814")
have("2308.13814")

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

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

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

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

Connect an agent — have() is free.