Code Monkey home page Code Monkey logo

ta's Introduction

Triangle Attack

This repository contains code to reproduce results from the paper:

Triangle Attack: A Query-efficient Decision-based Adversarial Attack (ECCV 2022)

Xiaosen Wang, Zeliang Zhang, Kangheng Tong, Dihong Gong, Kun He, Zhifeng Li, Wei Liu

Requirements

  • python >= 3.6.5
  • pytorch == 1.7.x
  • numpy >= 1.15.4
  • imageio >= 2.6.1
  • torch_dct >= 0.1.5

Qucik Start

Prepare the data

Firstly, you should prepare your own benign images and victim models for attack. The pathes for the input images and model are set by --dataset_path and --modelpath, respectively. You could also download our sampled 200 images used in the experiments and adopt the the pretrained models in pytorch.

Runing attack

You could run TA as follows:

CUDA_VISIBLE_DEVICES=gpuid python TA.py --dataset_path images --csv label.csv

The generated adversarial examples would be stored in directory ./output_folder. We report the attack success rates under the thresholds of 0.1, 0.05 and 0.01 respectively.

Citation

If you find the idea or code useful for your research, please consider citing our paper:

@inproceedings{wang2022Triangle,
  author={Xiaosen Wang and Zeliang Zhang and Kangheng Tong and Dihong Gong and Kun He and Zhifeng Li and Wei Liu},
  booktitle = {European Conference on Computer Vision},
  title = {Triangle Attack: A Query-efficient Decision-based Adversarial Attack},
  year = {2022},
}

Contact

Questions and suggestions can be sent to [email protected].

ta's People

Contributors

xiaosen-wang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.