Skip to content

Commit 88332e4

Browse files
author
Beat Buesser
committed
Update setup.py
Signed-off-by: Beat Buesser <[email protected]>
1 parent f8dfeb8 commit 88332e4

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

art/evaluations/security_curve/security_curve.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from typing import List, Optional, Tuple, TYPE_CHECKING, Union
2424

2525
import numpy as np
26-
from matplotlib import pyplot as plt
2726

2827
from art.evaluations.evaluation import Evaluation
2928
from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent import ProjectedGradientDescent
@@ -162,6 +161,8 @@ def plot(self) -> None:
162161
Plot the Security Curve of adversarial accuracy as function opf attack budget `eps` together with the accuracy
163162
on benign samples.
164163
"""
164+
from matplotlib import pyplot as plt
165+
165166
plt.plot(self.eps_list, self.accuracy_adv_list, label="adversarial", marker="o")
166167
plt.plot([self.eps_list[0], self.eps_list[-1]], [self.accuracy, self.accuracy], linestyle="--", label="benign")
167168
plt.legend()

setup.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"sphinx-autodoc-annotation",
2323
"sphinx-autodoc-typehints",
2424
"matplotlib",
25-
"numpy",
25+
"numpy>=1.18.0",
2626
"scipy>=1.4.1",
2727
"six>=1.13.0",
2828
"scikit-learn>=0.22.2,<0.24.3",
@@ -65,13 +65,13 @@ def get_version(rel_path):
6565
"lightgbm": ["lightgbm"],
6666
"mxnet": ["mxnet"],
6767
"tensorflow": ["tensorflow", "tensorflow_addons", "h5py"],
68-
"tensorflow_image": ["tensorflow", "tensorflow_addons", "h5py", "Pillow", "ffmpeg-python"],
69-
"tensorflow_audio": ["tensorflow", "tensorflow_addons", "h5py", "pydub", "resampy"],
68+
"tensorflow_image": ["tensorflow", "tensorflow_addons", "h5py", "Pillow", "ffmpeg-python", "opencv-python"],
69+
"tensorflow_audio": ["tensorflow", "tensorflow_addons", "h5py", "pydub", "resampy", "librosa"],
7070
"pytorch": ["torch", "torchvision"],
71-
"pytorch_image": ["torch", "torchvision", "kornia", "Pillow", "ffmpeg-python"],
72-
"pytorch_audio": ["torch", "torchvision", "torchaudio", "pydub", "resampy"],
71+
"pytorch_image": ["torch", "torchvision", "kornia", "Pillow", "ffmpeg-python", "opencv-python"],
72+
"pytorch_audio": ["torch", "torchvision", "torchaudio", "pydub", "resampy", "librosa"],
7373
"xgboost": ["xgboost"],
74-
"lingvo_asr": ["tensorflow-gpu==2.1.0", "lingvo==0.6.4"],
74+
"lingvo_asr": ["tensorflow-gpu==2.1.0", "lingvo==0.6.4", "pydub", "resampy", "librosa"],
7575
"all": [
7676
"mxnet",
7777
"catboost",
@@ -91,6 +91,8 @@ def get_version(rel_path):
9191
"resampy",
9292
"ffmpeg-python",
9393
"cma",
94+
"librosa",
95+
"opencv-python",
9496
],
9597
},
9698
classifiers=[

0 commit comments

Comments
 (0)