SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1908.01114 · 2019

ABD-Net: Attentive but Diverse Person Re-Identification

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 5 have no contract verdict; 2 failures of our instrument; 1 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/1908.01114.json · badge: /api/ran/1908.01114.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
TAMU-VITA/ABD-Net canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
hsfzxjy/dprn community (classifier label)
classifier basis: plan_row
2 ran · 0 no recorded run
FunctionStatusWhere it lives
eval_cuhk03 Ran
ran on a synthesized input
TAMU-VITA/ABD-Net/torchreid/eval_metrics.py
code served (permissive licence) · get_code("d100118814161b20")
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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small valid arguments for eval_cuhk03
num_queries = 3
num_gallery = 5
max_rank_val = 4

# Distance matrix: num_queries x num_gallery
# Small random distances
distmat = np.random.rand(num_queries, num_gallery).astype(np.float32)

# Query person IDs: num_queries
q_pids = np.array([0, 1, 0], dtype=np.int64)

# Gallery person IDs: num_gallery
g_pids = np.array([0, 1, 2, 0, 1], dtype=np.int64)

# Query camera IDs: num_queries
q_camids = np.array([0, 1, 2], dtype=np.int64)

# Gallery camera IDs: num_gallery
g_camids = np.array([0, 1, 2, 1, 0], dtype=np.int64)

# Max rank for evaluation
max_rank = max_rank_val

ARGS = {
    "distmat": distmat,
    "q_pids": q_pids,
    "g_pids": g_pids,
    "q_camids": q_camids,
    "g_camids": g_camids,
    "max_rank": max_rank,
}
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 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
eval_market1501 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TAMU-VITA/ABD-Net/torchreid/eval_metrics.py
code served (permissive licence) · get_code("acf991f06281a336")
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 numpy as np

# Create small example data for market1501 evaluation
# distmat: (num_queries, num_gallery) distance matrix
# q_pids: query person IDs
# g_pids: gallery person IDs
# q_camids: query camera IDs
# g_camids: gallery camera IDs
# max_rank: maximum rank to compute CMC

num_queries = 2
num_gallery = 5
max_rank = 3

# Distance matrix - smaller distances mean better matches
# Shape: (num_queries, num_gallery)
distmat = np.array([
    [0.1, 0.5, 0.3, 0.8, 0.9],
    [0.4, 0.2, 0.7, 0.1, 0.6]
], dtype=np.float32)

# Query person IDs - which identity each query belongs to
q_pids = np.array([0, 1], dtype=np.int32)

# Gallery person IDs - which identity each gallery image belongs to
# Some match queries (0 and 1), others don't
g_pids = np.array([0, 2, 0, 1, 3], dtype=np.int32)

# Query camera IDs - which camera each query was taken from
q_camids = np.array([0, 1], dtype=np.int32)

# Gallery camera IDs - which camera each gallery image was taken from
g_camids = np.array([0, 0, 1, 1, 2], dtype=np.int32)

ARGS = {
    'distmat': distmat,
    'q_pids': q_pids,
    'g_pids': g_pids,
    'q_camids': q_camids,
    'g_camids': g_camids,
    'max_rank': max_rank
}
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 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
evaluate_py Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TAMU-VITA/ABD-Net/torchreid/eval_metrics.py
code served (permissive licence) · get_code("6c4da11cacaff831")
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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small synthetic data for evaluation
num_queries = 2
num_gallery = 4
max_rank_val = 3

# Distance matrix: queries x gallery
# Small distances indicate similarity
distmat = np.random.rand(num_queries, num_gallery).astype(np.float32)

# Query person IDs: one ID per query image
q_pids = np.array([0, 1], dtype=np.int32)

# Gallery person IDs: can have multiple images per person
g_pids = np.array([0, 0, 1, 2], dtype=np.int32)

# Query camera IDs: which camera each query was taken from
q_camids = np.array([1, 2], dtype=np.int32)

# Gallery camera IDs: which camera each gallery image was taken from
g_camids = np.array([1, 2, 2, 1], dtype=np.int32)

# Maximum rank for CMC computation
max_rank = max_rank_val

# Use market1501 metric (False) or cuhk03 metric (True)
use_metric_cuhk03 = False

ARGS = {
    'distmat': distmat,
    'q_pids': q_pids,
    'g_pids': g_pids,
    'q_camids': q_camids,
    'g_camids': g_camids,
    'max_rank': max_rank,
    'use_metric_cuhk03': use_metric_cuhk03
}
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 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
image_dataset_kwargs Ran
ran on a synthesized input
TAMU-VITA/ABD-Net/args.py
code served (permissive licence) · get_code("5f8bea4ece1b7392")
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 dict. 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 os
from argparse import Namespace

# Create a minimal parsed_args object with all required attributes
parsed_args = Namespace(
    source_names=['source1', 'source2'],
    target_names=['target1'],
    root='/tmp/data',
    split_id=0,
    height=256,
    width=128,
    train_batch_size=32,
    test_batch_size=64,
    workers=4,
    train_sampler='RandomSampler',
    criterion='softmax',
    num_instances=4,
    cuhk03_labeled=True,
    cuhk03_classic_split=False,
    data_augment=True
)

