Giter Club home page Giter Club logo

short-lived-adversarial-perturbations's Introduction

SLAP: Improving Physical Adversarial Examples with Short-Lived Adversarial Perturbations

Artifacts for "SLAP: Improving Physical Adversarial Examples with Short-Lived Adversarial Perturbations" to appear in Usenix Security 2021.

Data and Models

Data and models used in this paper are available in this release. The data.zip folder will contain the following files:

.  # data.zip
├── models                    # contains all models
│   ├── yolov3           
│   ├── maskrcnn
│   ├── gtsrbcnn
│   │   │── cvpr18            # taken from cvpr18 paper
│   │   │── cvpr18iyswim      # above with input randomization layer added
│   │   │── usenix21          # architecture from cvpr18 but re-trained
│   │   └── usenix21adv       # above but trained with adversarial loss
│   └── lisacnn               # same subfolders as gtsrbcnn
├── indoor                    # data used in indoors experiment
│   ├── objects               # target objects cutouts
│   ├── profile               # profiling data, used to fit projection model
│   │   │── 120/stop_sign/all_triples.csv  # file used in 120 lux, for stop sign target
│   │   └── ...        
│   └── optimize
│       │── 120/stop_sign/yolov3/_best_projection.png  # projection image used for 120 lux, stop sign, yolov3 model
│       └── ...        
├── outdoor                    # data used in outdoors experiment 
└── datasets                   # image datasets used for re-training
    ├── gtsrb           
    └── lisa

Using this codebase

This repository contains most of the code used in the paper. We also publish a Docker image containing the execution environment and data and models used in this work.

To use this repository, you will need docker, docker-compose and a GPU. Make sure that the GPU is available within docker containers, (e.g., we had to set "default-runtime": "nvidia" in /etc/docker/daemon.json). Most of the code will also work on a CPU once you replace tensorflow-gpu with tensorflow==1.15.3; if you do not have a GPU you can do this inside the container or rebuild it from a cpu-based image (FROM tensorflow/tensorflow:1.15.3-py3-jupyter).

Follow these steps:

  • git clone https://github.com/ssloxford/short-lived-adversarial-perturbations.git
  • cd short-lived-adversarial-perturbations/
  • wget https://github.com/ssloxford/short-lived-adversarial-perturbations/releases/download/usenix21/data.zip the data.zip contains models and data necessary to run tests.
  • unzip data.zip
  • docker pull giuliolovisotto/short-lived-adversarial-perturbations:usenix21
  • docker-compose up -d
  • docker attach slap_container
  • nose2 this runs a set of tests which verify that the basic functionalities run correctly.

One can check examples of usage by locally opening the notebook the notebook example.ipynb (the notebook is running inside the container and forwarded on this port). The password is slap@usenix21.

You can also check the content of this notebook online example.ipynb.

Contributors

Acknowledgements

This work was generously supported by a grant from armasuisse and by the Engineering and Physical Sciences Research Council [grant numbers EP/N509711/1, EP/P00881X/1].

short-lived-adversarial-perturbations's People

Contributors

giuliolovisotto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.