SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1812.03282 · 2018

Spatial-Temporal Person Re-identification

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 1 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures 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/1812.03282.json · badge: /api/ran/1812.03282.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
Wanggcong/Spatial-Temporal-Re-identification canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
SurajDonthi/Multi-Camera-Person-Re-Identification community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
fliplr Ran
ran on a synthesized input
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/utils.py
code served (permissive licence) · get_code("62a123878266f279")
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, 3, 4, 5) 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

torch.manual_seed(0)

# Create a small 4D tensor for images
# Shape: (batch_size, channels, height, width) = (2, 3, 4, 5)
imgs = torch.randn(2, 3, 4, 5)

# device is optional, can be None or a torch device
device = None

ARGS = {
    "imgs": imgs,
    "device": device,
}
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, 3, 4, 5) — shape (2, 3, 4, 5) 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
gaussian_func Ran
ran, honoured the contract we drafted
Wanggcong/Spatial-Temporal-Re-identification/evaluate_st.py
code served (permissive licence) · get_code("9aaf82b893b3e9ee")
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 float, 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 math

def gaussian_func(x, u, o=50):
    if o == 0:
        print("In gaussian, o shouldn't equel to zero")
        return 0
    temp1 = 1.0 / (o * math.sqrt(2 * math.pi))
    temp2 = -math.pow(x - u, 2) / (2 * math.pow(o, 2))
    return temp1 * math.exp(temp2)

