fix layout
Browse files
app.py
CHANGED
@@ -64,10 +64,10 @@ with gr.Blocks() as demo:
|
|
64 |
</div>""")
|
65 |
gr.Markdown("Upload an image and specify the objects you want to segment by listing their names separated by commas.")
|
66 |
|
67 |
-
with gr.
|
68 |
with gr.Column(scale=1):
|
69 |
-
with gr.Row():
|
70 |
-
|
71 |
with gr.Row():
|
72 |
window_size = gr.Slider(minimum=112, maximum=448, value=DEFAULT_WSIZE, step=16, label="Window Size")
|
73 |
k = gr.Slider(minimum=50, maximum=800, value=DEFAULT_K, step=50, label="k (LPOSS number of graph neighbors)")
|
@@ -78,18 +78,22 @@ with gr.Blocks() as demo:
|
|
78 |
alpha = gr.Slider(minimum=0.0, maximum=1.0, value=DEFAULT_ALPHA, step=0.05, label="α (amount of propagation)")
|
79 |
with gr.Row():
|
80 |
reset_btn = gr.Button("Reset to Default Values")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
with gr.Row():
|
83 |
with gr.Column(scale=2):
|
84 |
input_image = gr.Image(label="Input Image")
|
85 |
-
class_names = gr.Textbox(label="Class Names", info="Separate class names with commas")
|
86 |
-
use_lposs_plus = gr.Checkbox(label="Use LPOSS+", info="Enable pixel-level refinement using LPOSS+")
|
87 |
|
88 |
with gr.Column(scale=3):
|
89 |
output_image = gr.AnnotatedImage(label="Segmentation Results")
|
90 |
-
|
91 |
-
with gr.Row():
|
92 |
-
segment_btn = gr.Button("Segment Image")
|
93 |
|
94 |
reset_btn.click(fn=reset_hyperparams, outputs=[window_size, k, gamma, alpha, sigma, tau, r])
|
95 |
|
|
|
64 |
</div>""")
|
65 |
gr.Markdown("Upload an image and specify the objects you want to segment by listing their names separated by commas.")
|
66 |
|
67 |
+
with gr.Accordion("Hyper-parameters", open=False):
|
68 |
with gr.Column(scale=1):
|
69 |
+
# with gr.Row():
|
70 |
+
# gr.Markdown("Hyper-parameters")
|
71 |
with gr.Row():
|
72 |
window_size = gr.Slider(minimum=112, maximum=448, value=DEFAULT_WSIZE, step=16, label="Window Size")
|
73 |
k = gr.Slider(minimum=50, maximum=800, value=DEFAULT_K, step=50, label="k (LPOSS number of graph neighbors)")
|
|
|
78 |
alpha = gr.Slider(minimum=0.0, maximum=1.0, value=DEFAULT_ALPHA, step=0.05, label="α (amount of propagation)")
|
79 |
with gr.Row():
|
80 |
reset_btn = gr.Button("Reset to Default Values")
|
81 |
+
|
82 |
+
with gr.Row():
|
83 |
+
class_names = gr.Textbox(label="Class Names", info="Separate class names with commas")
|
84 |
+
use_lposs_plus = gr.Checkbox(label="Use LPOSS+", info="Enable pixel-level refinement using LPOSS+")
|
85 |
+
|
86 |
+
with gr.Row():
|
87 |
+
segment_btn = gr.Button("Segment Image")
|
88 |
|
89 |
with gr.Row():
|
90 |
with gr.Column(scale=2):
|
91 |
input_image = gr.Image(label="Input Image")
|
92 |
+
# class_names = gr.Textbox(label="Class Names", info="Separate class names with commas")
|
93 |
+
# use_lposs_plus = gr.Checkbox(label="Use LPOSS+", info="Enable pixel-level refinement using LPOSS+")
|
94 |
|
95 |
with gr.Column(scale=3):
|
96 |
output_image = gr.AnnotatedImage(label="Segmentation Results")
|
|
|
|
|
|
|
97 |
|
98 |
reset_btn.click(fn=reset_hyperparams, outputs=[window_size, k, gamma, alpha, sigma, tau, r])
|
99 |
|