This is the official code of our "Sampling Agnostic Feature Representation for Long-Term Person Re-identification", IEEE Transactions on Image Processing (TIP), 2022.
- Python 3.8.8
- CUDA 11.0
- Pytorch 1.7.1
- Sklearn 0.24.1
- processingtools 0.2.5
Please check requirements.txt for other packages.
python -m train_utils.train --data_root=<> --configs=<> --batch_size=2 --save_path=<> --epoch=<> --workers=4 --snapshot --rerank
(notice) Argument 'snapshot' will save the current folder. Thus, the save path must not include the current path.
In each dataset, we used the below epoch values.
- Celeb-reID: 15
- Celeb-reID-light: 60
- LTCC: 100
- VC-Clothes: 80
Config files are provided in configs folder.
Download each dataset before running code.
If you use Celeb-reID dataset or Celeb-reID-light dataset, just set '--data_root' as dataset root, however, if you want to use other dataset, you need to change dataset form as Celeb-reID dataset form.
You can use provided files in change_form.
python -m evaluate.evaluate --data_root=<> --configs=<> --batch_size=2 --save_path=<> --workers=4 --model=<> --rerank
If you use Celeb-reID dataset, Celeb-reID-light dataset or VC-Clothes dataset, just run the evaluate.py file in evaluate, however if you want to use LTCC datasets, you need to modify Clothes_Change_Person_ReID to get proper results.
Results (You can download pre-trained models here.)
Our code and the models/AdaINGenerator.py is under the CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International). You can check here for models/AdaINGenerator.py.