Lee-Shang commited on
Commit
d88cafd
1 Parent(s): d8bb789

Update app.py

Browse files

deleted detailed settings option

Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -21,6 +21,22 @@ IMAGE_TO_URL = {
21
  "highway2-sahi.jpg": "https://user-images.githubusercontent.com/34196005/143309867-42841f5a-9181-4d22-b570-65f90f2da231.jpg",
22
  }
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  @st.cache(allow_output_mutation=True, show_spinner=False)
26
  def download_comparison_images():
@@ -169,23 +185,7 @@ with col1:
169
  image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[slider])
170
  st.image(image, width=300)
171
 
172
- with col3:
173
- st.markdown(f"##### Set SAHI parameters:")
174
 
175
- slice_size = st.number_input("slice_size", min_value=256, value=512, step=256)
176
- overlap_ratio = st.number_input(
177
- "overlap_ratio", min_value=0.0, max_value=0.6, value=0.2, step=0.2
178
- )
179
- postprocess_type = st.selectbox(
180
- "postprocess_type", options=["NMS", "GREEDYNMM"], index=0
181
- )
182
- postprocess_match_metric = st.selectbox(
183
- "postprocess_match_metric", options=["IOU", "IOS"], index=0
184
- )
185
- postprocess_match_threshold = st.number_input(
186
- "postprocess_match_threshold", value=0.5, step=0.1
187
- )
188
- postprocess_class_agnostic = st.checkbox("postprocess_class_agnostic", value=True)
189
 
190
  col1, col2, col3 = st.columns([4, 3, 4])
191
  with col2:
 
21
  "highway2-sahi.jpg": "https://user-images.githubusercontent.com/34196005/143309867-42841f5a-9181-4d22-b570-65f90f2da231.jpg",
22
  }
23
 
24
+ slice_size=512
25
+ overlap_ratio=0.2
26
+ postprocess_match_metric = 'IOU'
27
+ postprocess_type = 'NMS'
28
+ postprocess_match_threshold = 0.5
29
+ postprocess_class_agnostic = True
30
+
31
+
32
+ = st.selectbox(
33
+ "postprocess_match_metric", options=["IOU", "IOS"], index=0
34
+ )
35
+ postprocess_match_threshold = st.number_input(
36
+ "postprocess_match_threshold", value=0.5, step=0.1
37
+ )
38
+ postprocess_class_agnostic = st.checkbox("postprocess_class_agnostic", value=True)
39
+
40
 
41
  @st.cache(allow_output_mutation=True, show_spinner=False)
42
  def download_comparison_images():
 
185
  image = sahi.utils.cv.read_image_as_pil(IMAGE_TO_URL[slider])
186
  st.image(image, width=300)
187
 
 
 
188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
 
190
  col1, col2, col3 = st.columns([4, 3, 4])
191
  with col2: