Spaces:
Sleeping
Sleeping
Daniel Cerda Escobar
commited on
Commit
·
d3aeb20
1
Parent(s):
e8270bd
Fix model parameters
Browse files
app.py
CHANGED
|
@@ -100,12 +100,13 @@ with col2:
|
|
| 100 |
with col3:
|
| 101 |
# set SAHI parameters
|
| 102 |
st.markdown('##### Set model parameters')
|
| 103 |
-
|
| 104 |
-
'
|
| 105 |
options = [
|
| 106 |
-
'
|
| 107 |
-
'
|
| 108 |
-
'
|
|
|
|
| 109 |
],
|
| 110 |
)
|
| 111 |
overlap_ratio = st.slider(
|
|
@@ -134,7 +135,7 @@ if submit:
|
|
| 134 |
with st.spinner(text="Downloading model weights ... "):
|
| 135 |
detection_model = get_model(postprocess_match_threshold)
|
| 136 |
|
| 137 |
-
slice_size = int((
|
| 138 |
image_size = 4960
|
| 139 |
|
| 140 |
with st.spinner(text="Performing prediction ... "):
|
|
|
|
| 100 |
with col3:
|
| 101 |
# set SAHI parameters
|
| 102 |
st.markdown('##### Set model parameters')
|
| 103 |
+
slice_number = st.select_slider(
|
| 104 |
+
'Slices per Image',
|
| 105 |
options = [
|
| 106 |
+
'64',
|
| 107 |
+
'16',
|
| 108 |
+
'4',
|
| 109 |
+
'1',
|
| 110 |
],
|
| 111 |
)
|
| 112 |
overlap_ratio = st.slider(
|
|
|
|
| 135 |
with st.spinner(text="Downloading model weights ... "):
|
| 136 |
detection_model = get_model(postprocess_match_threshold)
|
| 137 |
|
| 138 |
+
slice_size = int(4960/((slice_number**0.5))
|
| 139 |
image_size = 4960
|
| 140 |
|
| 141 |
with st.spinner(text="Performing prediction ... "):
|