Spaces:
Running
on
T4
Running
on
T4
ymq2017
commited on
Commit
•
23c028f
1
Parent(s):
ee8fea2
update example
Browse files
app.py
CHANGED
@@ -343,13 +343,13 @@ if __name__ == "__main__":
|
|
343 |
<details>
|
344 |
You may select an example image or upload your image to start, we support 4 prompt types:
|
345 |
|
346 |
-
**
|
347 |
|
348 |
**scribble_point**: Click an point on the target instance.
|
349 |
|
350 |
**scribble_box**: Click on two points, the top-left point and the bottom-right point to represent a bounding box of the target instance.
|
351 |
|
352 |
-
**
|
353 |
|
354 |
We also support a hyper-paramter **hq_token_only**. False means use hq output to correct SAM output. True means use hq output only. Default: False.
|
355 |
|
@@ -361,9 +361,9 @@ if __name__ == "__main__":
|
|
361 |
with gr.Row():
|
362 |
with gr.Column():
|
363 |
input_image = gr.Image(
|
364 |
-
source='upload', type="pil", value="
|
365 |
task_type = gr.Dropdown(
|
366 |
-
["
|
367 |
text_prompt = gr.Textbox(label="Text Prompt", placeholder="butterfly .")
|
368 |
hq_token_only = gr.Dropdown(
|
369 |
[False, True], value=False, label="hq_token_only"
|
|
|
343 |
<details>
|
344 |
You may select an example image or upload your image to start, we support 4 prompt types:
|
345 |
|
346 |
+
**automatic**: Automaticly generate text prompt and the corresponding box input with BLIP and Grounding-DINO.
|
347 |
|
348 |
**scribble_point**: Click an point on the target instance.
|
349 |
|
350 |
**scribble_box**: Click on two points, the top-left point and the bottom-right point to represent a bounding box of the target instance.
|
351 |
|
352 |
+
**text**: Send text prompt to identify the target instance in the `Text prompt` box.
|
353 |
|
354 |
We also support a hyper-paramter **hq_token_only**. False means use hq output to correct SAM output. True means use hq output only. Default: False.
|
355 |
|
|
|
361 |
with gr.Row():
|
362 |
with gr.Column():
|
363 |
input_image = gr.Image(
|
364 |
+
source='upload', type="pil", value="example4.png", tool="sketch",brush_radius=20)
|
365 |
task_type = gr.Dropdown(
|
366 |
+
["automatic", "scribble_point", "scribble_box", "text"], value="text", label="task_type")
|
367 |
text_prompt = gr.Textbox(label="Text Prompt", placeholder="butterfly .")
|
368 |
hq_token_only = gr.Dropdown(
|
369 |
[False, True], value=False, label="hq_token_only"
|