Recognition & Detection

Person Re-Identification

Finding the images of one person across cameras whose views do not overlap; hand-crafted colour and texture features with learned metrics (ELF, LOMO and XQDA, KISSME), deep identity embeddings, part-based and attention models, triplet losses, the strong baseline and k-reciprocal re-ranking, with the Market-1501, DukeMTMC-reID, CUHK03 and MSMT17 protocols, CMC and mAP, and the withdrawal of DukeMTMC.

intermediate

Person re-identification (re-ID) finds the images of one person among images taken by other cameras. Given a query (or probe) image of a pedestrian, a system ranks a gallery of pedestrian images from other cameras, usually with non-overlapping fields of view, so that images of the same person come first. Zheng et al. (2015) framed it as “a special task of image search”: the query is a person, the database is a set of detected people, and the answer is a ranked list. The same person can look very different in two cameras because of viewpoint, pose, lighting, resolution and occlusion, while different people in similar clothes can look almost the same; and the people seen at test time are never the people seen in training.

Re-identification sits between pedestrian detection, which supplies the bounding boxes, and multi-object tracking, which uses re-identification embeddings to recover identities after occlusion. Its methods are those of metric learning and image retrieval specialised to whole-body images: from colour histograms in horizontal stripes compared by learned Mahalanobis metrics, to convolutional networks trained to classify the training identities, part-based and attention models, and transformers, often followed by a re-ranking step.

Problem Definition

A re-identification model maps an image xx of a cropped person to a descriptor f(x)f(x), and a distance dd ranks the gallery G={g1,…,gN}\mathcal{G} = \{g_1, \dots, g_N\} for each query qq by d(f(q),f(gi))d(f(q), f(g_i)). Training uses images of a set of identities; testing uses a disjoint set, so the problem is open-set in the sense of metric learning: the descriptor must separate people it has never seen, and a classifier over the training identities is useful only as a way of learning the descriptor.

Several terms describe the protocol:

  • Cross-camera search. A gallery image counts as a correct match only if it shows the query’s identity and comes from a different camera. In Market-1501, images of the query identity from the query’s own camera are treated as “junk” and have no influence on the score (Zheng et al., 2015).
  • Single-shot and multi-shot. In the older two-camera benchmarks each identity has one image (single-shot) or several (multi-shot) per camera in the gallery. The official page of the CUHK datasets (CUHK01–CUHK03) describes their CMC computation as sampling one gallery image per identity, using all images of the other view as probes, and averaging over 100 repetitions.
  • Single-query and multi-query. In Market-1501 an identity can have one query image per camera; methods can search with each query alone (single-query) or pool the queries of one identity in a camera (multi-query, which Zheng et al. did by average or max pooling).
  • Closed and open world. Most benchmarks guarantee that every query has at least one match in the gallery. Distractors relax this partly: Market-1501 adds false-alarm detections and an optional set of more than 500,000 further images, DukeMTMC-reID adds identities seen by only one camera.

Re-identification is related to face recognition and to the identification task of biometric recognition systems, but it works from the whole body, often at low resolution. The benchmarks below were recorded over periods from 85-minute videos (DukeMTMC) to four days in one month (MSMT17) and months (CUHK03), and the methods rely heavily on clothing colour.

Input and Output

The input is a set of cropped pedestrian images, typically resized to a fixed aspect ratio of about 2:1 or 3:1: 128 × 48 pixels for LOMO (Liao et al., 2015), 128 × 64 for the Market-1501 descriptor of Zheng et al. (2015), 256 × 128 in the strong baseline of Luo et al. (2019) and 384 × 128 in PCB (Sun et al., 2018). The crops come from hand-drawn boxes in the early datasets and from a detector in the later ones: the Deformable Part Model in CUHK03 and Market-1501, Faster R-CNN in MSMT17. The output is a ranked gallery list for each query, or equivalently a query–gallery distance matrix; the benchmarks score the ranks of the true matches.

Variants

  • Video re-identification matches tracklets, sequences of crops of one person, rather than single images. MARS, as Zhong et al. (2017) describe it, has 1,261 identities and about 20,000 sequences from six cameras, obtained automatically with a DPM detector and the GMMCP tracker, with 3,248 distractor sequences and a fixed split of 631 training and 630 test identities.
  • Person search (end-to-end re-identification) starts from whole frames: the system detects the people and ranks the detections. On PRW, Zhong et al. ran DPM on the raw frames and counted a detection as correct if its IoU with the ground-truth box exceeded 0.5.
  • Unsupervised and domain-adaptive re-identification train without identity labels on the target data, either with no labels at all or with a labelled source dataset and an unlabelled target dataset. Models trained on one dataset often fail on another (Deng et al., 2018; Wei et al., 2018).
  • Vehicle re-identification applies the same formulation to vehicles, whose identity cannot always be read from the licence plate. Liu et al. (2016) introduced the VehicleID dataset of images of about 26,000 vehicles, captured by real-world surveillance cameras in a city, with a two-branch network trained by a coupled cluster loss. VeRi-776, as He et al. (2021) list it, has 776 vehicles in 49,357 images from 20 cameras with 8 viewpoint labels.
  • Occluded re-identification evaluates on queries with heavy occlusion, for example the Occluded-Duke set used by He et al. (2021).

Challenges

  • Viewpoint and pose. A person seen from the front by one camera may be seen from the back by another (Liao et al., 2015), and pose changes the silhouette. Liao et al. designed LOMO’s maximum over horizontal windows to tolerate viewpoint changes.
  • Illumination and camera response. Lighting and camera settings differ between cameras, so the perceived colours of the same person can vary greatly (Liao et al., 2015). Liao et al. applied a multiscale Retinex transform before computing colour histograms, and on VIPeR this raised the rank-1 rate of cosine matching on LOMO from 12.97% to 20.25%.
  • Detection errors. Detected boxes are misaligned, cut off parts of the body or contain background. Market-1501 kept DPM boxes as the gallery for this reason and labelled poorly overlapping boxes as distractors or junk (Zheng et al., 2015).
  • Similar clothing. Different people can wear the same colours; Zheng et al. (2015) show three individuals with very similar appearance among their Market-1501 samples.
  • Scale of the gallery. Accuracy drops as the gallery grows. On Market-1501 with the 500,000 distractors, the mAP of their bag-of-words method with multiple queries fell to 10.92% with approximate nearest-neighbour search, a relative drop of 69.7% from the original gallery (Zheng et al., 2015).
  • Domain shift. A model tuned to one camera network transfers poorly to another. Luo et al. (2019) trained their strong baseline on Market-1501 and tested it on DukeMTMC-reID: rank-1 accuracy was 27.5% with all their tricks, against 86.4% when trained on DukeMTMC-reID itself.

Approaches

Hand-crafted features

Early methods described a pedestrian with colour and texture statistics pooled over horizontal stripes. Liao et al. (2015) credit such stripe histograms with success in viewpoint-invariant description, at the cost of the spatial detail within each stripe. Gray and Tao (2008) proposed the ensemble of localized features (ELF), which, as Liao et al. (2015) describe it, used AdaBoost to select good features from a set of colour and texture features; Sun et al. (2018) describe the same work as partitioning pedestrians into horizontal stripes. A common re-implementation, ELF6, computes histograms in six equal horizontal stripes over eight colour channels (RGB, HSV and YCbCr) and 21 texture filters (8 Gabor and 13 Schmid filters), according to Liao et al. Other descriptors of the period include SDALF, which exploits the symmetry and asymmetry of the body, and Fisher vectors of local descriptors (Liao et al., 2015; Zheng et al., 2015).

