bills commited on
Commit
5a9b4b8
1 Parent(s): 11ad137

Add confidence and IoU threshold on main_model.py

Browse files
apps/__pycache__/main_model.cpython-37.pyc CHANGED
Binary files a/apps/__pycache__/main_model.cpython-37.pyc and b/apps/__pycache__/main_model.cpython-37.pyc differ
 
apps/main_model.py CHANGED
@@ -24,6 +24,8 @@ def app():
24
  prediction = st.button("Predict")
25
  if prediction:
26
  ship_model = torch.hub.load('ultralytics/yolov5', 'custom', path="apps/model/main_model.pt", force_reload=True)
 
 
27
  results = ship_model(f"{folder_path}")
28
  with st.spinner("Loading..."):
29
  time.sleep(3.5)
 
24
  prediction = st.button("Predict")
25
  if prediction:
26
  ship_model = torch.hub.load('ultralytics/yolov5', 'custom', path="apps/model/main_model.pt", force_reload=True)
27
+ ship_model.conf = 0.6
28
+ ship_model.iou = 0.55
29
  results = ship_model(f"{folder_path}")
30
  with st.spinner("Loading..."):
31
  time.sleep(3.5)