From b8fe33a2e2cb15b8facae8206b4f596ffb6c21be Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Wed, 21 Nov 2018 08:42:31 -0500 Subject: [PATCH 1/2] Playback layout change --- YoloObjectDetection/yolo_video_with_webcam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YoloObjectDetection/yolo_video_with_webcam.py b/YoloObjectDetection/yolo_video_with_webcam.py index 5ec81d2d..16e2d73c 100644 --- a/YoloObjectDetection/yolo_video_with_webcam.py +++ b/YoloObjectDetection/yolo_video_with_webcam.py @@ -195,8 +195,8 @@ while True: [sg.Text('Yolo Output')], [sg.Image(data=imgbytes, key='_IMAGE_')], [sg.Text('Confidence'), - sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.5, size=(15, 15), key='confidence')], - [sg.Text('Threshold'), + sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.5, size=(15, 15), key='confidence'), + sg.Text('Threshold'), sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.3, size=(15, 15), key='threshold')], [sg.Exit()] ] From 99efdb6fb45f0262af8991f353eb5913f4a471b2 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Wed, 21 Nov 2018 08:44:20 -0500 Subject: [PATCH 2/2] Playback layout change --- YoloObjectDetection/yolo_video_with_webcam.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/YoloObjectDetection/yolo_video_with_webcam.py b/YoloObjectDetection/yolo_video_with_webcam.py index 16e2d73c..52bae7c6 100644 --- a/YoloObjectDetection/yolo_video_with_webcam.py +++ b/YoloObjectDetection/yolo_video_with_webcam.py @@ -87,7 +87,6 @@ win_started = False if use_webcam: cap = cv2.VideoCapture(0) while True: - sg.TimerStart() # read the next frame from the file or webcam if use_webcam: grabbed, frame = cap.read() @@ -192,7 +191,7 @@ while True: if not win_started: win_started = True layout = [ - [sg.Text('Yolo Output')], + [sg.Text('Yolo Playback in PySimpleGUI Window', size=(30,1))], [sg.Image(data=imgbytes, key='_IMAGE_')], [sg.Text('Confidence'), sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.5, size=(15, 15), key='confidence'), @@ -213,7 +212,6 @@ while True: break gui_confidence = values['confidence'] gui_threshold = values['threshold'] - sg.TimerStop() win.Close()