Zheng et al. (2015) treated re-identification as image search with a bag of visual words: Color Names descriptors of 4 × 4 patches on a 128 × 64 image, quantised against a codebook with multiple assignment, weighted by TF-IDF, pooled per horizontal stripe and compared by dot product. On Market-1501 their full system with weak geometric constraints, a Gaussian background mask, multiple queries and re-ranking reached 42.64% rank-1 and 19.47% mAP.

The local maximal occurrence descriptor (LOMO) of Liao et al. (2015) slides a 10 × 10 window with a step of 5 pixels over a 128 × 48 image, computes in each window an 8 × 8 × 8-bin joint HSV histogram (after Retinex) and two scales of the SILTP texture operator, and keeps, for every bin, the maximum over all windows at the same height. Repeating this on a three-level image pyramid gives a 26,960-dimensional descriptor, which is log-transformed and normalised.

Metric learning on hand-crafted features

Fixed features are combined with a distance learned from the training identities. Many of the general methods in metric learning, such as LMNN and ITML, were applied to re-identification; two that were applied to re-identification from the start are KISSME and XQDA.

KISSME (Köstinger et al., 2012). The KISSME paper could not be read for this article, so the description follows Liao et al. (2015), who present it beside the earlier Bayesian face method of Moghaddam et al. For a pair of images write the difference Δ=xi−xj\Delta = x_i - x_j. Pairs of the same person form the intrapersonal class ΩI\Omega_I, pairs of different people the extrapersonal class ΩE\Omega_E; both are modelled as zero-mean Gaussians with covariances ΣI\Sigma_I and ΣE\Sigma_E. The log-likelihood ratio of the two classes reduces to

d(xi,xj)=(xi−xj)⊤(ΣI−1−ΣE−1)(xi−xj),d(x_i, x_j) = (x_i - x_j)^\top \left(\Sigma_I^{-1} - \Sigma_E^{-1}\right)(x_i - x_j),

so learning the metric amounts to estimating two covariance matrices, with no iterative optimisation. Liao et al. note that KISSME applied PCA first and estimated ΣI\Sigma_I and ΣE\Sigma_E in the PCA subspace.

XQDA (Liao et al., 2015). Cross-view quadratic discriminant analysis learns the subspace and the metric together. Both difference classes have zero mean, so the projection ww should make the extrapersonal variance large relative to the intrapersonal one, a generalised Rayleigh quotient:

J(w)=w⊤ΣEww⊤ΣIw.J(w) = \frac{w^\top \Sigma_E w}{w^\top \Sigma_I w}.

Its maximisers are the leading generalised eigenvectors of (ΣE,ΣI)(\Sigma_E, \Sigma_I). With W=(w1,…,wr)W = (w_1, \dots, w_r), the distance is the KISSME form in the subspace,

dW(x,z)=(x−z)⊤W(ΣI′−1−ΣE′−1)W⊤(x−z),ΣI′=W⊤ΣIW,ΣE′=W⊤ΣEW.d_W(x, z) = (x - z)^\top W \left(\Sigma_I'^{-1} - \Sigma_E'^{-1}\right) W^\top (x - z), \qquad \Sigma_I' = W^\top \Sigma_I W, \quad \Sigma_E' = W^\top \Sigma_E W.

Liao et al. compute both covariances from class sums without forming the pairs, add 0.001 to the diagonal of ΣI\Sigma_I for unit-normalised features, and keep the eigenvectors whose eigenvalues exceed 1, since a direction with σE<σI\sigma_E < \sigma_I does not separate the classes. On VIPeR (316 test identities, averaged over ten splits) LOMO with XQDA reached 40.00% rank-1, against 19.60% for KISSME with its original features and 12.00% for ELF, as listed in their Table 1; with the LOMO feature fixed and the dimension reduced to 100, XQDA reached 38.23% rank-1 and KISSME 34.05% (their Figure 4). On CUHK03 under the original protocol LOMO with XQDA reached 52.20% rank-1 with the labelled boxes and 46.25% with the detected boxes.

Deep identity embeddings

Siamese networks. DeepReID (Li et al., 2014) introduced CUHK03 together with a filter pairing neural network that took a pair of images and was trained to decide whether they show the same person, with layers designed for misalignment and photometric transforms. On CUHK03, Liao et al. list its rank-1 rates as 20.65% (labelled) and 19.89% (detected), below LOMO with XQDA.

Identity classification. With hundreds of training identities and many images of each, a standard classification network can be trained to classify the training identities with the cross-entropy loss, and a late layer used as the descriptor; Zhong et al. (2017) trained such models on CaffeNet and ResNet-50, and Sun et al. (2018) call this model a commonly used baseline in deep re-identification systems. The re-identification literature calls this the ID-discriminative embedding (IDE; Luo et al. expand it as ID Embedding). Sources attribute it differently: Zhong et al. (2017) cite the PRW paper of Zheng et al. for it, Sun et al. (2018) a 2016 survey by Zheng, Yang and Hauptmann, and Luo et al. (2019) the journal paper of Zheng, Zheng and Yang. In Zhong et al.’s experiments IDE on ResNet-50 reached 72.54% rank-1 and 46.00% mAP on Market-1501, against 43.56% and 22.44% for LOMO with XQDA.

Part-based Convolutional Baseline. PCB (Sun et al., 2018) keeps the ResNet-50 trunk, removes the last spatial down-sampling so that a 384 × 128 input gives a 24 × 8 feature map, splits the map into six horizontal stripes, average-pools each, reduces each to 256 dimensions and trains a separate identity classifier on each stripe, summing the six cross-entropy losses. At test time the six stripe vectors are concatenated, either the pooled 2,048-dimensional ones (G, 12,288 dimensions) or the reduced ones (H, 1,536). The text calls G slightly more accurate, but in their Table 1 H is level with it on Market-1501 and better on CUHK03; the results below use G. On Market-1501 (single query, no re-ranking), PCB raised rank-1 and mAP from 85.3% and 68.5% for their improved IDE to 92.3% and 77.4%. Two controls showed where the gain came from: a variant trained with one loss on the averaged stripes reached 86.7% and 69.4%, and a variant whose six classifiers shared weights reached 91.2% and 75.0% (their Table 1). Refined part pooling (RPP) then replaces the hard stripes by soft assignments from a part classifier on each column of the feature map, trained in a staged “induced” procedure without part labels, which raised the results to 93.8% rank-1 and 81.6% mAP.

The strong baseline. Luo et al. (2019) surveyed baselines in CVPR 2018 and ECCV 2018 papers and found that only two of 23 exceeded 90% rank-1 on Market-1501; they argued that some reported gains came from understated training tricks rather than from the methods. Their standard baseline is a ResNet-50 trained with an identity loss and a triplet loss (margin 0.3), batches of P=16P = 16 identities by K=4K = 4 images, 256 × 128 inputs, flips and padded random crops, and Adam for 120 epochs. They added six tricks one at a time, and measured each step on Market-1501 and DukeMTMC-reID:

