Open ad2946 opened 2 years ago
I tried to use the detect_video function in my code and i found that the function is using
cv2.rectangle(frame, (box[0], box[1]), (box[2], box[3]), (255, 0, 0), 3) cv2.putText(frame, '{}: {}'.format(label, round(score.item(), 2)), (box[0], box[1] - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 3)
when it should be:
cv2.rectangle(frame, (int(box[0]), int(box[1])), (int(box[2]), int(box[3])), (255, 0, 0), 3) cv2.putText(frame, '{}: {}'.format(label, round(score.item(), 2)), (int(box[0]), int(box[1]) - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 3)
Otherwise it won't work.
This fixed an issue I was having, thanks!
I tried to use the detect_video function in my code and i found that the function is using
when it should be:
Otherwise it won't work.