Coder Social home page Coder Social logo

ywu40 / flowattack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anuragranj/flowattack

0.0 1.0 0.0 23.89 MB

Attacking Optical Flow (ICCV 2019)

Home Page: https://flowattack.is.tue.mpg.de

License: Other

Python 91.56% Shell 0.09% C++ 0.62% Cuda 7.74%

flowattack's Introduction

Flow Attack

This is an official repository of

Anurag Ranjan, Joel Janai, Andreas Geiger, Michael J. Black. Attacking Optical Flow. ICCV 2019.

[Project Page] [Arxiv]

Prerequisites

Python3 and pytorch are required. Third party libraries can be installed (in a python3 virtualenv) using:

pip3 install -r requirements.txt

Install custom cuda layers for FlowNet2 using

bash install_flownet2_deps.sh

Preparing training data

Download the KITTI dataset using this script provided on the official website, and then run the following command.

python3 data/prepare_train_data.py /path/to/raw/kitti/dataset/ --dataset-format 'kitti' --dump-root /path/to/resulting/formatted/data/ --width 1280 --height 384 --num-threads 1 --with-gt

For testing optical flow ground truths on KITTI, download KITTI2015 dataset.

Pretrained Models

Download the pretrained models for FlowNetC, FlowNet2, PWC-Net. The pretrained models for SPyNet and Back2Future are provided with this repository.

Generating Adversarial Patches

White-Box Attacks

In the White-Box attacks we optimize a patch for a single network. We use gradient descent as described in the paper. Use the following command to generate an adversarial patch for a specific network architecture using the prepared dataset:

python3 main.py --data [Path to prepared dataset] --kitti-data [Path to KITTI 2015 test set] --flownet [FlowNetS|FlowNetC|FlowNet2|PWCNet|Back2Future|SpyNet] --patch-size 0.10 --name [Name of the experiment]

The patch size is specified in percentage of the training image size (default: 256). All other arguments such as the learning rate, epoch size, etc are set to the values used in our experiments. For details please check main.py

Acknowledgements

flowattack's People

Contributors

anuragranj avatar

Watchers

James Cloos 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.