VITA-Group / 3D_Adversarial_Logo

[Preprint] "Can 3D Adversarial Logos Cloak Humans?"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can 3D Adversarial Logos Clock Humans?

License: MIT

Can 3D Adversarial Logos Clock Humans?

Yi Wang*, Jingyang Zhou*, Tianlong Chen, Sijia Liu, Shiyu Chang, Chandrajit Bajaj, Zhangyang Wang

Overview

Examples of our 3D adversarial logo attack on different3D object meshes to fool a YOLOV2 detector.

Methodology

Prerequisites and Installation

  • Python 3

  • Pytorch 1.1.0

  • CUDA 9.2 (lower versions may work but were not tested)

  • TensorboardX

    pip install tensorboardX tensorboard
  • Neural renderer

    pip install neural-renderer-pytorch
  • Clone this repo

    git clone https://github.com/TAMU-VITA/3D_Adversarial_Logo.git
    cd 3D_Adversarial_Logo
  • Yolov2 weights

    mkdir weights
    curl https://pjreddie.com/media/files/yolov2.weights -o weights/yolo.weights

Usage

Prepare the dataset

  • Datasets and our prediction images can be found here.
  • Our pre-trained 3d adversarial logos can be found here.

Remark. After downloading them, put the data and weight under the 3D_Adversarial_Logo folder.

Arguments

  • --width : the width of the universal logo.
  • --height : the height of the universal logo.
  • --depth : the depth of the universal logo (default is 1 to form an image).
  • --angle_range : the angle range of the camera view for training (eg. 10 for +/- 10 degree)
  • --logonum : the total faces of the 3D logo.
  • --train_mesh : which mesh to train (the 123 denotes mesh 1&2&3, which can be further upgraded by adding nargs='+' in parsing args).
  • --test_mesh : which mesh to test (the 123 denotes mesh 1&2&3, which can be further upgraded by adding nargs='+' in parsing args).
  • --consistent : whether to share the same universal logo among all the meshes.
  • --logo_ref : which logo to train with.
  • --train_patch : whether to train 2D patch.
  • --restore_model : whether to restore the saved universal logo.
  • --save_model : whether to save the universal logo.

Run 3D adversarial logos

  • logo: X

    python train_patch1.py --width=100 --height=150 --depth=1 --angle_range=0 --logonum=25 --train_mesh=123 --consistent --logo_ref=X --save_model >logo-records/logoX.out 2>&1 &
  • logo: X (medium)

    python train_patch1.py --width=100 --height=150 --depth=1 --angle_range=0 --logonum=10 --train_mesh=123 --consistent --logo_ref=X --save_model >logo-records/logoX.out 2>&1 &
  • logo: X (small)

    python train_patch1.py --width=100 --height=150 --depth=1 --angle_range=0 --logonum=5 --train_mesh=123 --consistent --logo_ref=X --save_model >logo-records/logoX.out 2>&1 &
  • logo: H

    python train_patch1.py --width=100 --height=150 --depth=1 --angle_range=0 --logonum=25 --train_mesh=123 --consistent --logo_ref=H --save_model >logo-records/logoH.out 2>&1 &
  • logo: T

    python train_patch1.py --width=100 --height=150 --depth=1 --angle_range=0 --logonum=25 --train_mesh=123 --consistent --logo_ref=T --save_model >logo-records/logoT.out 2>&1 &
  • logo: G

    python train_patch1.py --width=100 --height=100 --depth=1 --angle_range=0 --logonum=17 --train_mesh=123 --consistent --logo_ref=G --save_model >logo-records/logoG.out 2>&1 &
  • logo: C

    python train_patch1.py --width=100 --height=100 --depth=1 --angle_range=0 --logonum=17 --train_mesh=123 --consistent --logo_ref=C --save_model >logo-records/logoC.out 2>&1 &
  • logo: O

    python train_patch1.py --width=100 --height=100 --depth=1 --angle_range=0 --logonum=17 --train_mesh=123 --consistent --logo_ref=O --save_model >logo-records/logoO.out 2>&1 &
  • logo: tw

    python train_patch1.py --width=100 --height=100 --depth=1 --angle_range=0 --logonum=25 --train_mesh=123 --consistent --logo_ref=tw --save_model >logo-records/logotw.out 2>&1 &
  • logo: drop

    python train_patch1.py --width=100 --height=150 --depth=1 --angle_range=0 --logonum=25 --train_mesh=123 --consistent --logo_ref=drop --save_model >logo-records/logodrop.out 2>&1 &

Train 2D adversarial patch

  • logo: G

    python train_patch1.py --width=100 --height=100 --depth=1 --angle_range=0 --logonum=17 --train_mesh=123 --consistent --logo_ref=G --restore_model --save_model --train_patch

Citation

If you are use this code for you research, please cite our paper.

@article{chen2020can,
  title={Can 3D Adversarial Logos Cloak Humans?},
  author={Chen, Tianlong and Wang, Yi and Zhou, Jingyang and Liu, Sijia and Chang, Shiyu and Bajaj, Chandrajit and Wang, Zhangyang},
  journal={arXiv preprint arXiv:2006.14655},
  year={2020}
}

About

[Preprint] "Can 3D Adversarial Logos Cloak Humans?"

License:MIT License


Languages

Language:Python 78.8%Language:Jupyter Notebook 12.7%Language:C 4.3%Language:Cuda 3.7%Language:Shell 0.2%Language:C++ 0.2%Language:Makefile 0.2%Language:Dockerfile 0.0%