sshi commited on
Commit
af2b646
·
1 Parent(s): df06025

MOdify type label size.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -120,7 +120,7 @@ def plot_results(pil_img, prob, boxes):
120
 
121
  cv2.rectangle(img, c1, c2, c, thickness=2, lineType=cv2.LINE_AA)
122
 
123
- cv2.putText(img, f'{id2label[cl.item()]}: {p[cl]:0.2f}', [int(xmin) + 5, int(ymin) + 5], cv2.FONT_HERSHEY_SIMPLEX, 0.7, c, 2)
124
  # ax.text(xmin, ymin, text, fontsize=10,
125
  # bbox=dict(facecolor=c, alpha=0.5))
126
  return Image.fromarray(img)
 
120
 
121
  cv2.rectangle(img, c1, c2, c, thickness=2, lineType=cv2.LINE_AA)
122
 
123
+ cv2.putText(img, f'{id2label[cl.item()]}: {p[cl]:0.2f}', [int(xmin), int(ymin)], cv2.FONT_HERSHEY_SIMPLEX, 0.5, c, 1)
124
  # ax.text(xmin, ymin, text, fontsize=10,
125
  # bbox=dict(facecolor=c, alpha=0.5))
126
  return Image.fromarray(img)