Skip to content

WJJLL/Meta-Attack-Defense

Repository files navigation

Meta-Attack-Defense (TPAMI 2022)

  • Code for paper ``Towards Robust Person Re-identification by Defending Against Universal Attackers" Paper.

Requirements:

  • python 3.7.9
  • CUDA==11.2
  • Market1501,DukeMTMC-reID,MSMT-17,PersonX456,UnrealPerson,RandPerson
  • torch==1.3.1
  • torchvision==0.2.1

Preparing Data

  • 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

Preparing Attacked re-ID Models

  • Download attacked re-ID models from BaiduYun (Password:7q0o)
  • Put models under ./pretrained_models

Run our Attack Code

  • See runAttackMar.sh for more information

Run our Defense Code

  • 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

Evaluate our Defense Models

  • Using 'resMeta' to create model, then load defense models
  • You can download our defense models from BaiduYun (Password:gbot)

Acknowledgments

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}
}

Citation

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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published