Spaces:
Runtime error
Runtime error
Tobias Cornille
commited on
Commit
•
3459f68
1
Parent(s):
9cd2e3e
Revert
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ def dino_detection(
|
|
88 |
device,
|
89 |
visualize=False,
|
90 |
):
|
91 |
-
detection_prompt = "
|
92 |
dino_image = load_image_for_dino(image)
|
93 |
dino_image = dino_image.to(device)
|
94 |
with torch.no_grad():
|
@@ -100,7 +100,6 @@ def dino_detection(
|
|
100 |
text_threshold=text_threshold,
|
101 |
device=device,
|
102 |
)
|
103 |
-
phrases = [phrase.replace(" ;", "").strip() for phrase in phrases]
|
104 |
category_ids = [category_name_to_id[phrase] for phrase in phrases]
|
105 |
|
106 |
if visualize:
|
|
|
88 |
device,
|
89 |
visualize=False,
|
90 |
):
|
91 |
+
detection_prompt = " . ".join(category_names)
|
92 |
dino_image = load_image_for_dino(image)
|
93 |
dino_image = dino_image.to(device)
|
94 |
with torch.no_grad():
|
|
|
100 |
text_threshold=text_threshold,
|
101 |
device=device,
|
102 |
)
|
|
|
103 |
category_ids = [category_name_to_id[phrase] for phrase in phrases]
|
104 |
|
105 |
if visualize:
|