-
Notifications
You must be signed in to change notification settings - Fork 0
Base migration changes to face_recognition package #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
choice = input("(r)egister or (l)ogin: ") | ||
|
||
if choice == "r": | ||
faces = [] | ||
user_id = int(input("Enter user id: ")) | ||
for i in range(5): | ||
input(f"Enter to register a face ({i+1}): ") | ||
frame = take_snapshot() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one caveat with capturer.get_frame()
if it's the OpenCVCapturer, it gets the next frame from the buffer instead of taking a snapshot at the time when an input is given. This was a bit easier for testing since I could experiment with taking different photo angles etc.
Ultimately this doesn't really matter since we're not using that on the Pi anyway but that's why I made a new take_snapshot()
function specifically for this script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh okay I see good catch. I have restored take_snapshot
now
@@ -20,6 +20,7 @@ tensorflow-io-gcs-filesystem = "0.27.0" | |||
tf-keras = "^2.17.0" | |||
h5py = "3.10.0" | |||
rpi-gpio = "^0.7.1" | |||
face-recognition = "^1.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we're happy with face-recognition, I think we should remove deepface as well (iirc it's keeping back some of the other packages). This would be a big change though so we should make sure stuff still works when we do that
Opencv only takes next frame in buffer not most recent so we need to reset device each snapshot
Trying to pull this into another temp branch directly off main.