blackbox-adversarial-toolbox-0.0.8
توضیحات
Black-box Adversarial Toolbox (BAT) - Python Library for Deep Learning Security
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | blackbox-adversarial-toolbox-0.0.8 |
| نام | blackbox-adversarial-toolbox |
| نسخه کتابخانه | 0.0.8 |
| نگهدارنده | ['wuhanstudio'] |
| ایمیل نگهدارنده | ['wuhanstudios@gmail.com'] |
| نویسنده | wuhanstudio |
| ایمیل نویسنده | wuhanstudios@gmail.com |
| آدرس صفحه اصلی | https://github.com/wuhanstudio/blackbox-adversarial-toolbox |
| آدرس اینترنتی | https://pypi.org/project/blackbox-adversarial-toolbox/ |
| مجوز | MIT |
<img src="https://bat.wuhanstudio.uk/images/bat.png" width=300px style="float: left;" >
# Black-box Adversarial Toolbox (BAT)
[](https://app.travis-ci.com/wuhanstudio/blackbox-adversarial-toolbox)
[](https://badge.fury.io/py/blackbox-adversarial-toolbox)
[](https://opensource.org/licenses/MIT)
[](https://pypi.org/project/blackbox-adversarial-toolbox/)
A Python Library for Deep Learning Security that focuses on Black-box attacks.
## Installation
```python
pip install blackbox-adversarial-toolbox
```
## Usage
```python
import numpy as np
from PIL import Image
from bat.attacks import SimBA
from bat.apis.deepapi import VGG16Cifar10
# Load Image [0.0, 1.0]
x = np.asarray(Image.open('dog.jpg').resize((32, 32))) / 255.0
# Initialize the Cloud API Model
DEEP_API_URL = 'https://api.wuhanstudio.uk'
model = VGG16Cifar10(DEEP_API_URL + "/vgg16_cifar10")
# SimBA Attack
simba = SimBA(model)
x_adv = simba.attack(x, epsilon=0.1, max_it=1000)
# Distributed SimBA Attack
x_adv = simba.attack(x, epsilon=0.1, max_it=1000, distributed=True , batch=50, max_workers=10)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.18.0 | numpy |
| >=1.4.1 | scipy |
| >=0.22.2 | scikit-learn |
| - | pillow |
| - | requests |
| - | tqdm |
| - | six |
| - | setuptools |
نحوه نصب
نصب پکیج whl blackbox-adversarial-toolbox-0.0.8:
pip install blackbox-adversarial-toolbox-0.0.8.whl
نصب پکیج tar.gz blackbox-adversarial-toolbox-0.0.8:
pip install blackbox-adversarial-toolbox-0.0.8.tar.gz