Metadata-Version: 2.1
Name: whitebox-adversarial-toolbox
Version: 0.2.3
Summary: WHite-box Adversarial Toolbox (WHAT) - Python Library for Deep Learning Security
Home-page: https://github.com/wuhanstudio/whitebox-adversarial-toolbox
Author: wuhanstudio
Author-email: wuhanstudio <wuhanstudios@gmail.com>
Maintainer: wuhanstudio
Maintainer-email: wuhanstudio <wuhanstudios@gmail.com>
License: MIT License
Project-URL: Homepage, https://github.com/wuhanstudio/whitebox-adversarial-toolbox
Project-URL: Bug Tracker, https://github.com/wuhanstudio/whitebox-adversarial-toolbox/issues
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.18.0
Requires-Dist: tqdm
Requires-Dist: six
Requires-Dist: setuptools
Requires-Dist: torch==1.11.0
Requires-Dist: torchvision
Requires-Dist: opencv-python
Requires-Dist: scikit-image
Requires-Dist: tensorflow==2.4.0
Requires-Dist: keras==2.4.3
Requires-Dist: h5py==2.10.0
Requires-Dist: matplotlib
Requires-Dist: pandas
Requires-Dist: click
Requires-Dist: progressbar

<img src="https://what.wuhanstudio.uk/images/what.png" width=300px style="float: left;" >

# WHite-box Adversarial Toolbox (WHAT)

<!-- [![CircleCI](https://circleci.com/gh/wuhanstudio/whitebox-adversarial-toolbox.svg?style=svg)](https://circleci.com/gh/wuhanstudio/whitebox-adversarial-toolbox) -->
[![Build Status](https://app.travis-ci.com/wuhanstudio/whitebox-adversarial-toolbox.svg?branch=master)](https://app.travis-ci.com/wuhanstudio/whitebox-adversarial-toolbox)
[![PyPI version](https://badge.fury.io/py/whitebox-adversarial-toolbox.svg)](https://badge.fury.io/py/whitebox-adversarial-toolbox)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/whitebox-adversarial-toolbox)](https://pypi.org/project/whitebox-adversarial-toolbox/)
[![](https://img.shields.io/badge/Documentation-brightgreen)](https://what.wuhanstudio.uk/)

A Python Library for Deep Learning Security that focuses on Real-time White-box Attacks.

![](docs/images/demo.gif)

## Installation

```python
pip install whitebox-adversarial-toolbox
```

## Usage (CLI)

```
Usage: what [OPTIONS] COMMAND [ARGS]...

  The CLI tool for WHitebox-box Adversarial Toolbox (what).

Options:
  --help  Show this message and exit.

Commands:
  attack   Manage Attacks
  example  Manage Examples
  model    Manage Deep Learning Models
```

Useful commands:

```
# List supported models
$ what model list

# List supported Attacks
$ what attack list

# List available examples
$ what example list
```

Available models:

```
[x] 1 : YOLOv3      (    Darknet    )   Object Detection        YOLOv3 pretrained on MS COCO dataset.
[x] 2 : YOLOv3      (   Mobilenet   )   Object Detection        YOLOv3 pretrained on MS COCO dataset.
[x] 3 : YOLOv3 Tiny (    Darknet    )   Object Detection        YOLOv3 Tiny pretrained on MS COCO dataset.
[x] 4 : YOLOv3 Tiny (   MobileNet   )   Object Detection        YOLOv3 Tiny pretrained on MS COCO dataset.
[x] 5 : YOLOv4      (    Darknet    )   Object Detection        YOLOv4 pretrained on MS COCO dataset.
[x] 6 : YOLOv4 Tiny (    Darknet    )   Object Detection        YOLOv4 Tiny pretrained on MS COCO dataset.
[x] 7 : SSD         ( MobileNet  v1 )   Object Detection        SSD pretrained on VOC-2012 dataset.
[x] 8 : SSD         ( MobileNet  v2 )   Object Detection        SSD pretrained on VOC-2012 dataset.
[x] 9 : FasterRCNN  (     VGG16     )   Object Detection        Faster-RCNN pretrained on VOC-2012 dataset.
[x] 10 : YOLOX X-Large                  Object Detection        YOLOX-X pretrained on MS COCO dataset.
[x] 11 : YOLOX Large                    Object Detection        YOLOX-L pretrained on MS COCO dataset.
[x] 12 : YOLOX Medium                   Object Detection        YOLOX-M pretrained on MS COCO dataset.
[x] 13 : YOLOX Small                    Object Detection        YOLOX-S pretrained on MS COCO dataset.
```

## A Man-in-the-Middle Hardware Attack

The Universal Adversarial Perturbation (UAP) can be deployed using a Man-in-the-Middle Hardware Attack.

[[ Talk ]](https://minm.wuhanstudio.uk) [[ Video ]](https://youtu.be/OvIpe-R3ZS8) [[ Paper ]](https://arxiv.org/abs/2208.07174) [[ Code ]](https://github.com/wuhanstudio/adversarial-camera)

[![](https://github.com/wuhanstudio/adversarial-camera/raw/master/doc/demo.png)](https://github.com/wuhanstudio/adversarial-camera)

[![](https://github.com/wuhanstudio/adversarial-camera/raw/master/doc/demo.jpg)](https://github.com/wuhanstudio/adversarial-camera)

The Man-in-the-Middle Attack consists of two steps:

- Step 1: [Generating the perturbation](detection/README.md).
- Step 2: [Deploying the perturbation](hardware/README.md).
