Source-linked AI summary
Hierarchical Clustering with Hard-batch Triplet Loss for Person Re-identification
Kaiwei Zeng
TL;DR
Unsupervised re-ID commonly relies on labeled source data and target-domain adaptation, while this paper addresses fully unsupervised training on unlabeled target images. HCT uses hierarchical clustering, pseudo labels, PK sampling, and hard-batch triplet loss, and reports state-of-the-art performance among fully unsupervised methods, even exceeding most UDA methods.
Problem
Supervised and UDA re-ID rely on manually labeled source data, while fully unsupervised methods such as BUC struggle with hard examples and false pseudo labels.
Method
HCT hierarchically clusters unlabeled target images to generate pseudo labels, uses PK sampling with hard-batch triplet loss, and iteratively alternates clustering with fine-tuning.
Results
HCT surpasses state-of-the-art fully unsupervised methods by a large margin and performs better than most UDA methods.
Takeaways & Limitations
The results support exploiting target-domain image similarities while reducing the influence of hard examples through PK sampling and hard-batch triplet loss.
Takeaways & Limitations
HCT is theoretically expected to approach the baseline only as its pseudo-label quality approaches manually annotated labels.
Abstract
from arXiv · showhide
For most unsupervised person re-identification (re-ID), people often adopt unsupervised domain adaptation (UDA) method. UDA often train on the labeled source dataset and evaluate on the target dataset, which often focuses on learning differences between the source dataset and the target dataset to improve the generalization of the model. Base on these, we explore how to make use of the similarity of samples to conduct a fully unsupervised method which just trains on the unlabeled target dataset. Concretely, we propose a hierarchical clustering-guided re-ID (HCR) method. We use hierarchical clustering to generate pseudo labels and use these pseudo labels as monitors to conduct the training. In order to exclude hard examples and promote the convergence of the model, We use PK sampling in each iteration, which randomly selects a fixed number of samples from each cluster for training. We evaluate our model on Market-1501, DukeMTMC-reID and MSMT17. Results show that HCR gets the state-of-the-arts and achieves 55.3% mAP on Market-1501 and 46.8% mAP on DukeMTMC-reID. Our code will be released soon.
1. Introduction
The paper motivates fully unsupervised re-ID by the cost of annotation and the limitations of source-domain transfer and existing similarity-based clustering. It proposes HCT, combining hierarchical clustering, PK sampling, hard-batch triplet loss, and iterative pseudo-label refinement.
- Motivation: Supervised re-ID transfers poorly across datasets because domain deviation causes performance to decline on the target domain.
- Motivation: UDA methods require manually labeled source data and often focus on differences between source and target domains rather than target-domain similarities.
- Motivation: BUC uses bottom-up hierarchical clustering on unlabeled target images but deteriorates during later merging steps because hard examples cause false pseudo labels.
- Proposed method: HCT hierarchically merges target samples, assigns pseudo labels from clusters, and trains without manually annotated labels.
- Proposed method: PK sampling selects K instances from P identities per iteration so hard-batch triplet loss can reduce distances between similar samples and increase distances between different samples.
- Proposed method: HCT reinitializes pseudo labels at each iteration and alternates clustering with fine-tuning until pseudo-label quality stabilizes and performance no longer improves.
2. Related Work
Prior unsupervised re-ID work includes domain adaptation methods based on style or camera/domain differences and clustering-guided methods based on pseudo labels. The paper positions HCT as a fully unsupervised approach that more directly exploits similarities within the target domain.
- Unsupervised domain adaptation: Earlier unsupervised domain adaptation methods used manual features or CNNs to address source-target differences and improve transfer.
- Unsupervised domain adaptation: SPGAN translates source-image styles toward the target domain while retaining labels, whereas ECN models exemplar-, camera-, and neighborhood-invariance with pseudo-label training.
- Unsupervised domain adaptation: Most domain adaptation methods focus on source-target differences but do not fully explore similarities among images in the target domain.
- Clustering-guided re-ID: Clustering-guided re-ID uses clustering-generated pseudo labels and includes both domain-adaptation and fully unsupervised variants.
- Clustering-guided domain adaptation: PUL starts from labeled source data, fine-tunes with reliable K-means samples, and progressively selects more samples, but K-means is sensitive to k and outliers.
- Clustering-guided fully unsupervised re-ID: BUC uses only unlabeled target data and an ImageNet-pretrained model, iteratively merging clusters and fine-tuning, but later merging steps suffer from false pseudo labels.
3. Our Method
HCT trains fully unsupervised re-ID models on target data by iteratively clustering samples, assigning pseudo labels, sampling balanced batches, and fine-tuning. It uses average-linkage distances and hard-batch triplet loss to improve clustering and reduce false pseudo-label effects.
- Method overview: HCT extracts features, hierarchically clusters target samples, assigns shared pseudo labels within clusters, and generates training data with PK sampling.The network cycles through hierarchical clustering, PK sampling, and fine-tuning until convergence.
- Iterative correction: The method reinitializes pseudo labels at each iteration to correct false labels generated in the previous iteration.The loss is intended to distinguish hard examples and promote better clustering in feature space.
- Distance measurement: UPGMA defines cluster distance as the unweighted average of all pairwise Euclidean distances between two clusters.Each pairwise distance receives equal weight, reducing the influence of outliers during merging.
- Loss function: Hard-batch triplet loss mines anchor-positive and anchor-negative relationships to reduce distances between similar samples and increase distances between different samples.PK sampling randomly selects K instances from P identities per mini-batch, with batch size P×K.
- Iterative correction: The procedure begins with each of N samples treated as a distinct identity and uses merging hyperparameters to control clustering speed and the number of merging steps.The number of clusters merged per step is defined as m = n×m_p.
4. Experiment
Experiments evaluate HCT across re-ID datasets, supervision settings, clustering configurations, and qualitative cluster structure. HCT uses hierarchical-clustering pseudo labels with PK sampling and hard-batch triplet loss, achieving strong unsupervised performance while remaining sensitive to merging choices.
- Training Setting: The training procedure uses ImageNet-pretrained ResNet-50, hierarchical-clustering pseudo labels, PK sampling, and hard-batch triplet loss without manually annotated labels.Each iteration generates a new PK-sampled training dataset from the clustering results.
- Evaluation Setting: HCT is evaluated using single-shot retrieval with cosine-distance ranking, mean average precision, and rank-k accuracy.The query is compared with all gallery images, then ranked by cosine distance.
- Comparison with Baseline and Direct Transfer: 52.9% mAP and 47.7% mAP are HCT’s improvements over direct transfer on Market-1501 and DukeMTMC-reID, respectively.Direct transfer obtains 3.5% mAP and 3.0% mAP, while the supervised baseline remains 21.8% mAP and 14.7% mAP above HCT on the two datasets, respectively.
- Effectiveness of HCT: On Market-1501, HCT obtains rank-1 =80.0% and mAP =56.4%; on DukeMTMC-reID, it obtains rank-1 =69.6% and mAP =50.7%.The paper reports that HCT surpasses other fully unsupervised methods and many UDA methods without manually labeled training data.
- Comparison with Different Merging Steps: When merging step s reaches 14 on Market-1501, HCT becomes difficult to converge after clustering reduces the training identities to 258.The merging step controls the termination of hierarchical clustering, cluster count, and pseudo-label quality.
- Comparison with Different Merging Percents: Setting the merging percent mp to 0.07 gives the best Market-1501 performance, while changing mp causes only slight performance variation compared with changing s.The authors attribute declines at other settings to merging too many or too few clusters per step.
- Qualitative Analysis of T-SNE Visualization: T-SNE analysis shows HCT produces more compact clusters with fewer false-negative and false-positive samples than BUC.The paper connects this qualitative improvement with hard-batch triplet loss and higher-quality pseudo labels.
5. Conclusion
HCT is a fully unsupervised re-ID method that uses hierarchical clustering, PK sampling, hard-batch triplet loss, and alternating pseudo-label refinement. Extensive experiments report that it surpasses fully unsupervised state-of-the-art methods and most UDA methods.
- HCT trains on unlabeled target data without manually annotated labels.
- Hierarchical clustering exploits target-image similarities to generate pseudo labels for training.
- PK sampling and hard-batch triplet loss reduce the influence of hard examples during training.
- Alternating pseudo-label initialization and training progressively improves pseudo-label quality and model performance.
- HCT surpasses fully unsupervised state-of-the-art methods by a large margin and performs better than most UDA methods.