Step Market-1501 rank-1 Market-1501 mAP DukeMTMC-reID rank-1 DukeMTMC-reID mAP
Standard baseline 87.7 74.0 79.7 63.7
+ warmup of the learning rate over 10 epochs 88.7 75.2 80.6 65.1
+ random erasing augmentation 91.3 79.3 81.5 68.3
+ label smoothing (ε=0.1\varepsilon = 0.1) 91.4 80.3 82.4 69.3
+ last stride 1 92.0 81.7 82.6 70.6
+ BNNeck 94.1 85.7 86.2 75.9
+ center loss (β=0.0005\beta = 0.0005) 94.5 85.9 86.4 76.4

The new component, BNNeck, inserts a batch normalization layer between the pooled feature ftf_t and a bias-free classifier: the triplet loss acts on ftf_t, the identity loss on the normalised feature fif_i, and fif_i is compared by cosine distance at test time. The authors argued that the identity loss mainly shapes angles while the triplet loss shapes Euclidean distances, so the two goals conflict on one vector. With k-reciprocal re-ranking their model reached 95.4% rank-1 and 94.2% mAP on Market-1501 in their Table 4 (the text gives 94.1% mAP). Random erasing helped within a dataset but hurt transfer across datasets: removing it raised Market-1501 → DukeMTMC-reID rank-1 from 27.5% to 41.4% (their Table 3).

Losses

Two loss families dominate: classification losses over the training identities (IDE, PCB), and pair or triplet losses on the embedding. The triplet loss asks an anchor to be closer to a positive of its identity than to a negative by a margin. Hermans, Beyer and Leibe argued in a 2017 arXiv preprint, for which this article relies on later papers, that the triplet loss effectively improves re-identification, as Wei et al. (2018) summarise their result; their batch-hard variant, which builds each batch from PP identities with KK images and mines the hardest positive and negative inside it, is described with its training dynamics in the triplet loss article. The strong baseline of Luo et al. (2019) samples its batches in the same P×KP \times K way and cites Hermans et al. for its triplet loss, and the comparison tables of Sun et al. (2018) and Luo et al. (2019) list the Hermans et al. model, “Triplet Loss” or “TriNet”, at 84.9% rank-1 and 69.1% mAP on Market-1501. Many later systems combine both families, as the strong baseline does, and add a center loss that pulls each feature towards a learned centre of its class (Luo et al., 2019).

Part-based and attention models

Part-level features give fine-grained information about a pedestrian, provided the parts are well located (Sun et al., 2018). Models differ in how they find the parts:

  • External body cues. Spindle Net (Zhao et al., 2017) locates fourteen body joints, groups them into seven sets and proposes from them seven body sub-regions, extracts features of these macro- and micro-body regions and fuses them with a tree-structured competitive scheme. Sun et al. (2018) note that such methods inherit the gap between pose-estimation datasets and re-identification images.
  • Fixed stripes. PCB uses uniform horizontal stripes with one loss per stripe; Luo et al. (2019) group it with other stripe-based models such as AlignedReID and Pyramid.
  • Learned attention. The Harmonious Attention CNN (Li, Zhu & Gong, 2018) learns soft pixel-level attention (spatial and channel) together with hard regional attention, for misaligned detections; it reached 91.2% rank-1 and 75.7% mAP on Market-1501 (single query) and 80.5% and 63.8% on DukeMTMC-reID.
  • Transformers. TransReID (He et al., 2021) replaced the convolutional backbone with a vision transformer, added a jigsaw patch module that rearranges the patch embeddings by shift and shuffle operations to obtain more robust, more diverse local features, and side information embeddings that encode the camera and, for vehicles, the viewpoint. With a ViT-B/16 backbone, overlapping patches and camera information, it reported 69.4% mAP and 86.2% rank-1 on MSMT17 and 89.5% mAP and 95.2% rank-1 on Market-1501 at 384 × 128.

Re-ranking

Before re-identification, re-ranking had mostly been studied for generic instance retrieval (Zhong et al., 2017), where query expansion and diffusion refine the top of a list, as the image retrieval article describes. Zhong et al. (2017) built on k-reciprocal nearest neighbours: two images are k-reciprocal neighbours if each is among the other’s kk nearest. With N(p,k)N(p, k) the kk nearest neighbours of pp,

R(p,k)={gi∣gi∈N(p,k)∧p∈N(gi,k)}.R(p, k) = \{ g_i \mid g_i \in N(p, k) \wedge p \in N(g_i, k) \}.

The set is expanded with the 12k\tfrac{1}{2}k-reciprocal neighbours of each member when at least two thirds of them already belong to R(p,k)R(p, k), giving R∗(p,k)R^*(p, k). Each image is then encoded as a vector over all images, with weight e−d(p,gi)e^{-d(p, g_i)} on the members of its expanded set and zero elsewhere, and two images are compared by a weighted Jaccard distance

dJ(p,gi)=1−∑jmin⁡(Vp,gj,Vgi,gj)∑jmax⁡(Vp,gj,Vgi,gj).d_J(p, g_i) = 1 - \frac{\sum_j \min(V_{p, g_j}, V_{g_i, g_j})}{\sum_j \max(V_{p, g_j}, V_{g_i, g_j})}.

A local query expansion averages each vector with those of its k2k_2 nearest neighbours, and the final distance mixes the two: d∗=(1−λ)dJ+λdd^* = (1 - \lambda) d_J + \lambda d. The method needs no labels. Zhong et al. used (k1,k2,λ)=(20,6,0.3)(k_1, k_2, \lambda) = (20, 6, 0.3) on Market-1501 and (7,3,0.85)(7, 3, 0.85) on CUHK03 under the original single-shot protocol. On Market-1501 it raised IDE (ResNet-50) from 72.54% rank-1 and 46.00% mAP to 74.85% and 59.87%, more than average query expansion or the contextual dissimilarity measure, and with KISSME on IDE features to 77.11% and 63.63%. Under CUHK03’s original protocol, where each query has a single gallery match, it changed the results with IDE features by at most 0.4 points, which the authors explained by the lack of contextual information. The Python version in the authors’ repository, written by Hao Luo and modified by Houjing Huang according to its header, ranks the queries and the gallery together when building neighbourhoods.

In these reports, as for the strong baseline above, re-ranking raised mAP more than rank-1, and results with it are reported separately: Sun et al. compare only with results without re-ranking, and with it their PCB+RPP rose to 95.1% rank-1 and 91.9% mAP on Market-1501.

Video, unsupervised and vehicle re-identification

These variants reuse the image models with different supervision or inputs; only their outline is given here.

  • Video. Sequence descriptors pool frame features: Zhong et al. max-pooled LOMO and IDE features over each MARS sequence, and re-ranking raised IDE (ResNet-50) with XQDA from 70.51% rank-1 and 55.12% mAP to 73.94% and 68.45%.
  • Domain adaptation. Image translation methods restyle the labelled source images as if taken by the target cameras. Wei et al. (2018) proposed the Person Transfer GAN together with MSMT17; Deng et al. (2018) proposed SPGAN, which adds constraints so that a translated image keeps its identity and stays dissimilar to every target identity. Pseudo-label methods instead cluster the unlabelled target images and train on the clusters. Ge et al. (2020) combined source classes, target clusters and unclustered target instances in a contrastive loss with a hybrid memory, with DBSCAN clustering that is gradually made more reliable; without any source data, their method reached 73.1% mAP and 88.1% rank-1 on Market-1501 and 19.1% mAP and 42.3% rank-1 on MSMT17.
  • Vehicles. TransReID reported 82.3% mAP and 97.1% rank-1 on VeRi-776 using camera and viewpoint information (DeiT-B/16 backbone with overlapping patches), and Ge et al. evaluated their unsupervised method on VeRi-776 as well.

