justin2341 commited on
Commit
715b2be
·
verified ·
1 Parent(s): 417ad6d

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +1 -1
demo.py CHANGED
@@ -21,7 +21,7 @@ def plot_one_box(x, img, color=None, label=None, score=None, line_thickness=3):
21
 
22
  c1 = c2
23
  c2 = c1[0] + t_size[0], c1[1] + t_size[1] + 3
24
- pro = "0.98"
25
  cv2.rectangle(img, c1, c2, [0, 255, 255], -1, cv2.LINE_AA) # filled
26
  cv2.putText(img, pro, (c1[0], c2[1] - 2), 0, tl / 3, [0, 0, 0], thickness=tf, lineType=cv2.LINE_AA)
27
  return img
 
21
 
22
  c1 = c2
23
  c2 = c1[0] + t_size[0], c1[1] + t_size[1] + 3
24
+ pro = f"{score:.2f}"
25
  cv2.rectangle(img, c1, c2, [0, 255, 255], -1, cv2.LINE_AA) # filled
26
  cv2.putText(img, pro, (c1[0], c2[1] - 2), 0, tl / 3, [0, 0, 0], thickness=tf, lineType=cv2.LINE_AA)
27
  return img