Skip to content

Commit 52504ce

Browse files
committed
refactor(draw): 修改绘制颜色
1 parent 56198fd commit 52504ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

py/lib/utils/draw.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
cate_list = ['cucumber', 'eggplant', 'mushroom']
1616

17+
1718
def plot_loss(loss_list):
1819
x = list(range(len(loss_list)))
1920
fg = plt.figure()
@@ -57,8 +58,9 @@ def plot_bboxs(img, bndboxs, name_list, pred_boxs, pred_cates, pred_probs):
5758
continue
5859

5960
xmin, ymin, xmax, ymax = np.array(bbox, dtype=np.int)
60-
cv2.rectangle(dst, (xmin, ymin), (xmax, ymax), (255, 0, 0), thickness=1)
61-
cv2.putText(dst, '%s_%f' % (cate_list[cate], prob), (xmin, ymax), 1, cv2.FONT_HERSHEY_PLAIN, (255, 0, 0), thickness=1)
61+
cv2.rectangle(dst, (xmin, ymin), (xmax, ymax), (0, 0, 255), thickness=1)
62+
cv2.putText(dst, '%s_%f' % (cate_list[cate], prob), (xmin, ymax), 1, cv2.FONT_HERSHEY_PLAIN, (0, 0, 255),
63+
thickness=1)
6264

6365
return dst
6466

0 commit comments

Comments
 (0)