Daniel Cerda Escobar commited on
Commit
c250235
·
1 Parent(s): 66ed482

Update files

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. utils.py +0 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def get_model():
29
  detection_model = AutoDetectionModel.from_pretrained(
30
  model_type='yolov8',
31
  model_path=yolov8_model_path,
32
- confidence_threshold=0.8,
33
  device="cpu",
34
  )
35
  return detection_model
@@ -152,8 +152,8 @@ if submit:
152
 
153
  st.write('##')
154
 
155
- col1, col2, col3 = st.columns([1, 3, 1])
156
- with col2:
157
  st.markdown(f"#### Object Detection Result")
158
  with st.container(border = True):
159
  static_component = image_comparison(
 
29
  detection_model = AutoDetectionModel.from_pretrained(
30
  model_type='yolov8',
31
  model_path=yolov8_model_path,
32
+ confidence_threshold=postprocess_match_threshold,
33
  device="cpu",
34
  )
35
  return detection_model
 
152
 
153
  st.write('##')
154
 
155
+ col1, col2, col3 = st.columns([3, 1, 1], gap='medium')
156
+ with col1:
157
  st.markdown(f"#### Object Detection Result")
158
  with st.container(border = True):
159
  static_component = image_comparison(
utils.py CHANGED
@@ -14,7 +14,6 @@ def sahi_yolov8m_inference(
14
  overlap_height_ratio,
15
  overlap_width_ratio,
16
  image_size,
17
- postprocess_match_threshold,
18
  ):
19
  # sliced inference
20
  detection_model.image_size = image_size
@@ -25,7 +24,6 @@ def sahi_yolov8m_inference(
25
  slice_width=slice_width,
26
  overlap_height_ratio=overlap_height_ratio,
27
  overlap_width_ratio=overlap_width_ratio,
28
- postprocess_match_threshold=postprocess_match_threshold,
29
  )
30
  visual_result = sahi.utils.cv.visualize_object_predictions(
31
  image=numpy.array(image),
 
14
  overlap_height_ratio,
15
  overlap_width_ratio,
16
  image_size,
 
17
  ):
18
  # sliced inference
19
  detection_model.image_size = image_size
 
24
  slice_width=slice_width,
25
  overlap_height_ratio=overlap_height_ratio,
26
  overlap_width_ratio=overlap_width_ratio,
 
27
  )
28
  visual_result = sahi.utils.cv.visualize_object_predictions(
29
  image=numpy.array(image),