jonathan-roos commited on
Commit
8351763
1 Parent(s): 2e642f2

Update detector.py

Browse files
Files changed (1) hide show
  1. detector.py +2 -0
detector.py CHANGED
@@ -68,8 +68,10 @@ def find_bats(allImgs):
68
  box = cv.boxPoints(rect)
69
  box = np.int0(box)
70
  cropped_bat = crop_bat(img[0], box)
 
71
  with learn.no_bar(), learn.no_logging():
72
  label, _, probs = learn.predict(cropped_bat)
 
73
  p_not_bat=f"{probs[0]:.4f}"
74
  p_bat=f"{probs[1]:.4f}"
75
  if p_not_bat < '0.9' and p_bat > '0.5':
 
68
  box = cv.boxPoints(rect)
69
  box = np.int0(box)
70
  cropped_bat = crop_bat(img[0], box)
71
+ start = time.time()
72
  with learn.no_bar(), learn.no_logging():
73
  label, _, probs = learn.predict(cropped_bat)
74
+ print(f"learn.predict completed in {time.time()-start:.2f} seconds")
75
  p_not_bat=f"{probs[0]:.4f}"
76
  p_bat=f"{probs[1]:.4f}"
77
  if p_not_bat < '0.9' and p_bat > '0.5':