Source-linked AI summary

Cluster Contrast for Unsupervised Person Re-Identification

Zuozhuo Dai, Guangyuan Wang, Weihao Yuan, Xiaoli Liu, Siyu Zhu, Ping Tan

arXiv:2103.11568v4cs.CV

TL;DR

Purely unsupervised person re-identification must learn cross-camera retrieval without labeled data, despite inconsistent instance-level updates across clusters. Cluster Contrast addresses this with cluster-level representations and memory, achieving state-of-the-art performance on three purely unsupervised re-ID benchmarks.

  • Problem

    Purely unsupervised person re-ID seeks cross-camera person retrieval without labeled data, while varying cluster sizes create inconsistent cluster updating progress.

  • Method

    Cluster Contrast builds a cluster-level memory dictionary with one representation per cluster, computes contrastive loss at cluster level, and uses momentum updates to reinforce feature consistency.

  • Results

    Cluster Contrast achieves state-of-the-art performance on three purely unsupervised re-ID benchmarks.

  • Takeaways & Limitations

    The method unifies cluster feature updating regardless of cluster or dataset size and reinforces consistency through momentum updating.

Abstract

from arXiv · show

State-of-the-art unsupervised re-ID methods train the neural networks using a memory-based non-parametric softmax loss. Instance feature vectors stored in memory are assigned pseudo-labels by clustering and updated at instance level. However, the varying cluster sizes leads to inconsistency in the updating progress of each cluster. To solve this problem, we present Cluster Contrast which stores feature vectors and computes contrast loss at the cluster level. Our approach employs a unique cluster representation to describe each cluster, resulting in a cluster-level memory dictionary. In this way, the consistency of clustering can be effectively maintained throughout the pipline and the GPU memory consumption can be significantly reduced. Thus, our method can solve the problem of cluster inconsistency and be applicable to larger data sets. In addition, we adopt different clustering algorithms to demonstrate the robustness and generalization of our framework. The application of Cluster Contrast to a standard unsupervised re-ID pipeline achieves considerable improvements of 9.9%, 8.3%, 12.1% compared to state-of-the-art purely unsupervised re-ID methods and 5.5%, 4.8%, 4.4% mAP compared to the state-of-the-art unsupervised domain adaptation re-ID methods on the Market, Duke, and MSMT17 datasets. Code is available at https://github.com/alibaba/cluster-contrast.

1 Introduction

Unsupervised person re-ID must learn cross-camera retrieval without labeled data, but instance-level memory updates become inconsistent as cluster sizes vary. Cluster Contrast addresses this with cluster representations, cluster-level contrastive loss, and momentum updates.

  • Unsupervised person re-ID trains a network to retrieve people across cameras without labeled data, motivated by surveillance demand and labeling cost.
  • Previous pipelines cluster image features into pseudo-labeled identities, then train with contrastive or non-parametric classification losses over instance memory features.DBSCAN or K-means can generate pseudo labels, which are used with losses such as triplet loss and InfoNCE.
  • Varying cluster sizes make instance-level memory updates inconsistent because only batch-limited features are refreshed during each iteration.
  • Cluster Contrast builds a cluster-level memory dictionary whose keys represent clusters with single feature vectors initialized from cluster averages and updated by batch query features.The method computes a cluster-level InfoNCE loss between cluster representations and query features, using offline clustering and excluding unclustered outliers.
  • Momentum updating further enforces consistency in cluster representations, while the method targets purely unsupervised learning rather than domain adaptation.
  • Cluster Contrast achieves state-of-the-art performance on three purely unsupervised re-ID benchmarks.

2 Related Work

