Skip to content

Commit

Permalink
Merge pull request #101 from ido1990/patch-1
Browse files Browse the repository at this point in the history
Fix detect_live
  • Loading branch information
alankbi committed Feb 1, 2022
2 parents 7bff23d + a1f93b3 commit 83e2fd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detecto/visualize.py
Expand Up @@ -50,9 +50,9 @@ def detect_live(model, score_filter=0.6):
continue

box = boxes[i]
cv2.rectangle(frame, (box[0], box[1]), (box[2], box[3]), (255, 0, 0), 3)
cv2.rectangle(frame, (int(box[0]), int(box[1])), (int(box[2]), int(box[3])), (255, 0, 0), 3)
if labels:
cv2.putText(frame, '{}: {}'.format(labels[i], round(scores[i].item(), 2)), (box[0], box[1] - 10),
cv2.putText(frame, '{}: {}'.format(labels[i], round(scores[i].item(), 2)), (int(box[0]), int(box[1] - 10)),
cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 3)

cv2.imshow('Detecto', frame)
Expand Down

0 comments on commit 83e2fd6

Please sign in to comment.