Image.ANTIALIAS changed to Image.Resampling.LANCZOS
Browse files
app.py
CHANGED
@@ -106,7 +106,7 @@ def plot_weights(input_data, patch_weights):
|
|
106 |
y = i // (224 // 16) * 16
|
107 |
plot[:, y:y + 16, x:x + 16] *= patch_weights[i]
|
108 |
attn_map_img = inv_transform(plot, normalize=False)
|
109 |
-
attn_map_img = attn_map_img.resize((224, 224), Image.
|
110 |
return attn_map_img
|
111 |
|
112 |
attention_maps = plot_attention(random_image, 5)
|
|
|
106 |
y = i // (224 // 16) * 16
|
107 |
plot[:, y:y + 16, x:x + 16] *= patch_weights[i]
|
108 |
attn_map_img = inv_transform(plot, normalize=False)
|
109 |
+
attn_map_img = attn_map_img.resize((224, 224), Image.Resampling.LANCZOS)
|
110 |
return attn_map_img
|
111 |
|
112 |
attention_maps = plot_attention(random_image, 5)
|