Unsupervised person re-ID research includes domain adaptation and purely unsupervised pipelines, with prior work addressing pseudo-label generation, memory dictionaries, and contrastive losses. Cluster Contrast fits this landscape by applying InfoNCE between cluster features and query instances.

  • Deep Unsupervised Person Re-ID: Unsupervised person re-ID methods either transfer from labeled source data or train directly on an unlabeled target dataset.Purely unsupervised pipelines generally comprise memory initialization, pseudo-label generation, and neural-network training.
  • Deep Unsupervised Person Re-ID: Prior purely unsupervised methods improve pseudo-label quality through progressive clustering, similarity and cycle-consistency computation, or self-paced cluster refinement.
  • Memory Dictionary: Dynamic dictionaries reduce the cost of comparing all image pairs, with MoCo replacing sampled memory entries online to maintain feature consistency.
  • Loss Functions: Unsupervised re-ID commonly uses non-parametric classification losses such as InfoNCE because ground-truth identities are unavailable and pseudo labels change during training.
  • Loss Functions: Cluster Contrast computes InfoNCE between cluster features and query instance features rather than relying solely on instance-level memory entries.

3 Method

Cluster Contrast replaces instance-level memory updates with cluster-level representations and contrastive loss to improve feature consistency. It initializes cluster memory from mean features and updates representations with momentum during training.

  • Overview: Unsupervised re-ID pipelines cluster extracted image features into pseudo identities and train with contrastive loss against memory-dictionary features.Clustering and memory-based contrastive learning form the standard pipeline described here.
  • Memory Initialization: Cluster centroids are computed as mean feature vectors over their cluster members and initialize the cluster-level memory dictionary.The clustering algorithm runs at each epoch, so the number of clusters K can change during training.
  • Motivation: Instance-level memory updates become inconsistent because unbalanced clusters receive different proportions of updates under fixed minibatch sizes.Large clusters update only some instances per iteration, while small clusters may update all their instances.
  • Cluster Contrast: Cluster Contrast represents each cluster with a unique feature vector and computes the loss and memory updates at the cluster level.This design differs from prior approaches that retain instance-level memory updates.
  • Memory Updating: During training, sampled query features momentum-update the corresponding cluster representations, while each query is compared with all stored cluster representations.The momentum factor controls consistency between cluster features and the newest query features.

4 Experiment

Experiments evaluate Cluster Contrast across person and vehicle re-ID benchmarks, compare it with unsupervised methods, and analyze its components, robustness, and feature representations. The results show stronger purely unsupervised performance, batch-size robustness, and improved feature quality.

  • Datasets and Implementation: The evaluation covers Market-1501, MSMT17, PersonX, and VeRi-776 using ResNet-50 features and DBSCAN-generated pseudo labels.Market-1501 and MSMT17 are real-world person re-ID benchmarks; PersonX is synthetic, and VeRi-776 is a vehicle re-ID dataset.
  • Comparison with State-of-the-arts: 2.5%, 2.6%, and 12.4% mAP gains over the state-of-the-art purely unsupervised method are reported on Market-1501, MSMT17, and PersonX, respectively.The method performs comparably on VeRi-776 but remains inferior to methods using additional source labels or camera IDs.
  • Ablation Studies: Cluster-level memory improves performance, while momentum updating provides an additional improvement on Market-1501.Table 4 also reports that the baseline benefits from updating a larger fraction of instance features.
  • Ablation Studies: Cluster Contrast is more robust to changing batch sizes and more memory-efficient because it stores an order of magnitude fewer cluster features than instance features.Increasing batch size is constrained by GPU memory, whereas cluster-level updates can update a cluster representation in one iteration.
  • Ablation Studies: Around 20% noisy instances remain in clustered categories after training, while the proposed representation yields better intra-class and inter-class distances than the baseline.The authors speculate that improved between-class feature representation contributes to the stronger results.
  • Ablation Studies: A fully unsupervised pipeline using an unsupervised SwAV-pretrained backbone achieves better results on all four evaluated re-ID datasets.The comparison removes the usual supervised ImageNet-pretrained backbone used for clustering initialization.

5 Conclusion

Cluster Contrast computes contrastive loss in a cluster-level memory dictionary and uses momentum updating to maintain consistent cluster representations. Experiments demonstrate its effectiveness for unsupervised re-ID.

  • Conclusion: Cluster Contrast stores feature vectors and computes contrastive loss at the cluster level, unifying cluster-feature updates regardless of cluster or dataset size.Momentum updating further reinforces cluster-feature consistency.
Loading 2103.11568v4…