Datasets and Benchmarks

The benchmarks grew from a few hundred hand-cropped pairs to tens of thousands of detected boxes from many cameras. Their protocols differ in ways that change the scores, so results are comparable only within one protocol.

Dataset Identities Boxes Cameras Boxes from Standard split
VIPeR 632 1,264 2 hand 316 / 316 pairs, 10 random splits
CUHK03 (original) 1,360 13,164 6 (2 per identity) hand and DPM 1,160 train / 100 val / 100 test, 20 random splits
CUHK03 (new protocol) 767 train / 700 test 7,368 train, 1,400 query, 5,328 gallery (labelled) 2 per identity hand and DPM one fixed split
Market-1501 1,501 32,668 6 DPM fixed split, 3,368 queries
DukeMTMC-reID 1,812 (1,404 used for training and testing) 36,411 8 hand 702 / 702 identities, 2,228 queries
MSMT17 4,101 126,441 15 Faster R-CNN 1,041 train / 3,060 test identities

The VIPeR row follows Liao et al. (2015) and Table 1 of Zheng et al. (2015), the CUHK03 rows the DeepReID paper, the official CUHK page and Zhong et al.’s repository, and the others the papers cited below.

VIPeR contains one image of each of 632 people from each of two outdoor cameras, with large changes in viewpoint and illumination; the usual protocol splits the pairs in half at random and averages over ten splits (Liao et al., 2015).

CUHK03 (Li et al., 2014) was collected with six surveillance cameras on the CUHK campus over months; each identity is seen in two disjoint views with on average 4.8 images per view, and the dataset provides both manually cropped and DPM-detected boxes. The original protocol uses 1,160 training, 100 validation and 100 test identities, repeated over 20 random splits, with single-shot CMC. Zhong et al. (2017) proposed a new protocol, similar to Market-1501, with 767 training and 700 test identities in one split; one image per camera of each test identity is a query and the rest form the gallery, so each query has several true matches and the model is trained once. Their repository gives 7,368 training, 1,400 query and 5,328 gallery images for the labelled boxes, and 7,365, 1,400 and 5,332 for the detected boxes. The two protocols give very different numbers: LOMO with XQDA scored 49.7% rank-1 on the labelled boxes under the original protocol in Zhong et al.’s Table 4 (Liao et al. report 52.20%) but 14.8% under the new one in their Table 5. Papers also disagree on the dataset’s size: the DeepReID paper and the official page give 1,360 identities and 13,164 images, while Zhong et al. (2017) give 14,096 images of 1,467 identities Sun et al. (2018) 13,164 images of 1,467 identities, and Wei et al. (2018) 28,192 boxes of 1,467 identities.

Market-1501 (Zheng et al., 2015) was recorded by six cameras, five high-definition and one standard-definition, in front of a campus supermarket. It has 32,668 DPM-detected boxes of 1,501 identities, each seen by at least two cameras; each detected box was compared with a hand-drawn box and labelled “good” (IoU above 50%), “distractor” (below 20%, plus obvious false alarms) or “junk” (in between). Queries are hand-drawn boxes, one per identity per camera, 3,368 in total, and the gallery holds DPM boxes; on average each query has 14.8 cross-camera ground-truth matches, which is why the paper introduced mAP for re-identification. The paper’s text splits the identities into 750 for training and 751 for testing, while later papers using the released split, such as Zhong et al. (2017) and Sun et al. (2018), give 751 training identities with 12,936 images and 750 test identities with 19,732 gallery images. An optional set of more than 500,000 further boxes, background false alarms and people outside the 1,501 identities, tests scale.

DukeMTMC-reID (Zheng, Zheng & Yang, 2017) was cut from DukeMTMC (Ristani et al., 2016), a multi-target, multi-camera tracking dataset of eight 85-minute high-resolution videos from eight cameras with hand-drawn boxes. Zheng et al. cropped an image every 120 frames, giving 36,411 boxes of 1,812 identities; 1,404, which the paper describes as appearing in more than two cameras, were split into 702 training and 702 test identities, and 408 that appear in only one camera are distractor identities. One query per test identity per camera gives 2,228 queries, with 17,661 gallery and 16,522 training images. The section on privacy below describes the withdrawal of the parent dataset.

MSMT17 (Wei et al., 2018) was recorded by a 15-camera campus network, 12 outdoor and 3 indoor, on four days with different weather in one month, three hours a day (morning, noon and afternoon), 180 hours in total. Faster R-CNN produced the boxes and three annotators labelled identities for two months, giving 126,441 boxes of 4,101 identities. Training and testing are split 1:3 to reflect the cost of annotation: 32,621 training boxes of 1,041 identities, and 93,820 test boxes of 3,060 identities, of which 11,659 are queries and 82,161 the gallery. A GoogLeNet baseline reached 23.0% mAP and 47.6% rank-1, lower than on the older datasets.

Evaluation Metrics

Re-identification reports two numbers computed from each query’s ranked gallery, after removing junk images (same identity and same camera, and boxes labelled junk). Let rqr_q be the rank of the first true match of query qq and relq(k)=1\mathrm{rel}_q(k) = 1 if the image at rank kk is a true match.

Cumulative matching characteristic. The CMC curve gives the fraction of queries whose first true match is within the top kk:

CMC(k)=1∣Q∣∑q∈Q1[rq≤k].\mathrm{CMC}(k) = \frac{1}{|Q|} \sum_{q \in Q} \mathbf{1}[r_q \le k].

Its value at k=1k = 1 is the rank-1 accuracy, the headline number of most papers, usually given with rank-5 and rank-10. CMC is the hit-rate form of Recall@K, which describes the general metric and its blindness to everything after the first correct item. On benchmarks with one match per query, as in VIPeR’s and CUHK03’s original protocols, it describes the ranking completely.

Mean average precision. With several true matches per query, CMC ignores where the other matches fall: Zheng et al. (2015) show ranked lists that all have CMC equal to 1 but average precision of 1, 1 and 0.71. For each query, with NqN_q true matches in the gallery,

APq=1Nq∑k=1∣G∣Pq(k) relq(k),mAP=1∣Q∣∑qAPq,\mathrm{AP}_q = \frac{1}{N_q} \sum_{k=1}^{|\mathcal{G}|} P_q(k)\, \mathrm{rel}_q(k), \qquad \mathrm{mAP} = \frac{1}{|Q|} \sum_q \mathrm{AP}_q,

where Pq(k)P_q(k) is the precision of the top kk. This is the information-retrieval form of average precision, computed over the whole ranked gallery. The MATLAB evaluation code in Zhong et al.’s repository (compute_AP.m) instead integrates the precision–recall curve by the trapezoidal rule, averaging the precision before and after each true match, so its values differ slightly from this sum; the example uses the sum. mAP rewards finding all images of a person, while rank-1 rewards finding the easiest one; Sun et al. (2018) make this distinction when RPP raises mAP more than rank-1.

Reported numbers depend on the protocol details: single- or multi-query, with or without re-ranking, the CUHK03 protocol and box type, and the gallery size.

Example: Ranking Synthetic Pedestrians Across Two Cameras

