Spaces:
Sleeping
Sleeping
Daniel Cerda Escobar commited on
Commit ·
f758043
1
Parent(s): 9bfa97c
Fix model parameters
Browse files
app.py
CHANGED
|
@@ -100,12 +100,12 @@ with col2:
|
|
| 100 |
with col3:
|
| 101 |
# set SAHI parameters
|
| 102 |
st.markdown('##### Set model parameters')
|
| 103 |
-
|
| 104 |
-
label = 'Slice Size',
|
| 105 |
-
min_value=
|
| 106 |
-
max_value=
|
| 107 |
-
value=
|
| 108 |
-
step=
|
| 109 |
)
|
| 110 |
overlap_ratio = st.slider(
|
| 111 |
label = 'Overlap Ratio',
|
|
@@ -133,6 +133,7 @@ if submit:
|
|
| 133 |
with st.spinner(text="Downloading model weights ... "):
|
| 134 |
detection_model = get_model(postprocess_match_threshold)
|
| 135 |
|
|
|
|
| 136 |
image_size = 4960
|
| 137 |
|
| 138 |
with st.spinner(text="Performing prediction ... "):
|
|
|
|
| 100 |
with col3:
|
| 101 |
# set SAHI parameters
|
| 102 |
st.markdown('##### Set model parameters')
|
| 103 |
+
slice_size_percentage = st.slider(
|
| 104 |
+
label = 'Slice Size %',
|
| 105 |
+
min_value=0.25,
|
| 106 |
+
max_value=1,
|
| 107 |
+
value=0.5,
|
| 108 |
+
step=0.25
|
| 109 |
)
|
| 110 |
overlap_ratio = st.slider(
|
| 111 |
label = 'Overlap Ratio',
|
|
|
|
| 133 |
with st.spinner(text="Downloading model weights ... "):
|
| 134 |
detection_model = get_model(postprocess_match_threshold)
|
| 135 |
|
| 136 |
+
slice_size = (slice_size_percentage/0.25) * 1240
|
| 137 |
image_size = 4960
|
| 138 |
|
| 139 |
with st.spinner(text="Performing prediction ... "):
|