Merge pull request #755 from MikeTheWatchGuy/Dev-latest

Dev latest
This commit is contained in:
MikeTheWatchGuy 2018-11-21 08:44:42 -05:00 committed by GitHub
commit 4d392ef3c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -87,7 +87,6 @@ win_started = False
if use_webcam: if use_webcam:
cap = cv2.VideoCapture(0) cap = cv2.VideoCapture(0)
while True: while True:
sg.TimerStart()
# read the next frame from the file or webcam # read the next frame from the file or webcam
if use_webcam: if use_webcam:
grabbed, frame = cap.read() grabbed, frame = cap.read()
@ -192,11 +191,11 @@ while True:
if not win_started: if not win_started:
win_started = True win_started = True
layout = [ layout = [
[sg.Text('Yolo Output')], [sg.Text('Yolo Playback in PySimpleGUI Window', size=(30,1))],
[sg.Image(data=imgbytes, key='_IMAGE_')], [sg.Image(data=imgbytes, key='_IMAGE_')],
[sg.Text('Confidence'), [sg.Text('Confidence'),
sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.5, size=(15, 15), key='confidence')], sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.5, size=(15, 15), key='confidence'),
[sg.Text('Threshold'), sg.Text('Threshold'),
sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.3, size=(15, 15), key='threshold')], sg.Slider(range=(0, 1), orientation='h', resolution=.1, default_value=.3, size=(15, 15), key='threshold')],
[sg.Exit()] [sg.Exit()]
] ]
@ -213,7 +212,6 @@ while True:
break break
gui_confidence = values['confidence'] gui_confidence = values['confidence']
gui_threshold = values['threshold'] gui_threshold = values['threshold']
sg.TimerStop()
win.Close() win.Close()