Allow preview resize in detect.py (#8318)

* Initial implementation of --viewsz

* use mouse resize

* Add comment

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/6990/head^2
Ryan Hirasaki 2022-06-24 13:30:44 +00:00 committed by GitHub
parent 724d5b21b7
commit 19f33cbae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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