Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def get_attention_maps(pixel_values, attentions, nh):
|
|
42 |
|
43 |
return attention_maps
|
44 |
|
45 |
-
feature_extractor = ViTFeatureExtractor.from_pretrained("facebook/dino-
|
46 |
-
model = ViTModel.from_pretrained("facebook/dino-
|
47 |
|
48 |
def visualize_attention(image):
|
49 |
# normalize channels
|
|
|
42 |
|
43 |
return attention_maps
|
44 |
|
45 |
+
feature_extractor = ViTFeatureExtractor.from_pretrained("facebook/dino-vitb16", do_resize=False)
|
46 |
+
model = ViTModel.from_pretrained("facebook/dino-vitb16", add_pooling_layer=False)
|
47 |
|
48 |
def visualize_attention(image):
|
49 |
# normalize channels
|