Papers › Learning Discriminative Features with Multiple Granularities for Person Re-Identification

Learning Discriminative Features with Multiple Granularities for Person Re-Identification

4 Apr 2018arXiv:1804.01438archive 2025-07-28

Guanshuo Wang, Yufeng Yuan, Xiong Chen, Jiwei Li, Xi Zhou

The combination of global and partial features has been an essential solution to improve discriminative performances in person re-identification (Re-ID) tasks. Previous part-based methods mainly focus on locating regions with specific pre-defined semantics to learn local representations, which increases learning difficulty but not efficient or robust to scenarios with large variances. In this paper, we propose an end-to-end feature learning strategy integrating discriminative information with various granularities. We carefully design the Multiple Granularity Network (MGN), a multi-branch deep network architecture consisting of one branch for global feature representations and two branches for local feature representations. Instead of learning on semantic regions, we uniformly partition the images into several stripes, and vary the number of parts in different local branches to obtain local feature representations with multiple granularities. Comprehensive experiments implemented on the mainstream evaluation datasets including Market-1501, DukeMTMC-reid and CUHK03 indicate that our method has robustly achieved state-of-the-art performances and outperformed any existing approaches by a large margin. For example, on Market-1501 dataset in single query mode, we achieve a state-of-the-art result of Rank-1/mAP=96.6%/94.2% after re-ranking.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 30 code samples harvested from 5 repositories linked to this paper: 25 ran (of which 0 constructed an object rather than computing a result; 21 with no instrument failure: 0 honoured, 0 violated, 21 with no contract checked; 4 where Syntology's instrument failed) · 5 unverified. Where Syntology's instrument failed: 4 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 30 samples from 5 repositories, 25 ran (21 with no instrument failure; 4 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

16 repositories listed; official and paper-mentioned ones first.

CoinCheung/SphereReID mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
GNAYUOHZ/ReID-MGN mentioned on GitHubpytorchSyntology: not harvested report
LcenArthas/Kaggle-Humpback-Whale-Identification mentioned on GitHubpytorchGPL-3.0Syntology: not harvested report
WangTaoAs/MGN_ReID mentioned on GitHubpytorchApache-2.0Syntology: 9 samples, 7 ran (3 instrument-failed) · 2 unverified report
ZJULearning/PTL mentioned on GitHubpytorchMITSyntology: 4 samples, 4 ran (0 instrument-failed) · 0 unverified report
hugh67/reid-MGN-pytorch mentioned on GitHubpytorchSyntology: not harvested report
joehammer934/MGN-ReId mentioned on GitHubtfSyntology: not harvested report
kilsenp/triplet-reid-pytorch mentioned on GitHubpytorchMITSyntology: 15 samples, 12 ran (0 instrument-failed) · 3 unverified report
seathiefwang/MGN-pytorch mentioned on GitHubpytorchSyntology: not harvested report
wang-tf/MGN-tf mentioned on GitHubtfSyntology: not harvested report
xr-Yang/MGN-Pytorch mentioned on GitHubpytorchSyntology: not harvested report
youwenjing/reid_mgn-dgnet mentioned on GitHubpytorchSyntology: not harvested report
zp1018/ReID-MGN mentioned on GitHubpytorchMITSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
Mind23-2/MindCode-101 mindsporeSyntology: not harvested report
code-implementation1/Code5 mindsporeSyntology: not harvested report
kingcong/models mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Image Patch is a Wave: Phase-Aware Vision MLP (arXiv:2111.12294; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 1 violated, 2 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

30 samples harvested: 25 ran (of which 0 constructed an object rather than computing a result; 21 with no instrument failure: 0 honoured, 0 violated, 21 with no contract checked; 4 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

4ran · our draft was wrong
21ran
5unverified

Licence: 2 of the 30 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

CoinCheung/SphereReID community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
evaluate in 514 papers evaluate.py ran · our draft was wrong MIT (permissive) · 14ce86adfcabf648 · report fixture: signature embd_res:tuple/1/ndarray, cmc_max_rank:int/0/int · returned tuple · level recorded 2026-09-22
WangTaoAs/MGN_ReID community (archive-listed) 9 samples, 7 ran (3 instrument-failed) · 2 unverified
cosine_dist in 25 papers loss/triplet_loss.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · 71b4e1d375d8fd78 · report fixture: signature x:Tensor/2/float, y:Tensor/2/float · returned Tensor · level recorded 2026-09-25
euclidean_dist in 69 papers
census: 12 implementations from 14 papers, 3 distinct outputs on one shared input
loss/triplet_loss.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · 5315f75bf5367f0a · report fixture: signature x:Tensor/2/float, y:Tensor/2/float · returned Tensor · level recorded 2026-09-25
euclidean_distance in 29 papers utils/metrics.py ran fingerprinted Apache-2.0 (permissive) · 93f3ef4f748bb19f · report fixture: signature qf:Tensor/2/float, gf:Tensor/2/float · returned ndarray · level recorded 2026-09-26
eval_func utils/metrics.py ran fingerprinted Apache-2.0 (permissive) · 684ff63ea266cf09 · report fixture: signature distmat:ndarray/2/float, q_pids:ndarray/1/int, g_pids:ndarray/1/int, q_camids:ndarray/1/int, g_camids:ndarray/1/int, max_rank:int/0/int · returned tuple · level recorded 2026-09-26
make_optimizer in 32 papers processor/make_optimizer.py ran Apache-2.0 (permissive) · 6e544671b85f034f · report fixture: signature args:Args/0/?, model:callable/0/? · returned Adam · level recorded 2026-09-26
make_scheduler in 9 papers processor/make_optimizer.py ran Apache-2.0 (permissive) · 348c97f2f7dfc317 · report fixture: signature args:Args/0/?, optimizer:SGD/0/? · returned StepLR · level recorded 2026-09-26
normalize in 638 papers
census: 70 implementations from 82 papers, 51 distinct outputs across 11 buckets, one shared input per bucket this sample: bucket 1 of 11, arg 1: rank 2, kind float, dtype float32
loss/triplet_loss.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · e3b2a83f52101f2d · report fixture: signature x:Tensor/2/float, axis:int/0/int · returned Tensor · level recorded 2026-09-22
make_loss in 17 papers loss/make_loss.py unverified Apache-2.0 (permissive) · 78f5737686a6d6fd · report
make_model in 37 papers model/build_model.py unverified Apache-2.0 (permissive) · c656b5d8b9ddaf71 · report
ZJULearning/PTL community (archive-listed) 4 samples, 4 ran (0 instrument-failed) · 0 unverified
cmc in 6 papers functions.py ran MIT (permissive) · d829b83e56e02c65 · report fixture: signature distmat:ndarray/2/float, query_ids:ndarray/1/int, gallery_ids:ndarray/1/int, query_cams:ndarray/1/int, gallery_cams:ndarray/1/int, topk:int/0/int, separate_camera_set:bool/0/bool, single_gallery_shot:bool/0/bool, first_match_break:bool/0/bool · returned ndarray · level recorded 2026-09-26
k_reciprocal_neigh in 6 papers functions.py ran MIT (permissive) · a610e67edff490e6 · report fixture: signature initial_rank:ndarray/2/int, i:int/0/int, k1:int/0/int · returned ndarray · level recorded 2026-09-24
list_pictures data.py ran MIT (permissive) · eb053124052a3cd2 · report fixture: signature directory:str/0/str, ext:str/0/str · returned list · level recorded 2026-09-26
mean_ap functions.py ran MIT (permissive) · ade5a37f8a900999 · report fixture: signature distmat:ndarray/2/float, query_ids:ndarray/1/int, gallery_ids:ndarray/1/int, query_cams:ndarray/1/int, gallery_cams:ndarray/1/int · returned float64 · level recorded 2026-09-26
kilsenp/triplet-reid-pytorch community (archive-listed) 15 samples, 12 ran (0 instrument-failed) · 3 unverified
batch_hard triplet_loss.py ran MIT (permissive) · 2fa6cc6f02a35ebc · report fixture: signature cdist:Tensor/2/float, pids:Tensor/1/int, margin:float/0/float · returned Tensor · level recorded 2026-09-26
calc_cdist triplet_loss.py ran MIT (permissive) · e48e75619dc39f15 · report fixture: signature a:Tensor/2/float, b:Tensor/2/float, metric:str/0/str · returned Tensor · level recorded 2026-09-26
clean_dict embed.py ran MIT (permissive) · 2a170d2b7c7dddc3 · report fixture: signature dic:dict/0/? · returned dict · level recorded 2026-09-26
create_pids2idxs triplet_sampler.py ran MIT (permissive) · a1d570b6c43c23c8 · report fixture: signature data_source:MockDataSource/0/? · returned dict · level recorded 2026-09-26
extract_csv_name embed.py ran fingerprinted MIT (permissive) · bed67b8223c2839d · report fixture: signature csv_file:str/0/str · returned str · level recorded 2026-09-26
get_data_shape logger.py ran MIT (permissive) · b483a25cae0194a3 · report fixture: signature data:Tensor/2/float · returned Size · level recorded 2026-09-26
get_last_file_number logger.py ran MIT (permissive) · 0f69b32d83075cfd · report fixture: signature base_name:str/0/str, path:str/0/str · returned int · level recorded 2026-09-26
get_new_numeric_name logger.py ran MIT (permissive) · 2ac5011790ab78b8 · report fixture: signature base_name:str/0/str, path:str/0/str · returned str · level recorded 2026-09-26
make_dataset_default csv_dataset.py ran MIT (permissive) · c928647a92245df7 · report fixture: signature csv_file:str/0/str, data_dir:str/0/str, limit:NoneType/0/? · returned tuple · level recorded 2026-09-26
make_dilated_layer4 models/dilated.py ran MIT (permissive) · 843e31edd4b97817 · report fixture: signature block:callable/0/?, planes:int/0/int, blocks:int/0/int · returned Sequential · level recorded 2026-09-26
pil_loader in 144 papers csv_dataset.py ran MIT (permissive) · adea188f95a2367b · report fixture: signature path:str/0/str, row:int/0/int · returned Image · level recorded 2026-09-26
pil_loader_with_crop csv_dataset.py ran MIT (permissive) · 1fef0055e4652d03 · report fixture: signature path:str/0/str, row:dict/0/? · returned Image · level recorded 2026-09-26
batch_soft triplet_loss.py unverified MIT (permissive) · f29fa18ca4edab98 · report
import_from_path models/utils.py unverified MIT (permissive) · caf4525e66901338 · report
write_to_h5 embed.py unverified MIT (permissive) · 36e1ac6f83dcf494 · report
zp1018/ReID-MGN community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
list_pictures mgn/market1501.py ran fingerprinted MIT (permissive) · 593b08055f5a5011 · report fixture: signature directory:str/0/str, ext:str/0/str · returned list · level recorded 2026-09-26

Tasks

Person Re-IdentificationRe-Ranking

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Person Re-Identification CUHK03 detected MGN (ACM MM'18) MAP 66.0 #11 of 19 Archive leaderboard report
Person Re-Identification CUHK03 detected MGN (ACM MM'18) Rank-1 68.0 #11 of 19 Archive leaderboard report
Person Re-Identification CUHK03 labeled MGN (ACM MM'18) MAP 67.4 #13 of 21 Archive leaderboard report
Person Re-Identification CUHK03 labeled MGN (ACM MM'18) Rank-1 68.0 #13 of 21 Archive leaderboard report
Person Re-Identification DukeMTMC-reID MGN Rank-1 88.7 #54 of 94 Archive leaderboard report
Person Re-Identification DukeMTMC-reID MGN mAP 78.4 #54 of 94 Archive leaderboard report
Person Re-Identification Market-1501 MGN Rank-1 95.7 #47 of 135 Archive leaderboard report
Person Re-Identification Market-1501 MGN mAP 86.9 #47 of 135 Archive leaderboard report
Person Re-Identification Market-1501-C MGN Rank-1 29.56 #16 of 22 Archive leaderboard report
Person Re-Identification Market-1501-C MGN mAP 9.72 #16 of 22 Archive leaderboard report
Person Re-Identification Market-1501-C MGN mINP 0.29 #16 of 22 Archive leaderboard report
Person Re-Identification SYSU-30k MGN (generalization) Rank-1 23.6 #3 of 10 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections