CLIP-ReID: Exploiting Vision-Language Model for Image Re-Identification without Concrete Text Labels

25 Nov 2022  ยท  Siyuan Li, Li Sun, Qingli Li ยท

Pre-trained vision-language models like CLIP have recently shown superior performances on various downstream tasks, including image classification and segmentation. However, in fine-grained image re-identification (ReID), the labels are indexes, lacking concrete text descriptions. Therefore, it remains to be determined how such models could be applied to these tasks. This paper first finds out that simply fine-tuning the visual model initialized by the image encoder in CLIP, has already obtained competitive performances in various ReID tasks. Then we propose a two-stage strategy to facilitate a better visual representation. The key idea is to fully exploit the cross-modal description ability in CLIP through a set of learnable text tokens for each ID and give them to the text encoder to form ambiguous descriptions. In the first training stage, image and text encoders from CLIP keep fixed, and only the text tokens are optimized from scratch by the contrastive loss computed within a batch. In the second stage, the ID-specific text tokens and their encoder become static, providing constraints for fine-tuning the image encoder. With the help of the designed loss in the downstream task, the image encoder is able to represent data as vectors in the feature embedding accurately. The effectiveness of the proposed strategy is validated on several datasets for the person or vehicle ReID tasks. Code is available at https://github.com/Syliz517/CLIP-ReID.

PDF Abstract

Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Person Re-Identification DukeMTMC-reID CLIP-ReID (without re-ranking) Rank-1 90.8 # 26
mAP 83.1 # 26
Person Re-Identification Market-1501 CLIP-ReID (without re-ranking) Rank-1 95.4 # 47
mAP 90.5 # 36
Person Re-Identification MSMT17 CLIP-ReID (with re-ranking) Rank-1 91.1 # 2
mAP 86.7 # 1
Person Re-Identification MSMT17 CLIP-ReID (without re-ranking) Rank-1 89.7 # 5
mAP 75.8 # 8
Vehicle Re-Identification VehicleID Small CLIP-ReID (without re-ranking) Rank-1 85.5 # 8
Rank-5 97.2 # 7
Vehicle Re-Identification VeRi-776 CLIP-ReID (without re-ranking) mAP 84.5 # 6
Rank-1 97.3 # 4

Methods