diff --git a/detect.py b/detect.py index 8feb07d5f15e..9d92e4c169e4 100644 --- a/detect.py +++ b/detect.py @@ -173,6 +173,7 @@ def run( # Stream results im0 = annotator.result() if view_img: + cv2.namedWindow(str(p), cv2.WINDOW_NORMAL | cv2.WINDOW_KEEPRATIO) # allow window resize (Linux) cv2.imshow(str(p), im0) cv2.waitKey(1) # 1 millisecond