From ad2bfd50c5a07ff61fad46cbe29f654eafec63cf Mon Sep 17 00:00:00 2001 From: boltgolt Date: Thu, 3 May 2018 15:47:44 +0200 Subject: [PATCH] Added fixes for #29 and #30 --- debian/changelog | 6 ++++++ src/compare.py | 15 ++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index ca45c85..2006bf1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +howdy (2.2.1) xenial; urgency=medium + + * Add notes + + -- boltgolt Thu, 03 May 2018 13:23:09 +0200 + howdy (2.1.0) xenial; urgency=medium * First complete PPA release diff --git a/src/compare.py b/src/compare.py index db1dde9..3a5ff02 100644 --- a/src/compare.py +++ b/src/compare.py @@ -37,8 +37,6 @@ user = sys.argv[1] models = [] # Encoded face models encodings = [] -# Amount of frames already matched -tries = 0 # Amount of ingnored dark frames dark_tries = 0 @@ -82,6 +80,10 @@ while True: # Increment the frame count every loop frames += 1 + # Stop if we've exceded the time limit + if time.time() - timings[3] > int(config.get("video", "timout")): + stop(11) + # Grab a single frame of video # Don't remove ret, it doesn't work without it ret, frame = video_capture.read() @@ -109,9 +111,6 @@ while True: # Save the new size for diagnostics scale_height, scale_width = frame.shape[:2] - # Convert from BGR to RGB - frame = frame[:, :, ::-1] - # Get all faces from that frame as encodings face_encodings = face_recognition.face_encodings(frame) @@ -158,9 +157,3 @@ while True: # End peacegully stop(0) - - # Stop if we've exceded the maximum retry count - if time.time() - timings[3] > int(config.get("video", "timout")): - stop(11) - - tries += 1