The example builds a small two-camera benchmark with known identities and compares three distances on the same colour descriptor, with and without k-reciprocal re-ranking. Each identity is a stick-figure pedestrian in a 64×3264 \times 32 RGB image: shirt colour, optional horizontal stripes in a second colour (30% of identities), trouser, hair and skin colours, an optional backpack in its own colour (40%) that covers the upper back in back views and shows only as straps in front views, and a body width. Each image draws a front or back view, a shift of up to 3 pixels, a scale between 0.85 and 1.1, a leg stride, a textured background, a brightness factor between 0.7 and 1.2, sensor noise and, with probability 0.2, an occluder over the lower body. The two cameras differ systematically: camera B multiplies the channels by (0.80, 0.95, 1.15) and applies a gamma of 1.3, and its background is bluer.

There are 200 training identities and 150 test identities with four images per camera each, and 50 distractor identities seen only by camera B. The 600 camera-A test images are the queries and the 800 camera-B images the gallery, so every query has four cross-camera matches. The descriptor is ELF-like: 16-bin histograms of R, G, B, H, S and V in six horizontal stripes (576 dimensions), square-rooted and ℓ2\ell_2-normalised. The distances are Euclidean, KISSME as Liao et al. (2015) write it, after PCA to 60 dimensions, and XQDA as Liao et al. specify it, both learned from the cross-camera pairs of the training identities. Re-ranking follows that Python version (queries and gallery ranked together) and is printed with both of Zhong et al.’s parameter settings, since the sources give one per dataset and the synthetic data match neither. It is applied to Euclidean and XQDA; KISSME’s ΣI−1−ΣE−1\Sigma_I^{-1} - \Sigma_E^{-1} is not positive semidefinite, so its distances can be negative, while the code expects distances it can square. Before any method runs, the script prints two label-free checks on the generator’s parameters: the fraction of test identities with a look-alike (another test identity whose shirt and trouser colours are both within 0.15 in RGB), and the shift of a mid-grey surface between cameras beside the median distance from each identity’s clothing colours to its nearest neighbour’s. The script loops over seeds 0, 1 and 2, uses NumPy 2.3.5, SciPy 1.16.3 and scikit-image 0.25.2, and took two to six minutes on a laptop CPU, mostly in re-ranking.

import time
import numpy as np
from scipy.linalg import eigh
from skimage.color import hsv2rgb, rgb2hsv

H, W = 64, 32
yy, xx = np.mgrid[0:H, 0:W].astype(float)
CAM = {"A": dict(gain=np.array([1.05, 1.00, 0.90]), gamma=1.0, bg=np.array([0.55, 0.50, 0.42])),
       "B": dict(gain=np.array([0.80, 0.95, 1.15]), gamma=1.3, bg=np.array([0.35, 0.42, 0.48]))}

def colour(rng, s_lo=0.3, v_lo=0.3):
    return hsv2rgb(np.array([[[rng.random(), rng.uniform(s_lo, 1), rng.uniform(v_lo, 1)]]]))[0, 0]

def identity(rng):
    return dict(shirt=colour(rng), stripe=colour(rng) if rng.random() < 0.3 else None,
                trousers=colour(rng, 0.1, 0.15), hair=colour(rng, 0.2, 0.05) * 0.6,
                skin=np.array([0.85, 0.65, 0.5]) * rng.uniform(0.45, 1.0),
                bag=colour(rng) if rng.random() < 0.4 else None, width=rng.uniform(5.5, 8.0))

