Giter VIP home page Giter VIP logo

super-resolution-adversarial-defense's Introduction

Image Super-Resolution as a Defense Against Adversarial Attacks

This repository is an PyTorch implementation of the paper Image Super-Resolution as a Defense Against Adversarial Attacks

We use wavelet denoising and image super resolution as pre-processing steps to defend images against adversarial attacks. If you find our work useful in your research or publication, please cite our work:

We provide scripts for reproducing all the results from our paper. You can check the efficacy of our defense on your own adversarial images.

Dependencies

  • Python 3.6
  • PyTorch >= 0.4.0
  • imageio
  • tqdm

Clone the repository

Clone this repository into any place you want.

git clone https://github.com/aamir-mustafa/super-resolution-adversarial-defense
cd super-resolution-adversarial-defense

Wavelet Denoising

You can test our wavelet denoising + super-resolution algorithm on your own adversarial images and their corresponding ground truth labels.

Wavelet_Denoising.py -- (for image wavelet denoising).

  • The denoised images will be saved in test folder.

Super Resolution

Place your denoised images in test folder. (like test/<your_image(s)>) We support jpg files.

Run the script in src folder.

cd src       # You are now in */super-resolution-adversarial-defense-master/src
sh super_resolution.sh
  • You can find the result images from experiment/test/results-Demo folder.

Accuracy Prediction

Accuracy.py (Evaluate the performace of our method by comparing accuracies on adversarial and recovered images).

Citation

@article{mustafa2019image,
  title={Image Super-Resolution as a Defense Against Adversarial Attacks},
  author={Mustafa, Aamir and Khan, Salman H and Hayat, Munawar and Shen, Jianbing and Shao, Ling},
  journal={arXiv preprint arXiv:1901.01677},
  year={2019}
}

super-resolution-adversarial-defense's People

Contributors

aamir-mustafa avatar

Watchers

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