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
3 changes: 2 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def draw_results(img, boxes, confs, classes):
for box, conf, cls in zip(boxes, confs, classes):
# draw rectangle
x1, y1, x2, y2 = box
x1, y1, x2, y2=(int)(x1),(int)(y1),(int)(x2),(int)(y2)
conf = conf[0]
cls_name = coco[cls]
color = color_list[cls]
Expand All @@ -175,4 +176,4 @@ def draw_results(img, boxes, confs, classes):
cv2.putText(overlay, '%s %f' % (cls_name, conf), org=(x1, int(y1-10)), fontFace=cv2.FONT_HERSHEY_SIMPLEX, fontScale=0.5, color=color)
# cv2.addWeighted(overlay, 0.5, final, 1 - 0.5, 0, final)
cv2.imshow(window_name, overlay)
cv2.waitKey(0)
cv2.waitKey(0)