Spaces:
Runtime error
Runtime error
sshi
commited on
Commit
·
af2b646
1
Parent(s):
df06025
MOdify type label size.
Browse files
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)
|
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)
|