Junfeng5 commited on
Commit
39a7552
·
1 Parent(s): 62a76cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -157,7 +157,7 @@ def segment_image(img,prompt_mode, categoryname, custom_category, expressiong, r
157
  if categoryname =="COCO-80":
158
  batch_category_name = coco_class_name
159
  elif categoryname =="OBJ365":
160
- batch_category_name = obj365_class_name
161
  elif categoryname =="Custom-List":
162
  batch_category_name = custom_category.split(',')
163
  else:
@@ -450,7 +450,7 @@ with gr.Blocks() as demo:
450
  'For interactive segmentation:<br />\
451
  1.Draw points, boxes, or scribbles on the canvas for multiclass segmentation; use separate layers for different objects, adding layers with a "+" sign.<br />\
452
  2.Point mode accepts a single point only; multiple points default to the centroid, so use boxes or scribbles for larger objects.<br />\
453
- 3.After drawing, click green "√" to preview the prompt visualization; the segmentation mask follows the chosen prompt colors.'
454
  )
455
  with gr.Accordion("Text based detection usage",open=False):
456
  gr.Markdown(
@@ -470,7 +470,7 @@ with gr.Blocks() as demo:
470
  results_select = gr.CheckboxGroup(["box", "mask", "name", "score", "expression"], value=["box", "mask", "name", "score"], label="Shown Results", info="The results shown on image")
471
  num_inst_select = gr.Slider(1, 50, value=15, step=1, label="Num of topK instances for category based detection", info="Choose between 1 and 50 for better visualization")
472
  threshold_select = gr.Slider(0, 1, value=0.2, label="Confidence Threshold", info="Choose threshold ")
473
- mask_image_mix_ration = gr.Slider(0, 1, value=0.65, label="Image Brightness Ratio", info="Brightness between image and colored masks ")
474
 
475
 
476
 
 
157
  if categoryname =="COCO-80":
158
  batch_category_name = coco_class_name
159
  elif categoryname =="OBJ365":
160
+ batch_category_name = OBJ365_class_names
161
  elif categoryname =="Custom-List":
162
  batch_category_name = custom_category.split(',')
163
  else:
 
450
  'For interactive segmentation:<br />\
451
  1.Draw points, boxes, or scribbles on the canvas for multiclass segmentation; use separate layers for different objects, adding layers with a "+" sign.<br />\
452
  2.Point mode accepts a single point only; multiple points default to the centroid, so use boxes or scribbles for larger objects.<br />\
453
+ 3.After drawing, click green "√" on the right side of the image to preview the prompt visualization; the segmentation mask follows the chosen prompt colors.'
454
  )
455
  with gr.Accordion("Text based detection usage",open=False):
456
  gr.Markdown(
 
470
  results_select = gr.CheckboxGroup(["box", "mask", "name", "score", "expression"], value=["box", "mask", "name", "score"], label="Shown Results", info="The results shown on image")
471
  num_inst_select = gr.Slider(1, 50, value=15, step=1, label="Num of topK instances for category based detection", info="Choose between 1 and 50 for better visualization")
472
  threshold_select = gr.Slider(0, 1, value=0.2, label="Confidence Threshold", info="Choose threshold ")
473
+ mask_image_mix_ration = gr.Slider(0, 1, value=0.45, label="Image Brightness Ratio", info="Brightness between image and colored masks ")
474
 
475
 
476