Context-Aware Person Re-Identification With Guided Prompt Pooling
Abstract
Text-based person re-identification (ReID) has significantly progressed using vision-language models such as CLIP. But most datasets lack textual descriptions, and manual annotation is expensive. Therefore, many recent models propose to use learnable prompts as substitutes for human annotations. However, prompt-based solutions often use identical text prompts across all classes and treat them independently, resulting in poor semantic adaptability to diverse visual features. In order to address this, we present CapReID, a context-aware prompt pooling, guided by Optimal Transport Theory based distance function. Specifically, we design a two stage training process, where the first stage is the Prompt Pooling that selects only the prompts that align well with the image context using a Wasserstein distance-based weighted pooling technique. In the second stage, we propose a negative prompting-based triplet loss for enhancing image-prompt alignment. Extensive experiments on Market-1501, MSMT17, and DukeMTMC show that CapReID achieves 94.7% Rank-1 accuracy, highlighting its superior discriminability and semantic grounding compared to prior CLIP-based baselines. Code is available at https://github.com/Nirmala891/Context-aware-prompt-based-person-re-identification.
Fields of Study & Subjects
Video Surveillance and Tracking Methods
Domain Adaptation and Few-Shot Learning
Advanced Image and Video Retrieval Techniques
Publication details
- Journal / source
- IEEE Transactions on Biometrics Behavior and Identity Science
- Volume
- 8
- Issue
- 3
- Pages
- 392–397
- Publication date
- 15 January 2026