Syliz517/CLIP-ReID
소개
"CLIP-ReID: Exploiting Vision-Language Model for Image Re-identification without Concrete Text Labels"(AAAI 2023)의 공식 구현입니다.
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- +3
- in 15 days
- +5
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalCLIP-ReID: Exploiting Vision-Language Model for Image Re-Identification without Concrete Text Labels [pdf]
Pipeline

Installation
conda create -n clipreid python=3.8
conda activate clipreid
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.2 -c pytorch
pip install yacs
pip install timm
pip install scikit-image
pip install tqdm
pip install ftfy
pip install regex
Prepare Dataset
Download the datasets (Market-1501, MSMT17, DukeMTMC-reID, Occluded-Duke, VehicleID, VeRi-776), and then unzip them to your_dataset_dir.
Training
For example, if you want to run CNN-based CLIP-ReID-baseline for the Market-1501, you need to modify the bottom of configs/person/cnn_base.yml to
DATASETS:
NAMES: ('market1501')
ROOT_DIR: ('your_dataset_dir')
OUTPUT_DIR: 'your_output_dir'
then run
CUDA_VISIBLE_DEVICES=0 python train.py --config_file configs/person/cnn_base.yml
if you want to run ViT-based CLIP-ReID for MSMT17, you need to modify the bottom of configs/person/vit_clipreid.yml to
DATASETS:
NAMES: ('msmt17')
ROOT_DIR: ('your_dataset_dir')
OUTPUT_DIR: 'your_output_dir'
then run
CUDA_VISIBLE_DEVICES=0 python train_clipreid.py --config_file configs/person/vit_clipreid.yml
if you want to run ViT-based CLIP-ReID+SIE+OLP for MSMT17, run:
CUDA_VISIBLE_DEVICES=0 python train_clipreid.py --config_file configs/person/vit_clipreid.yml MODEL.SIE_CAMERA True MODEL.SIE_COE 1.0 MODEL.STRIDE_SIZE '[12, 12]'
Evaluation
For example, if you want to test ViT-based CLIP-ReID for MSMT17
CUDA_VISIBLE_DEVICES=0 python test_clipreid.py --config_file configs/person/vit_clipreid.yml TEST.WEIGHT 'your_trained_checkpoints_path/ViT-B-16_60.pth'
Acknowledgement
Codebase from TransReID, CLIP, and CoOp.
The veri776 viewpoint label is from https://github.com/Zhongdao/VehicleReIDKeyPointData.
Trained models and test logs
| Datasets | MSMT17 | Market | Duke | Occ-Duke | VeRi | VehicleID |
|---|---|---|---|---|---|---|
| CNN-baseline | model|test | model|test | model|test | model|test | model|test | model|test |
| CNN-CLIP-ReID | model|test | model|test | model|test | model|test | model|test | model|test |
| ViT-baseline | model|test | model|test | model|test | model|test | model|test | model|test |
| ViT-CLIP-ReID | model|test | model|test | model|test | model|test | model|test | model|test |
| ViT-CLIP-ReID-SIE-OLP | model|test | model|test | model|test | model|test | model|test | model|test |
Note that all results listed above are without re-ranking.
With re-ranking, ViT-CLIP-ReID-SIE-OLP achieves 86.7% mAP and 91.1% R1 on MSMT17.
Citation
If you use this code for your research, please cite
@article{li2022clip,
title={CLIP-ReID: Exploiting Vision-Language Model for Image Re-Identification without Concrete Text Labels},
author={Li, Siyuan and Sun, Li and Li, Qingli},
journal={arXiv preprint arXiv:2211.13977},
year={2022}
}
관련 프로젝트 살펴보기
불러오는 중…