haritsahm commited on
Commit
007b3ff
·
1 Parent(s): 4e097eb

Add mask threshold slider

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -259,7 +259,7 @@ def main():
259
  st.markdown('### Demo')
260
 
261
  with st.container():
262
- col1, col2, col3 = st.columns(3)
263
 
264
  with col1:
265
  option = st.selectbox('Segmentation mode', ('Click', 'Box', 'Everything'))
@@ -269,6 +269,10 @@ def main():
269
  show_mask = st.checkbox('Show mask',value = True)
270
 
271
  with col3:
 
 
 
 
272
  radius_width = st.slider('Radius/Width for Click/Box',0,20,5,1)
273
 
274
  with st.container():
 
259
  st.markdown('### Demo')
260
 
261
  with st.container():
262
+ col1, col2, col3, col4 = st.columns(4)
263
 
264
  with col1:
265
  option = st.selectbox('Segmentation mode', ('Click', 'Box', 'Everything'))
 
269
  show_mask = st.checkbox('Show mask',value = True)
270
 
271
  with col3:
272
+ mask_threshold = st.slider('SAM Confidence Threshold',0.0,1.0,0.5,0.05)
273
+ PREDICTOR_MODEL.model.mask_threshold = mask_threshold
274
+
275
+ with col4:
276
  radius_width = st.slider('Radius/Width for Click/Box',0,20,5,1)
277
 
278
  with st.container():