git clone https://github.com/dapeng/SPAL.git
cd SPAL
python setup.py develop
cd examples && mkdir data
Download the person datasets Market-1501, MSMT17. Then unzip them under the directory like
SPAL/examples/data
├── market1501
│ └── Market-1501-v15.09.15
└── msmt17
└── MSMT17_V1
-
ImageNet-pretrained models for ResNet-50 will be automatically downloaded in the python script.
-
When training with the backbone of IBN-ResNet, you need to download the ImageNet-pretrained model from this link and save it under the path of
logs/pretrained/
.mkdir logs && cd logs mkdir pretrained
The file tree should be
SPAL/logs └── pretrained └── resnet50_ibn_a.pth.tar
We utilize 4 GPUs for training. To train the model(s) in the paper, run this command:
CUDA_VISIBLE_DEVICES=0,1,2,3 python examples/train.py -d $DATASET --logs-dir $PATH_OF_LOGS
Note that
- We set the labeling budget to
2n
for all the experiments. The actual labeling cost is reported if the cost is less than the budget.
To evaluate the model, run:
CUDA_VISIBLE_DEVICES=0 python examples/test.py -d $DATASET --resume $PATH
If you find this code useful for your research, please cite our paper
@article{jin2022towards,
title={Towards Fewer Labels: Support Pair Active Learning for Person Re-identification},
author={Jin, Dapeng and Li, Minxian},
journal={arXiv preprint arXiv:2204.10008},
year={2022}
}
Thanks to Yixiao Ge for opening source of her excellent works SpCL.