Official repository of our BMVC2020 paper. The code is implemented by PyTorch and some other libraries.
Experiments were conducted on Ubuntu 18.04 with Python 3.6 and PyTorch v1.3.1. You can install the dependencies by the following command:
pip install -r requirements.txt
In our experiments, the following datasets are used for the training and test:
- CUHK02
- CUHK03
- Market1501
- DukeMTMC-reID
- PersonSearch
- VIPeR
- PRID
- GRID
- i-LIDS
Download and extract all the datasets and place them to data/original
. For training, the data have to be relocated. Using the following command, the data are automatically relocated:
./scripts/relocate_dataset.sh
Note that some of the datasets might be removed from the Internet. We cannot provide them so please ask the dataset authors about the status.
We have prepared the training scripts for each of the experiments described in our paper. You can use them if the data are relocated by our script. If not, change the train_targets
and test_targets
options. Our scripts can be used as follows:
./scripts/train_mobilenet_v2.sh
./scripts/train_resnet50.sh
./scripts/train_market.sh
./scripts/train_duke.sh
The tests are carried out at the end of each epoch.
Training and test results are saved to the directory specified at the start of training with the log_path
option. You can check the results with Tensorboard. For example, if the option is set to logs_mobilenet_v2
, you can start Tensorboard with the following command:
tensorboard --logdir logs_mobilenet_v2
For each dataset, the rank-1 accuracy is shown.
VIPeR | PRID | GRID | i-LIDS | |
---|---|---|---|---|
DIMN | 51.2 | 39.2 | 29.3 | 70.2 |
DualNorm | 53.9 | 60.4 | 41.4 | 74.8 |
DualNorm + BCaR | 57.3 | 62.0 | 42.3 | 80.0 |
VIPeR | PRID | GRID | i-LIDS | |
---|---|---|---|---|
DualNorm | 59.4 | 69.6 | 43.7 | 78.2 |
DualNorm + BCaR | 65.8 | 70.2 | 52.8 | 81.3 |
Rank-1 | Rank-5 | Rank-10 | mAP | |
---|---|---|---|---|
DualNorm | 82.6 | 91.7 | 95.3 | 57.2 |
DualNorm + BCaR | 87.6 | 95.5 | 97.1 | 65.7 |
Rank-1 | Rank-5 | Rank-10 | mAP | |
---|---|---|---|---|
DualNorm | 71.2 | 82.5 | 86.3 | 48.3 |
DualNorm + BCaR | 78.6 | 86.5 | 89.6 | 55.2 |
Please consider citing our paper if it helps your research:
@inproceedings{masato_bmvc2020,
author = {Tamura, Masato and Yoshinaga, Tomoaki},
title = {BCaR: Beginner Classifier as Regularization Towards Generalizable Re-ID},
booktitle={BMVC},
year = {2020},
month = {September}
}
Some of the codes are build upon DualNorm. Thanks them for the great work!