Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dsgiitr/adversarial_lab
Web-based Tool for visualisation and generation of adversarial examples by attacking ImageNet Models like VGG, AlexNet, ResNet etc.
https://github.com/dsgiitr/adversarial_lab
adversarial-attacks computer-vision flask html-css-javascript imagenet machine-learning python pytorch visualization
Last synced: about 1 month ago
JSON representation
Web-based Tool for visualisation and generation of adversarial examples by attacking ImageNet Models like VGG, AlexNet, ResNet etc.
- Host: GitHub
- URL: https://github.com/dsgiitr/adversarial_lab
- Owner: dsgiitr
- Created: 2019-08-12T16:57:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-15T03:03:15.000Z (over 1 year ago)
- Last Synced: 2024-08-03T15:06:50.808Z (5 months ago)
- Topics: adversarial-attacks, computer-vision, flask, html-css-javascript, imagenet, machine-learning, python, pytorch, visualization
- Language: Jupyter Notebook
- Homepage:
- Size: 85.9 MB
- Stars: 51
- Watchers: 9
- Forks: 17
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Adversarial Lab
Source code for the website and the project to generate adversarial examples to fool common Machine Learning models.This is the repository for Visualizing and Comparision of Various Adversarial Attacks on user Uploaded Images using a User-Friendly interface using the DNN framework Pytorch, using popular SOTA Pretrained `TorchVision` ModelZoo. The Following Attacks have been implemented so far and code can be found inside `GAE/attacks.py`
1. FGSM
* Fast Gradient Sign Method, Untargeted
* Fast Gradient Sign Method, Targeted
2. Iterative
* Basic Iterative Method, Untargeted
* Least Likely Class Iterative Method
3. DeepFool, untargeted
4. LBFGS, targetedComing Soon: Carlini-Wagner l2, and Many More
Installation
------------Clone the git repository :
```git
git clone https://github.com/dsgiitr/adversarial_lab.git
```
Python 3 with Pytorch 1.4.0 is the primary requirement. The `requirements.txt` file contains a listing of required Python packages; to install all requirements, run the following:```bash
pip3 install -r requirements.txt
```Deploying webserver:
--------------------After downloading the repo, run `flask run`:
```bash
$ cd adversarial_lab
$ flask run
```Fire up your browser and navigate to `localhost:5000` or `your_server_url:5000`. Upload any image in JPG format, Select SOTA `torchvision` model and Adversarial Attack strategy. Experiment with the parameters for a particular algorithm and push 'Generate'. After a short while, the server returns Ajax response with Perturbed Image and Perturbation of the Original Image along with Top 5 Classified Labels for the Same.
GAE
---It is a Pytorch Library containing Simple and Fast implementations of Adversarial Attack Strategies using Pytorch. Cleverhans-Future and Advertorch can be referred for proper Robust implementations. GAE is easy to understand and only Processes a single image file at a time (as of now). Usage of the Following can be found on `Attacks Tutorial on Imagenet.ipynb` notebook.
Framework
---------
- Python `Flask`-based server
- Python backend allows access to Pytorch
- Front-end using JQuery and Bootstrap