- Code for paper ``Towards Robust Person Re-identification by Defending Against Universal Attackers" Paper.
- python 3.7.9
- CUDA==11.2
- Market1501,DukeMTMC-reID,MSMT-17,PersonX456,UnrealPerson,RandPerson
- torch==1.3.1
- torchvision==0.2.1
- Market1501,DukeMTMC-reID,MSMT-17,PersonX456 are the same as MetaAttack described
- Download UnrealPerson from link
- zip unreal_vX.Y and put them to ./data/unrealperson/raw
- final structure as follows:
. +-- data | +-- unrealperson | +-- images | +-- meta.json | +-- splits.json | +-- raw | +-- unreal_vX.Y | +-- images
- Download RandPerson(all images) from link
- only download randperson/images/subet and zip it to ./data/randperson/raw/
- final structure as follows:
. +-- data | +-- unrealperson | +-- images | +-- meta.json | +-- splits.json | +-- raw | +-- randperson_subset | +-- randperson_subset
- Download attacked re-ID models from BaiduYun (Password:7q0o)
- Put models under ./pretrained_models
- See runAttackMar.sh for more information
- Preparing perturbation models to ./attackModel, you can pre-download our attacker from BaiduYun (Password:d9bj)
- Preparing corresponding pre-trained model from BaiduYun (Password:7q0o)
- See runDefenseMar.sh for more information
- Using 'resMeta' to create model, then load defense models
- You can download our defense models from BaiduYun (Password:gbot)
Our code is based on MetaAttack, if you use our code, please also cite their paper.
@inproceedings{yang2021learning,
title={Learning to Attack Real-World Models for Person Re-identification via Virtual-Guided Meta-Learning},
author={Yang, Fengxiang and Zhong, Zhun and Liu, Hong and Wang, Zheng and Luo, Zhiming and Li, Shaozi and Sebe, Nicu and Satoh, Shin’ichi},
booktitle={AAAI},
volume={35},
number={4},
pages={3128--3135},
year={2021}
}
If you find this repo useful for your research, please consider citing the paper
@article{yang2022towards,
title={Towards Robust Person Re-Identification by Defending Against Universal Attackers},
author={Yang, Fengxiang and Weng, Juanjuan and Zhong, Zhun and Liu, Hong and Wang, Zheng and Luo, Zhiming and Cao, Donglin and Li, Shaozi and Satoh, Shin'ichi and Sebe, Nicu},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2022},
publisher={IEEE}
}