zhangyu13a / transPhyAtt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boosting Transferability of Physical Attack against Detectors by Redistributing Separable Attentions

Requirements

  • To install requirements:
    • pytorch3d: 0.6.0
    • torch: 1.8.0
    • torchvision: 0.9.0

📋 you need to download dataset and model weight before running the code:

📋 Our 3D model mesh and texture are provided in 3d_model folder and indexs of the sampled faces could be accessed in top_faces.txt.

Training

To train the model in the paper, run this command:

python train.py --train_dir <path_to_data> --weightfile <path_to_weight>   --batch_size 2 --epochs 5

Testing

After training, the code yields two files (patch_save.pt and idx_save.pt), which include information of adversarial texture. The final adversarial samples could be obtained by running this command:

python test.py --test_dir <path_to_data>    --patch_dir <path_to_patch>

About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%