def render(p, cam, rng):
    c = CAM[cam]
    img = c["bg"] + 0.04 * rng.standard_normal((H, W, 1)) + np.zeros((H, W, 3))
    s = rng.uniform(0.85, 1.1)
    cx, y0 = 16 + rng.uniform(-3, 3), 4 + rng.uniform(-3, 3)
    back = rng.random() < 0.5
    def paint(mask, col):
        img[mask] = col
    t0, t1, w = y0 + 10 * s, y0 + 32 * s, p["width"] * s
    torso = (yy >= t0) & (yy < t1) & (abs(xx - cx) < w)
    paint(torso, p["shirt"])
    if p["stripe"] is not None:
        paint(torso & (((yy - t0) // 3) % 2 == 1), p["stripe"])
    d = rng.uniform(1.5, 4.0) * s                                  # leg stride
    for side in (-1, 1):
        leg = (yy >= t1) & (yy < y0 + 56 * s) & (abs(xx - (cx + side * (d + 1))) < 2.5 * s)
        paint(leg, p["trousers"])
        paint(leg & (yy >= y0 + 53 * s), np.array([0.1, 0.1, 0.1]))  # shoes
    head = ((xx - cx) / (3.5 * s)) ** 2 + ((yy - (y0 + 5 * s)) / (4.5 * s)) ** 2 < 1
    paint(head, p["skin"])
    paint(head & ((yy < y0 + 4 * s) | back), p["hair"])          # back view: hair only
    if p["bag"] is not None:
        if back:   # backpack covers the upper back
            paint((yy >= t0 + 1) & (yy < t0 + 16 * s) & (abs(xx - cx) < 4.5 * s), p["bag"])
        else:      # straps from the front
            paint(torso & (yy < t0 + 14 * s) & (abs(abs(xx - cx) - 3.5 * s) < 0.7), p["bag"])
    if rng.random() < 0.2:                                         # occluder at the bottom
        top = rng.uniform(0.65, 0.85) * H
        paint(yy >= top, rng.uniform(0.1, 0.9, 3))
    img = np.clip(img, 0, 1)
    img = rng.uniform(0.7, 1.2) * (img * c["gain"]) ** c["gamma"]  # camera and lighting
    return np.clip(img + 0.02 * rng.standard_normal(img.shape), 0, 1)

def descriptor(img, stripes=6, bins=16):
    chans = np.concatenate([img, rgb2hsv(img)], axis=2)           # R, G, B, H, S, V
    idx = np.minimum((chans * bins).astype(int), bins - 1)
    f = []
    for rows in np.array_split(np.arange(H), stripes):
        for ch in range(6):
            f.append(np.bincount(idx[rows, :, ch].ravel(), minlength=bins) / (len(rows) * W))
    f = np.sqrt(np.concatenate(f))
    return f / np.linalg.norm(f)

def make_set(people, cams, per_cam, rng):
    X, ids, cam = [], [], []
    for i, p in people:
        for c in cams:
            for _ in range(per_cam):
                X.append(descriptor(render(p, c, rng))); ids.append(i); cam.append(c)
    return np.array(X), np.array(ids), np.array(cam)

def pair_covariances(X, ids, cam):
    """Sigma_I, Sigma_E over all cross-camera pairs (camera A image x camera B image)."""
    A, B = X[cam == "A"], X[cam == "B"]
    ia, ib = ids[cam == "A"], ids[cam == "B"]
    # sum over all pairs of (a - b)(a - b)^T, without forming the pairs (Liao et al., Eq. 9)
    s, r = A.sum(0), B.sum(0)
    S_all = len(B) * A.T @ A + len(A) * B.T @ B - np.outer(s, r) - np.outer(r, s)
    S_I, n_I = np.zeros_like(S_all), 0
    for i in np.unique(ia):
        D = (A[ia == i][:, None, :] - B[ib == i][None, :, :]).reshape(-1, X.shape[1])
        S_I += D.T @ D; n_I += len(D)
    n_E = len(A) * len(B) - n_I
    return S_I / n_I, (S_all - S_I) / n_E

def quad_dist(P, Q, K):
    return (np.einsum("ij,jk,ik->i", P, K, P)[:, None] + np.einsum("ij,jk,ik->i", Q, K, Q)[None, :]
            - 2 * P @ K @ Q.T)

def kissme(Xtr, idtr, camtr, dims=60):
    mu = Xtr.mean(0)
    V = np.linalg.svd(Xtr - mu, full_matrices=False)[2][:dims].T  # PCA first, as in KISSME
    SI, SE = pair_covariances((Xtr - mu) @ V, idtr, camtr)
    K = np.linalg.inv(SI) - np.linalg.inv(SE)                     # Liao et al., Eq. (4)
    return lambda P, Q: quad_dist((P - mu) @ V, (Q - mu) @ V, K)

def xqda(Xtr, idtr, camtr, reg=1e-3):
    SI, SE = pair_covariances(Xtr, idtr, camtr)
    SI = SI + reg * np.eye(len(SI))
    lam, Wv = eigh(SE, SI)                                        # max w'SE w / w'SI w, Eq. (6)
    keep = np.argsort(lam)[::-1]
    keep = keep[lam[keep] > 1]                                    # eigenvalues > 1
    Wr = Wv[:, keep]
    K = np.linalg.inv(Wr.T @ SI @ Wr) - np.linalg.inv(Wr.T @ SE @ Wr)  # Eq. (5)
    return (lambda P, Q: quad_dist(P @ Wr, Q @ Wr, K)), len(keep)

def euclid(P, Q):
    return np.sqrt(np.maximum((P ** 2).sum(1)[:, None] + (Q ** 2).sum(1)[None, :] - 2 * P @ Q.T, 0))

def re_rank(q_g, q_q, g_g, k1, k2, lam):
    """k-reciprocal re-ranking, following python-version/re_ranking_ranklist.py of
    zhunzhong07/person-re-ranking (commit 278f2c7)."""
    nq = len(q_g)
    D = np.block([[q_q, q_g], [q_g.T, g_g]]) ** 2
    D = (D / D.max(axis=0)).T
    N = len(D)
    rank = np.argsort(D, axis=1, kind="stable")
    def recip(i, k):
        fwd = rank[i, :k + 1]
        return fwd[np.any(rank[fwd, :k + 1] == i, axis=1)]
    V = np.zeros((N, N))
    for i in range(N):
        R = recip(i, k1)
        Rs = R
        for c in R:                                               # expansion, Eq. (4)
            Rc = recip(c, int(np.around(k1 / 2)))
            if len(np.intersect1d(Rc, R)) > 2 / 3 * len(Rc):
                Rs = np.append(Rs, Rc)
        Rs = np.unique(Rs)
        w = np.exp(-D[i, Rs])                                     # Gaussian weights, Eq. (7)
        V[i, Rs] = w / w.sum()
    if k2 != 1:                                                   # local query expansion, Eq. (11)
        V = np.stack([V[rank[i, :k2]].mean(0) for i in range(N)])
    mins = np.stack([np.minimum(V[i], V).sum(1) for i in range(nq)])
    jac = 1 - mins / (2 - mins)                                   # Jaccard distance, Eq. (10)
    final = (1 - lam) * jac + lam * D[:nq]                        # Eq. (12)
    return final[:, nq:]

def evaluate(dist, qid, gid):
    order = np.argsort(dist, axis=1, kind="stable")
    match = gid[order] == qid[:, None]
    first = match.argmax(1)
    cmc = [(first < k).mean() for k in (1, 5, 10)]
    ap = [(np.cumsum(m)[m] / (np.flatnonzero(m) + 1)).mean() for m in match]
    return cmc + [np.mean(ap)]

def run(seed):
    rng = np.random.default_rng(seed)
    people = [identity(rng) for _ in range(400)]
    tr, te, dis = list(enumerate(people[:200])), list(enumerate(people[200:350], 200)), \
        list(enumerate(people[350:], 350))
    # label-free difficulty check on generator parameters only
    clothes = np.array([np.r_[p["shirt"], p["trousers"]] for _, p in te])
    dsh = np.linalg.norm(clothes[:, None, :3] - clothes[None, :, :3], axis=2)
    dtr = np.linalg.norm(clothes[:, None, 3:] - clothes[None, :, 3:], axis=2)
    np.fill_diagonal(dsh, 9); np.fill_diagonal(dtr, 9)
    lookalike = ((dsh < 0.15) & (dtr < 0.15)).any(1).mean()
    nn = np.sqrt(dsh ** 2 + dtr ** 2).min(1)
    grey = np.full(3, 0.5)
    shift = np.linalg.norm((grey * CAM["A"]["gain"]) ** CAM["A"]["gamma"]
                           - (grey * CAM["B"]["gain"]) ** CAM["B"]["gamma"])
    Xtr, idtr, camtr = make_set(tr, "AB", 4, rng)
    Xq, qid, _ = make_set(te, "A", 4, rng)
    Xg, gid, _ = make_set(te, "B", 4, rng)
    Xd, did, _ = make_set(dis, "B", 4, rng)
    Xg, gid = np.vstack([Xg, Xd]), np.r_[gid, did]
    kiss = kissme(Xtr, idtr, camtr)
    xq, r = xqda(Xtr, idtr, camtr)
    res = {"Euclidean": evaluate(euclid(Xq, Xg), qid, gid),
           "KISSME (PCA 60)": evaluate(kiss(Xq, Xg), qid, gid),
           "XQDA": evaluate(xq(Xq, Xg), qid, gid)}
    cross = {}
    for name, f in [("Euclidean", euclid), ("XQDA", lambda P, Q: np.sqrt(np.maximum(xq(P, Q), 0)))]:
        qg, qq, gg = f(Xq, Xg), f(Xq, Xq), f(Xg, Xg)
        nbrs = np.argsort(np.hstack([qq, qg]), axis=1, kind="stable")[:, 1:21]
        cross[name] = (nbrs >= len(Xq)).sum(1).mean()   # gallery images among 20 nearest
        for k1, k2, lam in [(20, 6, 0.3), (7, 3, 0.85)]:
            res[f"{name} + RR({k1},{k2},{lam})"] = evaluate(re_rank(qg, qq, gg, k1, k2, lam), qid, gid)
    return res, lookalike, np.median(nn), shift, r, cross

t = time.time()
print("NumPy", np.__version__)
allres = []
for seed in range(3):
    res, look, nn, shift, r, cross = run(seed)
    allres.append(res)
    print(f"\nseed {seed}: look-alike test identities {look:.2f}, median nearest clothing-colour "
          f"distance {nn:.2f}, camera shift of mid-grey {shift:.2f}, XQDA dims {r}")
    print("gallery images among a query's 20 nearest (queries + gallery): "
          + ", ".join(f"{k} {v:.2f}" for k, v in cross.items()))
    print(f"{'method':28s}{'R1':>7s}{'R5':>7s}{'R10':>7s}{'mAP':>7s}")
    for k, v in res.items():
        print(f"{k:28s}" + "".join(f"{x:7.3f}" for x in v))
print(f"\nrange over seeds 0-2 (min-max)")
print(f"{'method':28s}{'R1':>14s}{'mAP':>14s}")
for k in allres[0]:
    r1 = [a[k][0] for a in allres]; m = [a[k][3] for a in allres]
    print(f"{k:28s}   {min(r1):.3f}-{max(r1):.3f}   {min(m):.3f}-{max(m):.3f}")
print(f"\nruntime {time.time() - t:.0f} s")
NumPy 2.3.5

seed 0: look-alike test identities 0.13, median nearest clothing-colour distance 0.29, camera shift of mid-grey 0.25, XQDA dims 27
gallery images among a query's 20 nearest (queries + gallery): Euclidean 0.00, XQDA 9.29
method                           R1     R5    R10    mAP
Euclidean                     0.023  0.095  0.192  0.045
KISSME (PCA 60)               0.538  0.780  0.877  0.505
XQDA                          0.727  0.908  0.948  0.671
Euclidean + RR(20,6,0.3)      0.023  0.095  0.192  0.045
Euclidean + RR(7,3,0.85)      0.023  0.095  0.192  0.045
XQDA + RR(20,6,0.3)           0.780  0.902  0.943  0.770
XQDA + RR(7,3,0.85)           0.795  0.915  0.957  0.769

seed 1: look-alike test identities 0.05, median nearest clothing-colour distance 0.29, camera shift of mid-grey 0.25, XQDA dims 28
gallery images among a query's 20 nearest (queries + gallery): Euclidean 0.00, XQDA 9.28
method                           R1     R5    R10    mAP
Euclidean                     0.020  0.072  0.138  0.040
KISSME (PCA 60)               0.457  0.703  0.810  0.426
XQDA                          0.650  0.883  0.943  0.618
Euclidean + RR(20,6,0.3)      0.020  0.072  0.138  0.040
Euclidean + RR(7,3,0.85)      0.020  0.072  0.138  0.040
XQDA + RR(20,6,0.3)           0.688  0.845  0.920  0.717
XQDA + RR(7,3,0.85)           0.732  0.882  0.957  0.714

seed 2: look-alike test identities 0.12, median nearest clothing-colour distance 0.30, camera shift of mid-grey 0.25, XQDA dims 28
gallery images among a query's 20 nearest (queries + gallery): Euclidean 0.00, XQDA 9.82
method                           R1     R5    R10    mAP
Euclidean                     0.007  0.102  0.183  0.042
KISSME (PCA 60)               0.542  0.800  0.897  0.496
XQDA                          0.762  0.927  0.963  0.689
Euclidean + RR(20,6,0.3)      0.007  0.102  0.183  0.042
Euclidean + RR(7,3,0.85)      0.007  0.102  0.183  0.042
XQDA + RR(20,6,0.3)           0.773  0.902  0.955  0.779
XQDA + RR(7,3,0.85)           0.797  0.937  0.967  0.781

range over seeds 0-2 (min-max)
method                                  R1           mAP
Euclidean                      0.007-0.023   0.040-0.045
KISSME (PCA 60)                0.457-0.542   0.426-0.505
XQDA                           0.650-0.762   0.618-0.689
Euclidean + RR(20,6,0.3)       0.007-0.023   0.040-0.045
Euclidean + RR(7,3,0.85)       0.007-0.023   0.040-0.045
XQDA + RR(20,6,0.3)            0.688-0.780   0.717-0.779
XQDA + RR(7,3,0.85)            0.732-0.797   0.714-0.781

runtime 231 s

Apart from the final runtime line, which depends on the machine, two runs of the script print identical output.

The camera change defeats raw histograms. With Euclidean distance on the histograms, rank-1 is 0.7–2.3% and mAP about 4%, only a few times the chance rank-1 of 0.5% for four matches among 800 gallery images. The plan written before the first run predicted “a low rank-1 (roughly 20-45%)”, so the result went against it. The label-free checks show why the task is hard: a mid-grey surface moves by 0.25 in RGB between the cameras, close to the median distance of 0.29–0.30 between an identity’s clothing colours and those of its nearest neighbour, so the camera shift moves an image about as far as a change of person does. The neighbour count line shows the consequence: among each query’s 20 nearest images, counted over queries and gallery together, there are on average no camera-B images at all: every query has at least 20 camera-A images closer to it than any camera-B image, including those of the same person.

Learned metrics recover most of it. KISSME, learned from the training identities’ cross-camera pairs, reaches 46–54% rank-1 and XQDA 65–76%, with mAP rising in step; XQDA is ahead in every seed. Both are learned from people who never appear in the test set, so what they learn is the camera change and which histogram bins matter, the transfer that the metric-learning protocol is meant to test. XQDA keeps 27–28 dimensions with eigenvalues above 1 out of 576; the order of the two methods matches Liao et al.’s comparison on VIPeR, but the example is far too small to say more than that.

Re-ranking needs a good first ranking. On XQDA, re-ranking raises mAP by 9–10 points in every seed under both parameter settings, and rank-1 by less (1–8 points), the pattern Zhong et al. report. On Euclidean distance it changes nothing, to the third decimal, in either setting. The neighbour count explains most of this: with no gallery image among a query’s 20 nearest, no query and gallery image are k-reciprocal neighbours under either setting, and a query’s encoding vector covers only camera-A images. If the gallery images’ vectors likewise cover only camera-B images, which the count does not show but the unchanged output agrees with, every query–gallery Jaccard distance is 1 and the final distance is a constant plus λ\lambda times the query’s scaled original distance, which leaves the order unchanged. With XQDA about nine of a query’s 20 nearest images are gallery images, and the neighbourhoods overlap. The plan predicted that “the gain is larger with the Market-1501 setting than with the CUHK03 setting”; it is not: the mAP gains are equal within 0.003, and the CUHK03 setting gives the higher rank-1 in every seed, while the Market setting lowers rank-5 and rank-10 below plain XQDA in every seed. Our reading is that with only four true matches per query, neighbourhoods of 20 bring in more false matches, as Zhong et al. found when k1k_1 grew too large on Market-1501; the run does not test this.

The script was changed once after its first run. That run printed identical numbers for Euclidean distance with and without re-ranking; a separate diagnostic counted cross-camera neighbours, and the line that prints the neighbour counts was then added to the script. No data, parameters or other printed values changed. The first run took about six minutes against a planned estimate of one; later runs took two to four.

Applications

Re-identification models serve as the appearance component of trackers. DeepSORT added to SORT a descriptor network trained on the MARS re-identification dataset, and joint detection-and-embedding trackers such as FairMOT train a re-identification branch inside the detector; the multi-object tracking article describes how these embeddings are combined with motion. Multi-camera tracking is the task DukeMTMC was built for, as described under Datasets and Benchmarks. Retrieval of people from video archives is the use the benchmarks model; the papers above describe it as search over surveillance video (Liao et al., 2015; Zhao et al., 2017). Vehicle re-identification serves vehicle search where plates cannot be read (Liu et al., 2016), and the same embeddings are used for animals and products, as the image retrieval article notes.

Privacy and Dataset Withdrawal

Re-identification benchmarks are recordings of people in public places who are identified across cameras, and the papers above name search in surveillance video among the applications. Peng, Mathur and Narayanan (2021) studied DukeMTMC, a multi-camera tracking dataset, together with two face datasets, as “ethically problematic face and person recognition datasets”. This article describes the methods and the evidence; it gives no guidance on deploying such systems.

Their case study is DukeMTMC, which they followed, with LFW and MS-Celeb-1M, through the papers that cite them. In their account, DukeMTMC was retracted by its creators in April 2019 after an investigation by Harvey and Laplace raised ethical concerns about how the data were collected and used. When they wrote, the original website returned a DNS error and they found no location where the original dataset was still available, and no models pre-trained on it; but two derived datasets remained available with images from the original, and its licence, which they quote as forbidding commercial use, was still available through GitHub repositories of derivatives. They cite a June 2019 letter in which a DukeMTMC creator apologised and said that IRB guidelines had been violated, and note that this explanation did not appear in the dataset’s official channels. Neither retraction they studied clearly told users to stop: in their 20% sample of citing papers, DukeMTMC or its derivatives were used 73 times in papers published in 2020. DukeMTMC-reID was one of the derivatives they counted, and they found it used much more often than the tracking dataset it came from. The dataset bias article summarises their wider findings on retraction, derivatives and licences.

Results on DukeMTMC-reID continued to appear after the retraction, for example in the strong baseline (Luo et al., 2019) and TransReID (He et al., 2021), and earlier results remain in comparison tables, including those summarised above. Peng et al. recommend that retractions be explicit and visible wherever a dataset or its derivatives remain available, and suggest that conference program committees can require authors to check whether a dataset they use has been retracted.

Open Problems

  • Generalisation across camera networks. Accuracy within one benchmark is high, but transfer to unseen cameras remains low (Luo et al., 2019), and unsupervised methods still trail supervised ones on the larger datasets, such as MSMT17 (Ge et al., 2020).
  • Clothing changes and long time spans. In our reading, the standard benchmarks do not test changes of clothing, and the colour cues that the descriptors above depend on would not survive one.
  • Occlusion and misalignment. Detected boxes in crowds contain other people and miss parts of the target; occluded benchmarks remain much harder than full-body ones (He et al., 2021).
  • Fair comparison. Training tricks, image size, batch composition, re-ranking and protocol choices change the numbers by several points, and papers do not always report them (Luo et al., 2019).
  • Data governance. The retraction of DukeMTMC showed that withdrawing a dataset does not stop its use through copies and derivatives (Peng et al., 2021); how re-identification data should be collected, licensed and retired remains unsettled.

Related

  • Triplet Loss

    A loss for learning embeddings that asks an anchor image to be closer to a positive of its own class than to a negative of another class by a margin, how it grew out of relative-comparison metric learning, and how the choice of triplets (random, semi-hard, batch-hard, distance-weighted) decides whether training learns, stalls or collapses.

  • Image Retrieval

    Finding the images in a collection that show the same object, place or kind of thing as a query image; instance and category retrieval, the pipeline of descriptors, indexing and ranking, spatial verification, query expansion and diffusion, deep global descriptors, and the benchmarks (UKBench, Holidays, Oxford and Paris, their revisited versions, Google Landmarks v2) with their official evaluation code.

  • Recall@K

    The fraction of queries whose ranked results contain a correct item within the first K, the standard score of image–text retrieval, metric learning, place recognition and re-identification, with its two definitions, median rank, rsum, and the alternatives that look beyond the first hit.

  • Multi-Object Tracking

    Estimating the trajectories of a varying, unknown number of objects in a video while keeping each object's identity consistent over time.

  • Face Recognition

    Deciding whether two face images show the same person (verification) or which enrolled person a face belongs to (identification, closed- or open-set), with the detect, align, embed and compare pipeline, its benchmarks and evaluation protocols, and NIST's measurements of demographic differentials.

  • Dataset Bias

    How the way a dataset's images are chosen, photographed and labelled makes it an unrepresentative sample of the visual world, how cross-dataset tests measure the damage, and what bias means when the images show people, from demographic representation to withdrawn datasets.

References

  1. Gray, D. & Tao, H. (2008). Viewpoint Invariant Pedestrian Recognition with an Ensemble of Localized Features. European Conference on Computer Vision (ECCV), Lecture Notes in Computer Science, 262–275.
  2. Köstinger, M., Hirzer, M., Wohlhart, P., Roth, P. M. & Bischof, H. (2012). Large Scale Metric Learning from Equivalence Constraints. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2288–2295.
  3. Li, W., Zhao, R., Xiao, T. & Wang, X. (2014). DeepReID: Deep Filter Pairing Neural Network for Person Re-identification. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 152–159.
  4. Liao, S., Hu, Y., Zhu, X. & Li, S. Z. (2015). Person Re-identification by Local Maximal Occurrence Representation and Metric Learning. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2197–2206.
  5. Zheng, L., Shen, L., Tian, L., Wang, S., Wang, J. & Tian, Q. (2015). Scalable Person Re-identification: A Benchmark. IEEE International Conference on Computer Vision (ICCV), 1116–1124.
  6. Liu, H., Tian, Y., Wang, Y., Pang, L. & Huang, T. (2016). Deep Relative Distance Learning: Tell the Difference between Similar Vehicles. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2167–2175.
  7. Ristani, E., Solera, F., Zou, R., Cucchiara, R. & Tomasi, C. (2016). Performance Measures and a Data Set for Multi-target, Multi-camera Tracking. European Conference on Computer Vision (ECCV) Workshops, Lecture Notes in Computer Science, 17–35.
  8. Zhong, Z., Zheng, L., Cao, D. & Li, S. (2017). Re-ranking Person Re-identification with k-Reciprocal Encoding. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 3652–3661.
  9. Zhong, Z., Zheng, L., Cao, D. & Li, S. person-re-ranking: official code and the CUHK03 new protocol (GitHub repository, commit 278f2c7, October 2021; read November 2026).
  10. Zheng, Z., Zheng, L. & Yang, Y. (2017). Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in Vitro. IEEE International Conference on Computer Vision (ICCV), 3774–3782.
  11. Zhao, H., Tian, M., Sun, S., Shao, J., Yan, J., Yi, S., Wang, X. & Tang, X. (2017). Spindle Net: Person Re-identification with Human Body Region Guided Feature Decomposition and Fusion. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 907–915.
  12. Sun, Y., Zheng, L., Yang, Y., Tian, Q. & Wang, S. (2018). Beyond Part Models: Person Retrieval with Refined Part Pooling (and A Strong Convolutional Baseline). European Conference on Computer Vision (ECCV), Lecture Notes in Computer Science, 501–518.
  13. Li, W., Zhu, X. & Gong, S. (2018). Harmonious Attention Network for Person Re-identification. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2285–2294.
  14. Wei, L., Zhang, S., Gao, W. & Tian, Q. (2018). Person Transfer GAN to Bridge Domain Gap for Person Re-identification. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 79–88.
  15. Deng, W., Zheng, L., Ye, Q., Kang, G., Yang, Y. & Jiao, J. (2018). Image-Image Domain Adaptation with Preserved Self-Similarity and Domain-Dissimilarity for Person Re-identification. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 994–1003.
  16. Luo, H., Gu, Y., Liao, X., Lai, S. & Jiang, W. (2019). Bag of Tricks and a Strong Baseline for Deep Person Re-Identification. IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 1487–1495.
  17. Ge, Y., Zhu, F., Chen, D., Zhao, R. & Li, H. (2020). Self-paced Contrastive Learning with Hybrid Memory for Domain Adaptive Object Re-ID. Advances in Neural Information Processing Systems 33 (NeurIPS).
  18. He, S., Luo, H., Wang, P., Wang, F., Li, H. & Jiang, W. (2021). TransReID: Transformer-based Object Re-Identification. IEEE/CVF International Conference on Computer Vision (ICCV), 14993–15002.
  19. Peng, K., Mathur, A. & Narayanan, A. (2021). Mitigating Dataset Harms Requires Stewardship: Lessons from 1000 Papers. Neural Information Processing Systems Track on Datasets and Benchmarks (NeurIPS Datasets and Benchmarks).
  20. Wang, X. et al. CUHK Person Re-identification Datasets (official page of CUHK01–CUHK03, The Chinese University of Hong Kong; read November 2026).