SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1903.07071 · 2019

Bag of Tricks and A Strong Baseline for Deep Person Re-identification

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 (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 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/1903.07071.json · badge: /api/ran/1903.07071.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
lulujianjie/person-reid-tiny-baseline community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
FunctionStatusWhere it lives
euclidean_dist Ran
ran; our contract draft was wrong, not the code
lulujianjie/person-reid-tiny-baseline/loss/triplet_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from needylove/regression_tightness, is pointer only (licence: NONE) · get_code("c83d9f7fca950b77")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from needylove/regression_tightness, and GitHub detected no licence in that repository 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.

hard_example_mining Ran
ran on a synthesized input
lulujianjie/person-reid-tiny-baseline/loss/triplet_loss.py
code served (permissive licence) · get_code("93f2c0b80ea7f36e")
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 torch

torch.manual_seed(0)

# Create a distance matrix of shape [N, N]
# N = 4 samples
N = 4
dist_mat = torch.randn(N, N)
dist_mat = torch.abs(dist_mat)  # Make distances positive

# Create labels - we need samples grouped by class
# For hard example mining to work properly, we need multiple samples per class
# Let's have 2 classes with 2 samples each
labels = torch.LongTensor([0, 0, 1, 1])

ARGS = {
    "dist_mat": dist_mat,
    "labels": labels,
    "return_inds": 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 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
normalize Ran
ran; our contract draft was wrong, not the code
lulujianjie/person-reid-tiny-baseline/loss/triplet_loss.py
code served (permissive licence) · get_code("e3b2a83f52101f2d")
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 tensor with batch size 2 and feature dimension 4
x = torch.randn(2, 4)

ARGS = {
    "x": x,
    "axis": -1
}
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
read_image Ran
ran, honoured the contract we drafted
lulujianjie/person-reid-tiny-baseline/datasets/bases.py
code served (permissive licence) · get_code("5f1101145f896208")
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 Image. 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 tempfile
import os
from PIL import Image

# Create a temporary directory and a valid test image
temp_dir = tempfile.mkdtemp()
img_path = os.path.join(temp_dir, "test_image.jpg")

# Create a small valid RGB image and save it
test_img = Image.new('RGB', (4, 3), color=(255, 0, 0))
test_img.save(img_path)

ARGS = {
    'img_path': img_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
train_collate_fn Ran
ran on a synthesized input
lulujianjie/person-reid-tiny-baseline/datasets/make_dataloader.py
code served (permissive licence) · get_code("84d4b3637b0b4b2d")
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. 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

torch.manual_seed(0)

# Create a batch of 2 samples
# Each sample is a tuple of (img, pid, _, _)
# img should be a tensor that can be stacked
# pid should be an integer (person ID)

batch = [
    (torch.randn(3, 4, 5), 0, None, None),  # sample 1: img (3,4,5), pid 0
    (torch.randn(3, 4, 5), 1, None, None),  # sample 2: img (3,4,5), pid 1
]

ARGS = {
    "batch": batch
}
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 — 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
val_collate_fn Ran
ran on a synthesized input
lulujianjie/person-reid-tiny-baseline/datasets/make_dataloader.py
code served (permissive licence) · get_code("236a60a4db5abeb0")
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. 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

torch.manual_seed(0)

# Construct a batch of validation data
# Each item is (img, pid, camid, img_path)
batch = [
    (torch.randn(3, 4, 4), 0, 1, "path/to/img1.jpg"),
    (torch.randn(3, 4, 4), 1, 2, "path/to/img2.jpg"),
]

ARGS = {
    "batch": batch
}
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 — 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
make_dataloader Not yet run
unverified (harvested, no recorded run)
lulujianjie/person-reid-tiny-baseline/datasets/make_dataloader.py
code served (permissive licence) · get_code("618f7837c08190dd")
How it ran

no invocation recorded.

make_loss Not yet run
unverified (harvested, no recorded run)
lulujianjie/person-reid-tiny-baseline/loss/make_loss.py
code served (permissive licence) · get_code("4006e936d30ac573")
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, 6 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 6 later) and 2 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
normalize 29 other papers
4 dated earlier, 25 later
1609.01775 (2016-09)
Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking
1804.01438 (2018-04)
Learning Discriminative Features with Multiple Granularities for Person Re-Identification
1811.07130 (2018-11)
Batch DropBlock Network for Person Re-identification and Beyond
and 26 more not named here
euclidean_dist 20 other papers
1 dated earlier, 19 later · 4 only as an assembly brick
1902.09212 (2019-02)
Deep High-Resolution Representation Learning for Human Pose Estimation
1904.02998 (2019-04)
Relation-Aware Global Attention for Person Re-identification
1904.07223 (2019-04)
Joint Discriminative and Generative Learning for Person Re-identification
and 17 more not named here
read_image 10 other papers
10 later
1904.07223 (2019-04)
Joint Discriminative and Generative Learning for Person Re-identification
1905.13143 (2019-05)
Semantics-Aligned Representation Learning for Person Re-identification
1908.01114 (2019-08)
ABD-Net: Attentive but Diverse Person Re-Identification
and 7 more not named here
hard_example_mining 7 other papers
1 dated earlier, 6 later
1902.09212 (2019-02)
Deep High-Resolution Representation Learning for Human Pose Estimation
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
train_collate_fn 1 other paper
1 later
1908.10357 (2019-08)
HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation
val_collate_fn 1 other paper
1 later
1908.10357 (2019-08)
HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation

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

This paper explores a simple and efficient baseline for person re-identification (ReID). Person re-identification (ReID) with deep neural networks has made progress and achieved high performance in recent years. However, many state-of-the-arts methods design complex network structure and concatenate multi-branch features. In the literature, some effective training tricks are briefly appeared in several papers or source codes. This paper will collect and evaluate these effective training tricks in person ReID. By combining these tricks together, the model achieves 94.5% rank-1 and 85.9% mAP on Market1501 with only using global features. Our codes and models are available at https://github.com/michuanhaohao/reid-strong-baseline.

For agents

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

get_harvested_code_for_paper("1903.07071")
get_code_for_paper("1903.07071")
have("1903.07071")

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

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

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

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

Connect an agent — have() is free.