SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 136740192 · ECCV · 2022

PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification

Yousong Zhu, Ming Tang, Jinqiao Wang, Tianyi Yan, Haiyun Guo, Kuan Zhu

Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 5 no recorded run), measured 2026-11-22; 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/136740192.json · badge: /api/ran/136740192.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
CASIA-IVA-Lab/PASS-reID canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
FunctionStatusWhere it lives
cm Ran
ran; our contract draft was wrong, not the code
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/cm.py
code served (permissive licence) · get_code("10ba7332fd4a54eb")
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, 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 torch
from torch import nn, autograd

torch.manual_seed(0)

# Parameters for the cm function:
# - inputs: a tensor that will be matrix-multiplied with features.t()
# - indexes: target indices for updating features
# - features: a feature matrix that gets updated in backward
# - momentum: scalar momentum value

# Create small tensors with distinct dimensions
batch_size = 2
feature_dim = 4
num_features = 3

inputs = torch.randn(batch_size, feature_dim, requires_grad=True)
indexes = torch.tensor([0, 2], dtype=torch.long)
features = torch.randn(num_features, feature_dim, requires_grad=False)

# Normalize features as expected by the backward pass
features = features / features.norm(dim=1, keepdim=True)

momentum = 0.5

ARGS = {
    "inputs": inputs,
    "indexes": indexes,
    "features": features,
    "momentum": momentum,
}
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, 3) — shape (2, 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
cm_hard Ran
ran; our contract draft was wrong, not the code
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/cm.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lhf12278/FCM-ReID, is pointer only (licence: MIT) · get_code("f2fd62d39c9658d0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lhf12278/FCM-ReID, and MIT, as GitHub detects it on that repository, is in the permissive set, but a licence decision keeps the body a pointer: its licence file names an outside party, so it may cover vendored code rather than the repository owner's files (recorded as pointer:licence_names_third_party_corporation). 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/resnet_ibn_a.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, 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.

drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/vision_transformer.py
code served (permissive licence) · get_code("39eace7e2822504f")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 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 torch

torch.manual_seed(0)

# Create a small tensor for testing
# Shape: (batch_size=2, channels=4, height=3, width=3) - 4D tensor
x = torch.randn(2, 4, 3, 3, dtype=torch.float32)

ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": True,
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
pairwise_distance Ran
ran, honoured the contract we drafted
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/evaluators.py
code served (permissive licence) · get_code("b6d5887f94b1db25")
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, 2) 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
import numpy as np

torch.manual_seed(0)

# Case 1: query=None and gallery=None
# The function expects features to be a dict where values() returns tensors
# that can be concatenated. n = len(features), and each tensor should be viewable as a vector.
features_dict = {
    'feat_0': torch.randn(4),  # 4-dim feature vector
    'feat_1': torch.randn(4),  # 4-dim feature vector
}

# Case 2: query and gallery are provided
# They are lists of tuples where each tuple is (feature_id, ..., ...)
# The function accesses features[f] for f being the first element of each tuple
query_list = [
    ('feat_0', 'label_0', 'cam_0'),
    ('feat_1', 'label_1', 'cam_1'),
]

gallery_list = [
    ('feat_0', 'label_0', 'cam_0'),
    ('feat_1', 'label_1', 'cam_1'),
]

# For the case with query and gallery, we need features dict with the feature ids
features_dict_case2 = {
    'feat_0': torch.randn(4),
    'feat_1': torch.randn(4),
}

# Test both cases by creating two different ARGS configurations
# We'll go with case 1 (query=None, gallery=None) as the primary setup
ARGS = {
    'features': features_dict,
    'query': None,
    'gallery': None,
}
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 Tensor, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) 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
resnet101_ibn_a Ran
ran; our contract draft was wrong, not the code
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/resnet_ibn_a.py
code served (permissive licence) · get_code("c7f5d45660e6ec13")
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 ResNet. 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
import math

torch.manual_seed(0)

