moorkh : Adversarial Attacks in Pytorch
moorkh is a Pytorch library for generating adversarial examples with full support for batches of images in all attacks.
About the name
The name moorkh is a Hindi word meaning Fool in English, that's what we are making to Neural networks by generating advesarial examples. Although we also do so for making them more robust.
Usage
Installation
pip install moorkhorgit clone https://github.com/akshay-gupta123/moorkh
import moorkh
norm_layer = moorkh.Normalize(mean,std)
model = nn.Sequential(
norm_layer,
model
)
model.eval()
attak = moorkh.FGSM(model)
adversarial_images = attack(images, labels)
Implemented Attacks
EXPLAINING AND HARNESSING ADVERSARIAL EXAMPLES: FGSMADVERSARIAL EXAMPLES IN THE PHYSICAL WORLD: IFGSMON THE LIMITATION OF CONVULATIONSAL NEURAL NETWORK IN RECOGNIZING NEGATIVE IMAGES: SemanticADDING NOISE: NoiseTOWARDS DEEP LEARNING MODELS RESISTANT TO ADVERSARIAL ATTACKS: PGD\L2ESEMBLE ADVERSAIAL TRAINING: ATTACKS and DEFENSE: RFGSM
To-Do's
- Adding more Attacks
- Making Documentation
- Adding demo notebooks
- Adding Summaries of Implemented papers(for my own undestanding)
Contribution
This library is developed as a part of my learning, if you find any bug feel free to create a PR. All kind of contributions are always welcome!
References
- Adversarial=Robustness-Toolbox by IBM.
- Foolbox by Bethgelab.
- Cleverhans by Google brain
- Reliable and Interpretable Artificial Intelligence A Eth Zurich course
- Adversarial Robustness - Theory and Practice Tutorial by Zico Kolter and Aleksander Madry
Metadata
Release files for moorkh 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| moorkh-0.0.2.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moorkh-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / moorkh-0.0.2.tar.gz
| Download URL | moorkh-0.0.2.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37a6dbf6284e26d463bcf93c7fdf4491bccfd3c56ff52971b89a43bc80a372d4
|
|
BLAKE2b-256 checksum How to use checksums |
ac0f56400332a5cfddd73e71be9e96e71b36bef159ef59a3682f95a847474ef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.3
|
Release files / moorkh-0.0.2-py3-none-any.whl
| Download URL | moorkh-0.0.2-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f74920dbd6858eb67e3d3bde343258fdff30b5a5465d63c09276c0c09f436cc
|
|
BLAKE2b-256 checksum How to use checksums |
2844234f00f13cefdcc4574ecd3d2827aef685f1596af447dab9aebe97497067
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.3
|