Spaces:
Sleeping
Sleeping
AnnonSubmission
commited on
Commit
•
a124069
1
Parent(s):
0992122
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
11 |
|
12 |
from data_transforms import normal_transforms, no_shift_transforms, ig_transforms, modify_transforms
|
13 |
from utils import overlay_heatmap, viz_map, show_image, deprocess, get_ssl_model, fig2img
|
14 |
-
from methods import occlusion,
|
15 |
from methods import create_mixed_images, averaged_transforms, sailency, smooth_grad
|
16 |
from methods import get_gradcam, get_interactioncam
|
17 |
|
@@ -75,7 +75,7 @@ def run_occlusion(w_size, stride):
|
|
75 |
added_image1 = overlay_heatmap(img1, heatmap1, denormalize = denorm)
|
76 |
added_image2 = overlay_heatmap(img2, heatmap2, denormalize = denorm)
|
77 |
|
78 |
-
fig, axs = plt.subplots(2,
|
79 |
np.vectorize(lambda ax:ax.axis('off'))(axs)
|
80 |
|
81 |
axs[0, 0].imshow(show_image(img1, denormalize = denorm))
|
|
|
11 |
|
12 |
from data_transforms import normal_transforms, no_shift_transforms, ig_transforms, modify_transforms
|
13 |
from utils import overlay_heatmap, viz_map, show_image, deprocess, get_ssl_model, fig2img
|
14 |
+
from methods import occlusion, pairwise_occlusion
|
15 |
from methods import create_mixed_images, averaged_transforms, sailency, smooth_grad
|
16 |
from methods import get_gradcam, get_interactioncam
|
17 |
|
|
|
75 |
added_image1 = overlay_heatmap(img1, heatmap1, denormalize = denorm)
|
76 |
added_image2 = overlay_heatmap(img2, heatmap2, denormalize = denorm)
|
77 |
|
78 |
+
fig, axs = plt.subplots(2, 3, figsize=(20,10))
|
79 |
np.vectorize(lambda ax:ax.axis('off'))(axs)
|
80 |
|
81 |
axs[0, 0].imshow(show_image(img1, denormalize = denorm))
|