Coder Social home page Coder Social logo

issba's Introduction

Invisible Backdoor Attack with Sample-Specific Triggers

Environment

This project is developed with Python 3.6 on Ubuntu 18.04. Please run the following script to install the required packages

pip install -r requirements.txt

Demo

Before running the code, please download the checkpoints from Baidudisk (code:o89z), and put them into ckpt folder.

  1. Generating poisoned sample with sample-specific trigger.

    # TensorFlow
    python encode_image.py \
    --model_path=ckpt/encoder_imagenet \
    --image_path=data/imagenet/org/n01770393_12386.JPEG \
    --out_dir=data/imagenet/bd/ 
    Benign image Backdoor image Trigger
  2. Runing test.py for testing benign and poisoned images.

    # PyTorch
    python test.py

Train

  1. Download data from Baidudisk(code:oxgb) and unzip it to folder datasets/.

  2. Run training script bash train.sh.

  3. The files in checkpoint folder are as following:

    --- args.json # Input arguments
    |-- x_checkpoint.pth.tar # checkpoint
    |-- x_model_best.pth.tar # best checkpoint
    |-- x.txt # log file
    

Defense

Comming soon...

Citation

Please cite our paper in your publications if it helps your research:

@inproceedings{li_ISSBA_2021,
  title={Invisible Backdoor Attack with Sample-Specific Triggers},
  author={Li, Yuezun and Li, Yiming and Wu, Baoyuan and Li, Longkang and He, Ran and Lyu, Siwei},
  booktitle={IEEE International Conference on Computer Vision (ICCV)},
  year={2021}
}

Notice

This repository is NOT for commecial use. It is provided "as it is" and we are not responsible for any subsequence of using this code.

issba's People

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.