ARGS = {
    "x": 2.5,
    "u": 1.0,
    "o": 50
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
gaussian_func Ran
ran on a synthesized input
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/metrics.py
code served (permissive licence) · get_code("e81948c93f987807")
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 math
import numpy as np

# Construct valid arguments for gaussian_func
x = np.array([0.5, 1.5, 2.0, 2.5])
mu = 1.0
std = 0.5

ARGS = {
    "x": x,
    "mu": mu,
    "std": std
}
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
gaussian_kernel Ran
ran on a synthesized input
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/metrics.py
code served (permissive licence) · get_code("fcbb1dec4242c64e")
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 (5, 5) 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 math
import numpy as np

ARGS = {
    'length': 5,
    'mu': 0,
    'std': 50
}
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 (5, 5) — shape (5, 5) 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_ids Ran
ran on a synthesized input
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/utils.py
code served (permissive licence) · get_code("b710451e7a124eee")
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.

from pathlib import Path

# Create mock image paths with .stem attribute
class MockPath:
    def __init__(self, stem):
        self.stem = stem

# Construct valid arguments for the function
img_paths = [
    MockPath("0001_c1s1_001051_00.jpg"),
    MockPath("0002_c2s2_002100_01.jpg"),
    MockPath("0003_c3s3_003200_02.jpg"),
]

dataset = 'market'

ARGS = {
    'img_paths': img_paths,
    'dataset': dataset,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
k_reciprocal_neigh Ran
ran on a synthesized input
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/re_ranking.py
code served (permissive licence) · get_code("a610e67edff490e6")
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 int, shape (3,) 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 initial_rank matrix
# The function indexes into this with [i, :k1+1] and [forward_k_neigh_index, :k1+1]
# So we need enough rows and columns
initial_rank = np.array([
    [0, 1, 2, 3, 4],
    [1, 0, 3, 2, 4],
    [2, 3, 0, 1, 4],
    [3, 2, 1, 0, 4],
    [4, 0, 1, 2, 3]
], dtype=np.int64)

# i is an index into the first dimension of initial_rank
i = 0

# k1 is used to slice the rank matrix up to k1+1
k1 = 2

ARGS = {
    "initial_rank": initial_rank,
    "i": i,
    "k1": k1
}
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 int, shape (3,) — shape (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
l2_norm_standardize Ran
ran on a synthesized input
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/utils.py
code served (permissive licence) · get_code("35165ce30e80c6e9")
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. 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 feature tensor
# Shape: (batch_size=2, feature_dim=4)
# The function expects a tensor with at least 2 dimensions
# It computes L2 norm along dim=1 and divides each sample by its norm
features = torch.randn(2, 4)

ARGS = {
    "features": features
}
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 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
st_distribution Ran
ran on a synthesized input
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/metrics.py
code served (permissive licence) · get_code("4cea3854ac12c460")
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 3, dtype family float, shape (3, 3, 3000) 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

# Construct valid arguments for st_distribution
# The function tracks targets across cameras and frames, computing
# spatial-temporal distributions

# Create sample data:
# - camera_ids: camera identifier for each detection (1-indexed)
# - targets: target/class id for each detection
# - frames: frame number for each detection

num_detections = 20
num_cameras = 3
num_classes = 2

# Generate camera IDs (1-indexed, ranging from 1 to num_cameras)
camera_ids = np.array([1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 
                        2, 3, 1, 2, 3, 1, 2, 3, 1, 2], dtype=np.int32)

# Generate target/class IDs (0-indexed, ranging from 0 to num_classes-1)
targets = np.array([0, 0, 1, 1, 0, 0, 1, 1, 0, 0,
                     1, 1, 0, 0, 1, 1, 0, 0, 1, 1], dtype=np.int32)

# Generate frame numbers
frames = np.array([10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
                    110, 120, 130, 140, 150, 160, 170, 180, 190, 200], dtype=np.float64)

ARGS = {
    'camera_ids': camera_ids,
    'targets': targets,
    'frames': frames,
    'max_hist': 3000,
    'eps': 1e-07,
    'interval': 100.0
}
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 3, dtype family float, shape (3, 3, 3000) — shape (3, 3, 3000) 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_mAP Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from wtyhub/MuseNet
pointer only · get_code("3f91b09177ddeb33")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. No invocation recorded.

re_ranking Not yet run
unverified (harvested, no recorded run)
SurajDonthi/Multi-Camera-Person-Re-Identification/mtmct_reid/re_ranking.py
code served (permissive licence) · get_code("de28f231b0f30f5d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 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.

FunctionAlso present inEarliest-datedOthers named
compute_mAP 7 other papers
1 dated earlier, 6 later
1711.10295 (2017-11)
Camera Style Adaptation for Person Re-identification
1904.07223 (2019-04)
Joint Discriminative and Generative Learning for Person Re-identification
2001.04193 (2020-01)
Deep Learning for Person Re-identification: A Survey and Outlook
and 4 more not named here
k_reciprocal_neigh 5 other papers
3 dated earlier, 2 later
1804.01438 (2018-04)
Learning Discriminative Features with Multiple Granularities for Person Re-Identification
1805.09501 (2018-05)
AutoAugment: Learning Augmentation Policies from Data
1811.07130 (2018-11)
Batch DropBlock Network for Person Re-identification and Beyond
and 2 more not named here

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

Most of current person re-identification (ReID) methods neglect a spatial-temporal constraint. Given a query image, conventional methods compute the feature distances between the query image and all the gallery images and return a similarity ranked table. When the gallery database is very large in practice, these approaches fail to obtain a good performance due to appearance ambiguity across different camera views. In this paper, we propose a novel two-stream spatial-temporal person ReID (st-ReID) framework that mines both visual semantic information and spatial-temporal information. To this end, a joint similarity metric with Logistic Smoothing (LS) is introduced to integrate two kinds of heterogeneous information into a unified framework. To approximate a complex spatial-temporal probability distribution, we develop a fast Histogram-Parzen (HP) method. With the help of the spatial-temporal constraint, the st-ReID model eliminates lots of irrelevant images and thus narrows the gallery database. Without bells and whistles, our st-ReID method achieves rank-1 accuracy of 98.1\% on Market-1501 and 94.4\% on DukeMTMC-reID, improving from the baselines 91.2\% and 83.8\%, respectively, outperforming all previous state-of-the-art methods by a large margin.

For agents

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

get_harvested_code_for_paper("1812.03282")
get_code_for_paper("1812.03282")
have("1812.03282")

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

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

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

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

Connect an agent — have() is free.