PrarthanaTS commited on
Commit
6927140
·
1 Parent(s): c905489

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -182,11 +182,27 @@ with gr.Blocks(css=css, title='Fast Segment Anything') as demo:
182
  gr.Examples(examples=[["examples/dogs.jpg"], ["examples/boat.jpg"], ["examples/russia.jpg"], ["examples/subway.jpg"]],
183
  inputs=[cond_img_t],
184
  examples_per_page=4)
185
-
 
 
 
 
 
 
 
 
 
186
  segment_btn_t.click(segment_everything,
187
  inputs=[
188
  cond_img_t,
189
  input_size_slider_t,
 
 
 
 
 
 
 
190
  ],
191
  outputs=segm_img_t)
192
 
 
182
  gr.Examples(examples=[["examples/dogs.jpg"], ["examples/boat.jpg"], ["examples/russia.jpg"], ["examples/subway.jpg"]],
183
  inputs=[cond_img_t],
184
  examples_per_page=4)
185
+
186
+ with gr.Column():
187
+ with gr.Accordion("Advanced options", open=False):
188
+ iou_threshold = gr.Slider(0.1, 0.9, 0.7, step=0.1, label='iou', info='iou threshold for filtering the annotations')
189
+ conf_threshold = gr.Slider(0.1, 0.9, 0.25, step=0.05, label='conf', info='object confidence threshold')
190
+ with gr.Row():
191
+ mor_check = gr.Checkbox(value=False, label='better_visual_quality', info='better quality using morphologyEx')
192
+ retina_check = gr.Checkbox(value=True, label='use_retina', info='draw high-resolution segmentation masks')
193
+ wider_check = gr.Checkbox(value=False, label='wider', info='wider result')
194
+
195
  segment_btn_t.click(segment_everything,
196
  inputs=[
197
  cond_img_t,
198
  input_size_slider_t,
199
+ iou_threshold,
200
+ conf_threshold,
201
+ mor_check,
202
+ contour_check,
203
+ retina_check,
204
+ text_box,
205
+ wider_check,
206
  ],
207
  outputs=segm_img_t)
208