- Introduction: This project re-implements the strong person re-identification baseline: Bag of Tricks (paper and official code).
- Advantage: This project provides a more simple and clear implementation by only using the best parameters and removing lots of unnecessary modules.
- 2020-03-27: [CVPR'20] Our new work about Occluded ReID has been accepted by CVPR'20. (Paper)
- 2020-01-01: [AAAI'20] Our new work about RGB-Infrared(IR) ReID for dark situation has been accepted by AAAI'20. (Paper, Code).
- 2019-10-25: [ICCV'19] Our new work about RGB-Infrared(IR) ReID for dark situation has been accepted by ICCV'19. (Paper, Code).
- 2019-05-01: We implement PCB and achieve better performance than the offical one. (Code)
- 2020-03-27: add demo.py to visualize customed dataset.
- 2020-03-27: we change the dependency to Python3.7 and PyTorch-1.1.0. If you want the old version depending on Python-2.7 and PyTorch-0.4.0, please find on verion_py27 branch.
- 2019-06-18: we add visualization code to show ranked images
- Anaconda (Python 3.7)
- PyTorch 1.1.0
- GPU Memory >= 10G
- Memory >= 10G
- Market-1501 Dataset and DukeMTMC-reID Dataset
- Download and extract both anywhere
python3 main.py --mode train \
--train_dataset market --test_dataset market \
--market_path /path/to/market/dataset/ \
--output_path ./results/market/
python3 main.py --mode train \
--train_dataset duke --test_dataset duke \
--duke_path /path/to/duke/dataset/ \
--output_path ./results/duke/
python3 main.py --mode test \
--train_dataset market --test_dataset market \
--market_path /path/to/market/dataset/ \
--resume_test_model /path/to/pretrained/model.pkl \
--output_path ./results/test-on-market/
python3 main.py --mode test \
--train_dataset duke --test_dataset duke \
--market_path /path/to/duke/dataset/ \
--resume_test_model /path/to/pretrained/model.pkl \
--output_path ./results/test-on-duke/
python3 main.py --mode visualize --visualize_mode inter-camera \
--train_dataset market --visualize_dataset market \
--market_path /path/to/market/dataset/ \
--resume_visualize_model /path/to/pretrained/model.pkl \
--visualize_output_path ./results/vis-on-market/
python3 main.py --mode visualize --visualize_mode inter-camera \
--train_dataset duke --visualize_dataset duke \
--market_path /path/to/duke/dataset/ \
--resume_visualize_model /path/to/pretrained/model.pkl \
--visualize_output_path ./results/vis-on-duke/
# customed dataset structure
|____ data_path/
|____ person_id_1/
|____ pid_1_imgid_1.jpg
|____ pid_1_imgid_2.jpg
|____ ......
|____ person_id_2/
|____ person_id_3/
|____ ......
python3 demo.py \
--resume_visualize_model /path/to/pretrained/model.pkl \
--query_path /path/to/query/dataset/ --gallery_path /path/to/gallery/dataset/ \
--visualize_output_path ./results/vis-on-cus/
- Warm up learning rate
- Random erasing augmentation (REA)
- Label smoothing
- Last stride
- BNNeck
- We conduct our experiments on 1 GTX1080ti GPU
Repeat | market2market | market2duke | duke2duke | duke2market | |
---|---|---|---|---|---|
1 | 0.939 (0.858) | 0.290 (0.159) | 0.874 (0.767) | 0.486 (0.210) | |
2 | 0.944 (0.858) | 0.295 (0.156) | 0.868 (0.765) | 0.492 (0.223) | |
3 | 0.942 (0.859) | 0.281 (0.152) | 0.863 (0.765) | 0.485 (0.221) | |
Average | 0.942 (0.858) | 0.289 (0.156) | 0.868 (0.766) | 0.488 (0.218) | |
Paper | 0.941 (0.857) | - | 0.864 (0.764) |
Repeat | market2market | market2duke | duke2duke | duke2market | |
---|---|---|---|---|---|
1 | 0.936 (0.824) | 0.427 (0.264) | 0.849 (0.714) | 0.556 (0.269) | |
Paper | - | 0.414(0.257) | - | 0.543 (0.255) |
- More results can be seen in folder
ranked_images/market
If you have any question about the project, please feel free to contact with me.
E-mail: guan.wang0706@gmail.com