From 62d5bb7c2b34d817040a098818d450ac8f8fed1f Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 10 Jan 2023 14:20:31 -0800 Subject: [PATCH] Ensure we're passing a string to `imread` --- src/detector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detector.py b/src/detector.py index 2c6f351..2020fb5 100644 --- a/src/detector.py +++ b/src/detector.py @@ -76,7 +76,7 @@ class Detector: detections.append(Detection(label, confidences[i], box)) font = cv.FONT_HERSHEY_PLAIN - marked = cv.imread(filename) + marked = cv.imread(str(filename)) for detection in detections: x, y, w, h = detection.box cv.rectangle(marked, (x,y), (x + w, y + h), (255,255,255,0), 2)