Examples#
There are multiple examples available for Dioptra that demonstrate its capabilities across different models, datasets, adversarial attacks, and adversarial defenses. Here you will find instructions on how to prepare your environment for running an example and a table that lists what is available.
Setup#
To prepare your environment for running the examples, follow the linked instructions below:
Edit the docker-compose.yml file to mount the data folder in the worker containers.
Register the custom task plugins for Dioptra’s examples and demos
Start JupyterLab and open the demo Jupyter notebook (ipynb file extension)
Steps 1–3 and 6–7 only need to be run once.
Returning users only need to repeat Steps 4 (if you stopped Dioptra using docker compose down
) and 8 (if you stopped the jupyter lab
process).
List of Examples#
The current list of examples for Dioptra is provided in the table below. It is recommended that newcomers start with the Tensorflow MNIST Classifier example.
Name |
Library |
Models |
Dataset |
Attacks |
Defenses |
GPU |
---|---|---|---|---|---|---|
Tensorflow |
ShallowNet,
LeNet
|
No |
||||
Tensorflow |
ShallowNet,
LeNet
|
Pixel Threshold |
No |
|||
Tensorflow |
ShallowNet,
LeNet
|
Model Inversion |
No |
|||
Tensorflow |
ShallowNet,
LeNet
|
No |
||||
Tensorflow |
LeNet |
Backdoor Poisoning |
Spatial Smoothing,
JPEG Compression,
Gaussian Augmentation
|
No |
||
PyTorch |
LeNet |
Membership Inference |
No |
|||
Tensorflow |
ResNet50 |
ImageNet |
FGM,
Pixel Threshold
|
(FGM only)
Spatial Smoothing,
JPEG Compression,
Gaussian Augmentation
|
Yes |
|
Tensorflow |
LeNet (MNIST),
VGG16 (Fruits 360),
ResNet50 (ImageNet)
|
Adversarial Patch |
Spatial Smoothing,
JPEG Compression,
Gaussian Augmentation,
Adversarial Training
|
Yes
(Fruits 360, ImageNet only)
|
||
PyTorch |
RetinaNet |
Road Signs |
Backdoor Poisoning |
Yes |