Source-Guided Similarity Preservation for Online Person Re-Identification

Hamza Rami, Jhony H. Giraldo, Nicolas Winckler, Stéphane Lathuilière

Abstract

Online Unsupervised Domain Adaptation (OUDA) for person Re-Identification (Re-ID) is the task of continuously adapting a model trained on a well-annotated source domain dataset to a target domain observed as a data stream. In OUDA, person Re-ID models face two main challenges: catastrophic forgetting and domain shift. In this work, we propose a new Source-guided Similarity Preservation (S2P) framework to alleviate these two problems. Our framework is based on the extraction of a support set composed of source images that maximizes the similarity with the target data. This support set is used to identify feature similarities that must be preserved during the learning process. S2P can incorporate multiple existing UDA methods to mitigate catastrophic forgetting. Our experiments show that S2P outperforms previous state-of-the-art methods on multiple real-to-real and synthetic-to-real challenging OUDA benchmarks.

Introduction

Person Re-Identification (Re-ID) is a critical task in surveillance and public safety, involving the identification of the same individual across non-overlapping camera views. While models often perform well in their training environment (the source domain), they frequently struggle when deployed in new environments (the target domain) due to "domain shift"—variations in lighting, camera angles, and clothing styles.

Traditional Unsupervised Domain Adaptation (UDA) addresses this by training on a pre-collected target dataset. However, real-world applications often require Online UDA, where data arrives as a continuous stream. This setting introduces two significant challenges:

  1. Catastrophic Forgetting: As the model adapts to new data in the stream, it tends to lose information learned from the source domain or earlier parts of the target stream.
  2. Domain Shift: Aligning features between source and target domains is difficult when the model only has access to a small, potentially biased window of the target data at any given time. Furthermore, privacy regulations like GDPR often prohibit the long-term storage of target images, preventing standard "replay-based" strategies to combat forgetting.

The S2P Framework

To address these challenges, we propose Source-guided Similarity Preservation (S2P). S2P is a "plug-and-play" framework designed to enhance existing Re-ID methods in online settings. Its core innovation lies in using the labeled source domain as a "proxy memory" for the target stream.

The S2P pipeline uses a teacher-student architecture and similarity-based selection from the source domain to guide learning on the target data stream.

The framework consists of three main components:

  • Source-Guided Support Sets: Instead of storing sensitive target images, S2P identifies images in the source domain that are most similar to the current target data. These "support sets" act as a privacy-compliant proxy for the target data, allowing the model to maintain stability without violating data protection laws.
  • Similarity-Based Knowledge Distillation (KD): S2P employs a teacher-student architecture where the teacher is an exponential moving average of the student. Rather than distilling absolute labels, S2P focuses on preserving the similarity matrices between features. This ensures that the relative distances between identities in the feature space remain consistent, which is crucial for the ranking-based nature of Re-ID.
  • Distribution Alignment (MMD): To bridge the domain gap, Maximum Mean Discrepancy (MMD) loss is used to minimize the distance between the feature distributions of the source support set and the current target stream, promoting the learning of domain-invariant representations.

Experimental Evaluation

We evaluated S2P across several challenging benchmarks, including real-to-real (Market-1501, MSMT17, CUHK03) and synthetic-to-real (RandPerson to Market-1501) transitions.

Comparison of S2P against various baselines across different datasets, showing improved stability and performance over time.

Our results demonstrate that S2P consistently improves the performance and stability of various state-of-the-art UDA methods (like MMT, SpCL, and IDM) when applied to the online setting:

  • Performance Gains: In the MSMT17 $\rightarrow$ CUHK03 task, S2P boosted the mAP of the MMT baseline from 32.2% to 40.4%.
  • Synthetic-to-Real Adaptation: When adapting from synthetic RandPerson data to real Market-1501 images, S2P-IDM achieved a Rank-1 accuracy of 86.1%, compared to 80.4% for the standard IDM.
  • Stability: Unlike baseline models that often show fluctuating performance as they forget previous tasks, S2P maintains a steady upward learning curve, effectively mitigating catastrophic forgetting.

Conclusion

S2P offers a robust, privacy-first solution for online person Re-ID. By leveraging the source domain as a mirror for the target, it bypasses the need for sensitive data storage while providing the stability required for continuous learning. While the method's effectiveness depends on the diversity of the source domain and introduces some computational overhead for similarity searches, it represents a significant step toward deploying adaptive Re-ID systems in the real world. Future work will focus on optimizing search efficiency and exploring adaptation in open-set scenarios where the number of identities is unknown.

Summary updated

Abstract

Online Unsupervised Domain Adaptation (OUDA) for person Re-Identification (Re-ID) is the task of continuously adapting a model trained on a well-annotated source domain dataset to a target domain observed as a data stream. In OUDA, person Re-ID models face two main challenges: catastrophic forgetting and domain shift. In this work, we propose a new Source-guided Similarity Preservation (S2P) framework to alleviate these two problems. Our framework is based on the extraction of a support set composed of source images that maximizes the similarity with the target data. This support set is used to identify feature similarities that must be preserved during the learning process. S2P can incorporate multiple existing UDA methods to mitigate catastrophic forgetting. Our experiments show that S2P outperforms previous state-of-the-art methods on multiple real-to-real and synthetic-to-real challenging OUDA benchmarks.
BibTeX
@inproceedings{rami2024source,
  author = {Hamza Rami and Jhony H. Giraldo and Nicolas Winckler and Stéphane Lathuilière},
  title = {{Source-Guided Similarity Preservation for Online Person Re-Identification}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  url = {https://openreview.net/forum?id=Nlt25YP3AF},
}
Figure