Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions damo/utils/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def vis(img, boxes, scores, cls_ids, conf=0.5, class_names=None):
font = cv2.FONT_HERSHEY_SIMPLEX

txt_size = cv2.getTextSize(text, font, 0.4, 1)[0]

img = img.copy() # Ensure img is writable
cv2.rectangle(img, (x0, y0), (x1, y1), color, 2)

txt_bk_color = (_COLORS[cls_id] * 255 * 0.7).astype(np.uint8).tolist()
Expand Down