Spaces:
Runtime error
Runtime error
adjust sample threshold value
Browse files
app.py
CHANGED
@@ -69,8 +69,8 @@ def query_image(img, text_queries, owl_threshold):
|
|
69 |
# return (img, owl_output), (img, dino_output)
|
70 |
return (img, owl_output)
|
71 |
|
72 |
-
english_candidate_labels = ["hat", "sunglass", "hair band", "glove", "arm sleeve", "watch", "singlet", "t-shirts", "energy gel", "half pants", "socks", "shoes"]
|
73 |
-
korean_candidate_labels = ["๋ชจ์", "์ฌ๊ธ๋ผ์ค", "ํค์ด๋ฐด๋", "์ฅ๊ฐ", "ํํ ์", "์๊ณ", "์ฑ๊ธ๋ ", "ํฐ์
์ธ ", "์๋์ง์ ค", "์ผ์ธ ๋ฐ์ง", "์๋ง", "์ ๋ฐ"]
|
74 |
english_candidate_labels_string = ",".join(english_candidate_labels)
|
75 |
|
76 |
owl_threshold = gr.Slider(0, 1, value=0.16, label="OWL Threshold")
|
@@ -86,6 +86,6 @@ demo = gr.Interface(
|
|
86 |
title="OWLv2 Demo",
|
87 |
description="Compare two state-of-the-art zero-shot object detection models [OWLv2](https://huggingface.co/google/owlv2-base-patch16) . Simply enter an image and the objects you want to find with comma, or try one of the examples. Play with the threshold to filter out low confidence predictions in each model.",
|
88 |
# examples=[["./bee.jpg", "bee, flower", 0.16, 0.12], ["./cats.png", "cat, fishnet", 0.16, 0.12]]
|
89 |
-
examples=[["./rs_sample1.jpg", english_candidate_labels_string, 0.16, 0.12], ["./rs_sample2.jpg", english_candidate_labels_string, 0.
|
90 |
)
|
91 |
demo.launch(debug=True)
|
|
|
69 |
# return (img, owl_output), (img, dino_output)
|
70 |
return (img, owl_output)
|
71 |
|
72 |
+
english_candidate_labels = ["hat", "sunglass", "hair band", "glove", "arm sleeve", "watch", "singlet", "t-shirts", "energy gel", "half pants", "socks", "shoes", "ear phone"]
|
73 |
+
korean_candidate_labels = ["๋ชจ์", "์ฌ๊ธ๋ผ์ค", "ํค์ด๋ฐด๋", "์ฅ๊ฐ", "ํํ ์", "์๊ณ", "์ฑ๊ธ๋ ", "ํฐ์
์ธ ", "์๋์ง์ ค", "์ผ์ธ ๋ฐ์ง", "์๋ง", "์ ๋ฐ", "์ด์ดํฐ"]
|
74 |
english_candidate_labels_string = ",".join(english_candidate_labels)
|
75 |
|
76 |
owl_threshold = gr.Slider(0, 1, value=0.16, label="OWL Threshold")
|
|
|
86 |
title="OWLv2 Demo",
|
87 |
description="Compare two state-of-the-art zero-shot object detection models [OWLv2](https://huggingface.co/google/owlv2-base-patch16) . Simply enter an image and the objects you want to find with comma, or try one of the examples. Play with the threshold to filter out low confidence predictions in each model.",
|
88 |
# examples=[["./bee.jpg", "bee, flower", 0.16, 0.12], ["./cats.png", "cat, fishnet", 0.16, 0.12]]
|
89 |
+
examples=[["./rs_sample1.jpg", english_candidate_labels_string, 0.16, 0.12], ["./rs_sample2.jpg", english_candidate_labels_string, 0.13, 0.10]]
|
90 |
)
|
91 |
demo.launch(debug=True)
|