Skip to content

Commit

Permalink
updated README and fixed typos in guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Rauber committed Mar 22, 2020
1 parent 56032e3 commit 0813949
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 12 deletions.
96 changes: 86 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,92 @@
=======
Foolbox
=======
.. raw:: html

We are in the process of creating Foolbox 3.0. For now, please continue with the `README of Foolbox 2.0 <https://github.com/bethgelab/foolbox/tree/v2>`_.
<a href="https://foolbox.jonasrauber.de"><img src="https://raw.githubusercontent.com/bethgelab/foolbox/master/guide/.vuepress/public/logo.png" align="right" /></a>

Overview
--------
.. image:: https://badge.fury.io/py/foolbox.svg
:target: https://badge.fury.io/py/foolbox

.. image:: https://raw.githubusercontent.com/bethgelab/foolbox/master/overview.png
.. image:: https://codecov.io/gh/bethgelab/foolbox/branch/master/graph/badge.svg
:target: https://codecov.io/gh/bethgelab/foolbox

.. image:: https://readthedocs.org/projects/foolbox/badge/?version=latest
:target: https://foolbox.readthedocs.io/en/latest/

Tutorial
--------
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black

`Tutorial <https://github.com/jonasrauber/foolbox-native-tutorial/blob/master/foolbox-native-tutorial.ipynb>`_
=========================================================================================================================
Foolbox Native: A Python toolbox to create adversarial examples that fool neural networks in PyTorch, TensorFlow, and JAX
=========================================================================================================================

`Foolbox <https://foolbox.jonasrauber.de>`_ is a **Python library** that let's you easily run adversarial attacks against machine learning models like deep neural networks. It is built on top of `EagerPy <https://eagerpy.jonasrauber.de>`_ and works natively with models in `PyTorch <https://pytorch.org>`_, `TensorFlow <https://www.tensorflow.org>`_, `JAX <https://github.com/google/jax>`_, and `NumPy <https://numpy.org>`_.

🔥 Design
----------

`Foolbox 3 a.k.a. Foolbox Native has been rewritten from scratch
using `EagerPy <https://github.com/jonasrauber/eagerpy>`_ instead of
NumPy to achieve native performance on models
developed in PyTorch, TensorFlow and JAX, all with one code base.

- **Native Performance**: Foolbox 3 is built on top of EagerPy and runs natively in PyTorch, TensorFlow, JAX, and NumPyand comes with real batch support.
- **State-of-the-art attacks**: Foolbox provides a large collection of state-of-the-art gradient-based and decision-based adversarial attacks.
- **Type Checking**: Catch bugs before running your code thanks to extensive type annotations in Foolbox.

📖 Documentation
-----------------

The best place to get started with Foolbox is the official `guide <https://foolbox.jonasrauber.de>`_.
If you are looking for a tutorial, check out this `Jupyter notebook <https://github.com/jonasrauber/foolbox-native-tutorial/blob/master/foolbox-native-tutorial.ipynb>`_.
Finally, you can find the full API documentation on `ReadTheDocs <https://foolbox.readthedocs.io/en/stable/>`_.

🚀 Quickstart
--------------

.. code-block:: bash
pip install foolbox
🎉 Example
-----------

.. code-block:: python
import foolbox as fb
model = ...
fmodel = fb.PyTorchModel(model)
attack = fb.attacks.LinfPGD()
epsilons = [0.0, 0.001, 0.01, 0.03, 0.1, 0.3, 0.5, 1.0]
_, advs, success = attack(fmodel, images, labels, epsilons=epsilons)
More examples can be found in the `examples <./examples/>`_ folder, e.g.
a full `ResNet-18 example <./examples/pytorch_resnet18.py>`_.

📄 Citation
------------

If you use Foolbox for your work, please cite our `paper <https://arxiv.org/abs/1707.04131>`_ using the this BibTex entry:

.. code-block::
@inproceedings{rauber2017foolbox,
title={Foolbox: A Python toolbox to benchmark the robustness of machine learning models},
author={Rauber, Jonas and Brendel, Wieland and Bethge, Matthias},
booktitle={Reliable Machine Learning in the Wild Workshop, 34th International Conference on Machine Learning},
year={2017},
url={http://arxiv.org/abs/1707.04131},
}
🐍 Compatibility
-----------------

We currently test with the following versions:

* PyTorch 1.4.0
* TensorFlow 2.1.0
* JAX 0.1.57
* NumPy 1.18.1
2 changes: 1 addition & 1 deletion guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ footer: Copyright © 2020 Jonas Rauber

### What is Foolbox?

**Foolbox** is a **Python library** that let's easily run adversarial attacks against machine learning models like deep neural networks. It is built on top of [**EagerPy**](https://eagerpy.jonasrauber.de) and works natively with models in [**PyTorch**](https://pytorch.org), [**TensorFlow**](https://www.tensorflow.org), [**JAX**](https://github.com/google/jax), and [**NumPy**](https://numpy.org).
**Foolbox** is a **Python library** that let's you easily run adversarial attacks against machine learning models like deep neural networks. It is built on top of [**EagerPy**](https://eagerpy.jonasrauber.de) and works natively with models in [**PyTorch**](https://pytorch.org), [**TensorFlow**](https://www.tensorflow.org), [**JAX**](https://github.com/google/jax), and [**NumPy**](https://numpy.org).

```python
import foolbox as fb
Expand Down
2 changes: 1 addition & 1 deletion guide/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## What is Foolbox?

**Foolbox** is a **Python library** that let's easily run adversarial attacks against machine learning models like deep neural networks. It is built on top of [**EagerPy**](https://eagerpy.jonasrauber.de) and works natively with models in [**PyTorch**](https://pytorch.org), [**TensorFlow**](https://www.tensorflow.org), [**JAX**](https://github.com/google/jax), and [**NumPy**](https://numpy.org).
**Foolbox** is a **Python library** that let's you easily run adversarial attacks against machine learning models like deep neural networks. It is built on top of [**EagerPy**](https://eagerpy.jonasrauber.de) and works natively with models in [**PyTorch**](https://pytorch.org), [**TensorFlow**](https://www.tensorflow.org), [**JAX**](https://github.com/google/jax), and [**NumPy**](https://numpy.org).
Binary file removed overview.png
Binary file not shown.

0 comments on commit 0813949

Please sign in to comment.