# Define ARGS dictionary with parameters for resnet101_ibn_a
ARGS = {
    'pretrained': False,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
resnet50_ibn_a Ran
ran; our contract draft was wrong, not the code
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/resnet_ibn_a.py
code served (permissive licence) · get_code("93cbdbc352d644d9")
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 ResNet. 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 = {
    'pretrained': False,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
build_pooling_layer Not yet run
unverified (harvested, no recorded run)
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/pooling.py
code served (permissive licence) · get_code("5c5d2f6f3c01ba6c")
How it ran

no invocation recorded.

evaluate_all Not yet run
unverified (harvested, no recorded run)
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/evaluators.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lhf12278/FCM-ReID, is pointer only (licence: MIT) · get_code("d6ebd92d96ab6af3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lhf12278/FCM-ReID, and MIT, as GitHub detects it on that repository, is in the permissive set, but a licence decision keeps the body a pointer: its licence file names an outside party, so it may cover vendored code rather than the repository owner's files (recorded as pointer:licence_names_third_party_corporation). 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.

extract_features Not yet run
unverified (harvested, no recorded run)
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/evaluators.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lhf12278/FCM-ReID, is pointer only (licence: MIT) · get_code("bb8dbdcac5e6d406")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lhf12278/FCM-ReID, and MIT, as GitHub detects it on that repository, is in the permissive set, but a licence decision keeps the body a pointer: its licence file names an outside party, so it may cover vendored code rather than the repository owner's files (recorded as pointer:licence_names_third_party_corporation). 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.

label_generator_kmeans Not yet run
unverified (harvested, no recorded run)
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/kmeans.py
code served (permissive licence) · get_code("4560dc753fea5981")
How it ran

no invocation recorded.

resize_pos_embed Not yet run
unverified (harvested, no recorded run)
CASIA-IVA-Lab/PASS-reID/PASS_cluster_contrast_reid/clustercontrast/models/vision_transformer.py
code served (permissive licence) · get_code("6ad1e6533dbae8a3")
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, 11 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 11 later) and 1 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
conv3x3 686 other papers
363 dated earlier, 234 later, 89 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
drop_path 224 other papers
18 dated earlier, 158 later, 47 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
pairwise_distance 7 other papers
2 dated earlier, 5 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 4 more not named here
cm 6 other papers
2 dated earlier, 4 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 3 more not named here
label_generator_kmeans 6 other papers
2 dated earlier, 4 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 3 more not named here
build_pooling_layer 5 other papers
2 dated earlier, 3 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 2 more not named here
resnet101_ibn_a 5 other papers
2 dated earlier, 3 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 2 more not named here
resnet50_ibn_a 5 other papers
2 dated earlier, 3 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 2 more not named here
cm_hard 3 other papers
2 dated earlier, 1 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
aaai_28092 (2024 (year only))
Catalyst for Clustering-Based Unsupervised Object Re-identification: Feature Calibration
evaluate_all 1 other paper
1 later
aaai_28092 (2024 (year only))
Catalyst for Clustering-Based Unsupervised Object Re-identification: Feature Calibration
extract_features 1 other paper
1 later
aaai_28092 (2024 (year only))
Catalyst for Clustering-Based Unsupervised Object Re-identification: Feature Calibration

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

In person re-identification (ReID), very recent researches have validated pre-training the models on unlabelled person images is much better than on ImageNet. However, these researches directly apply the existing self-supervised learning (SSL) methods designed for image classification to ReID without any adaption in the framework. These SSL methods match the outputs of local views (e.g., red T-shirt, blue shorts) to those of the global views at the same time, losing lots of details. In this paper, we propose a ReID-specific pre-training method, Part-Aware Self-Supervised pre-training (PASS), which can generate part-level features to offer fine-grained information and is more suitable for ReID. PASS divides the images into several local areas, and the local views randomly cropped from each area are assigned a specific learnable [PART] token. On the other hand, the [PART]s of all local areas are also appended to the global views. PASS learns to match the outputs of the local views and global views on the same [PART]. That is, the learned [PART] of the local views from a local area is only matched with the corresponding [PART] learned from the global views. As a result, each [PART] can focus on a specific local area of the image and extracts fine-grained information of this area. Experiments show PASS sets the new state-of-the-art performances on Market1501 and MSMT17 on various ReID tasks, e.g., vanilla ViT-S/16 pre-trained by PASS achieves 92.2%/90.2%/88.5% mAP accuracy on Market1501 for supervised/UDA/USL ReID. Our codes are available at https://github.com/CASIA-IVA-Lab/PASS-reID.

For agents

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

get_harvested_code_for_paper("136740192")
get_code_for_paper("136740192")
have("136740192")

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

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

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

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

Connect an agent — have() is free.