Ensure we're passing a string to `imread`

This commit is contained in:
niten 2023-01-10 14:20:31 -08:00
parent c903c73270
commit 62d5bb7c2b
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ class Detector:
detections.append(Detection(label, confidences[i], box)) detections.append(Detection(label, confidences[i], box))
font = cv.FONT_HERSHEY_PLAIN font = cv.FONT_HERSHEY_PLAIN
marked = cv.imread(filename) marked = cv.imread(str(filename))
for detection in detections: for detection in detections:
x, y, w, h = detection.box x, y, w, h = detection.box
cv.rectangle(marked, (x,y), (x + w, y + h), (255,255,255,0), 2) cv.rectangle(marked, (x,y), (x + w, y + h), (255,255,255,0), 2)