Spaces:
Build error
Build error
Commit
·
b4759d0
1
Parent(s):
e246aed
updated app
Browse files
app.py
CHANGED
@@ -29,6 +29,32 @@ from skimage.color import gray2rgb
|
|
29 |
from matplotlib import pyplot as plt
|
30 |
from torchvision import transforms
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
device = torch.device('cpu')
|
33 |
opt = get_args(is_train=False)
|
34 |
|
|
|
29 |
from matplotlib import pyplot as plt
|
30 |
from torchvision import transforms
|
31 |
|
32 |
+
from captum.attr import (
|
33 |
+
GradientShap,
|
34 |
+
DeepLift,
|
35 |
+
DeepLiftShap,
|
36 |
+
IntegratedGradients,
|
37 |
+
LayerConductance,
|
38 |
+
NeuronConductance,
|
39 |
+
NoiseTunnel,
|
40 |
+
Saliency,
|
41 |
+
InputXGradient,
|
42 |
+
GuidedBackprop,
|
43 |
+
Deconvolution,
|
44 |
+
GuidedGradCam,
|
45 |
+
FeatureAblation,
|
46 |
+
ShapleyValueSampling,
|
47 |
+
Lime,
|
48 |
+
KernelShap
|
49 |
+
)
|
50 |
+
|
51 |
+
from captum.metrics import (
|
52 |
+
infidelity,
|
53 |
+
sensitivity_max
|
54 |
+
)
|
55 |
+
|
56 |
+
from captum.attr._utils.visualization import visualize_image_attr
|
57 |
+
|
58 |
device = torch.device('cpu')
|
59 |
opt = get_args(is_train=False)
|
60 |
|