This is the code of the paper "PAD: Patch-Agnostic Defense against Adversarial Patch Attacks", without parallel acceleration.
conda create --name pad python=3.8
conda activate pad
pip install -r requirements.txt
python run-PAD.py
Remember to replace the file path with your own.
input_path: the dir path of the attacked images
save_path: the dir path where you want to save the defended images