# Build the arguments dict for the function
ARGS = {
    'parsed_args': parsed_args
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
optimizer_kwargs Ran
ran on a synthesized input
TAMU-VITA/ABD-Net/args.py
code served (permissive licence) · get_code("22c90ccd7fb0837e")
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 dict. 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 argparse

# Create a minimal argparse.Namespace object that mimics parsed command-line arguments
parsed_args = argparse.Namespace(
    optim='adam',
    lr=0.001,
    weight_decay=1e-5,
    momentum=0.9,
    sgd_dampening=0.0,
    sgd_nesterov=False,
    rmsprop_alpha=0.99,
    adam_beta1=0.9,
    adam_beta2=0.999
)

ARGS = {
    'parsed_args': parsed_args
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
read_image Ran
ran, honoured the contract we drafted
hsfzxjy/dprn/torchreid/dataset_loader.py
pointer only (licence: MIT); the stored copy get_code serves, from suntongtongtong/benchmark-robustness-text-image-compose-retrieval, is pointer only (licence: NONE) · get_code("e3cbae59cb5ed741")
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 suntongtongtong/benchmark-robustness-text-image-compose-retrieval, 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.

test_classification Ran
ran on a synthesized input
hsfzxjy/dprn/train_multi.py
code served (permissive licence) · get_code("f3c281ab55579fc0")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. 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, 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 torch.nn as nn
from collections import defaultdict

torch.manual_seed(0)

# Create a minimal model that returns the expected structure
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)
    
    def forward(self, x):
        # model(imgs)[1] should return a tuple of feature tensors
        features = self.fc(x)
        # Return (something, tuple_of_features)
        return (None, (features, features))

# Create a minimal data loader
# valloader expects tuples of (imgs, pids, _, _)
valloader = [
    (torch.randn(2, 4), torch.LongTensor([0, 1]), None, None),
    (torch.randn(2, 4), torch.LongTensor([1, 0]), None, None),
]

# Create the model
model = MinimalModel()

# Set use_gpu to False for CPU-only execution
use_gpu = False

ARGS = {
    'model': model,
    'valloader': valloader,
    'use_gpu': use_gpu,
}
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 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
video_dataset_kwargs Ran
ran on a synthesized input
TAMU-VITA/ABD-Net/args.py
code served (permissive licence) · get_code("80e8979a34588e76")
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 dict. 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 argparse

torch.manual_seed(0)

class ParsedArgs:
    def __init__(self):
        self.source_names = ['source1', 'source2']
        self.target_names = ['target1']
        self.root = '/tmp/video_dataset'
        self.split_id = 0
        self.height = 224
        self.width = 224
        self.train_batch_size = 4
        self.test_batch_size = 8
        self.workers = 2
        self.seq_len = 5
        self.sample_method = 'random'

parsed_args = ParsedArgs()

ARGS = {
    'parsed_args': parsed_args
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
accuracy Not yet run
unverified (harvested, no recorded run)
TAMU-VITA/ABD-Net/eval_acc.py
code served (permissive licence) · get_code("3df4aa63387c76b9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 2 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
read_image 10 other papers
3 dated earlier, 7 later
1903.07071 (2019-03)
Bag of Tricks and A Strong Baseline for Deep Person Re-identification
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
and 7 more not named here
eval_market1501 2 other papers
2 dated earlier
1805.09501 (2018-05)
AutoAugment: Learning Augmentation Policies from Data
1905.13143 (2019-05)
Semantics-Aligned Representation Learning for Person Re-identification
evaluate_py 2 other papers
2 dated earlier
1805.09501 (2018-05)
AutoAugment: Learning Augmentation Policies from Data
1905.13143 (2019-05)
Semantics-Aligned Representation Learning for Person Re-identification
accuracy 1 other paper
1 later
2007.13890 (2020-07)
Unsupervised Domain Adaptation in the Dissimilarity Space for Person Re-identification
eval_cuhk03 1 other paper
1 dated earlier
1905.13143 (2019-05)
Semantics-Aligned Representation Learning for Person Re-identification
optimizer_kwargs 1 other paper
1 dated earlier
1905.13143 (2019-05)
Semantics-Aligned Representation Learning for Person Re-identification

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

Attention mechanism has been shown to be effective for person re-identification (Re-ID). However, the learned attentive feature embeddings which are often not naturally diverse nor uncorrelated, will compromise the retrieval performance based on the Euclidean distance. We advocate that enforcing diversity could greatly complement the power of attention. To this end, we propose an Attentive but Diverse Network (ABD-Net), which seamlessly integrates attention modules and diversity regularization throughout the entire network, to learn features that are representative, robust, and more discriminative. Specifically, we introduce a pair of complementary attention modules, focusing on channel aggregation and position awareness, respectively. Furthermore, a new efficient form of orthogonality constraint is derived to enforce orthogonality on both hidden activations and weights. Through careful ablation studies, we verify that the proposed attentive and diverse terms each contributes to the performance gains of ABD-Net. On three popular benchmarks, ABD-Net consistently outperforms existing state-of-the-art methods.

For agents

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

get_harvested_code_for_paper("1908.01114")
get_code_for_paper("1908.01114")
have("1908.01114")

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

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

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

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

Connect an agent — have() is free.