From 19f33cbae29ac2127dd877b52e228c178dda6086 Mon Sep 17 00:00:00 2001 From: Ryan Hirasaki <4690732+RyanHir@users.noreply.github.com> Date: Fri, 24 Jun 2022 13:30:44 +0000 Subject: [PATCH] Allow preview resize in detect.py (#8318) * Initial implementation of --viewsz * use mouse resize * Add comment Co-authored-by: Glenn Jocher --- detect.py | 1 + 1 file changed, 1 insertion(+) 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