diff --git a/detect.py b/detect.py index 2593406c..6da45c3b 100644 --- a/detect.py +++ b/detect.py @@ -125,6 +125,8 @@ def detect(save_txt=False, save_img=False): # Stream results if view_img: cv2.imshow(p, im0) + if cv2.waitKey(1) == ord('q'): # q to quit + raise StopIteration # Save results (image with detections) if save_img: