From beeffdd8b81ca8619a25de15af98853c8711f5ed Mon Sep 17 00:00:00 2001 From: funnukes <96534763+funnukes@users.noreply.github.com> Date: Sat, 9 Dec 2023 21:40:41 +0530 Subject: [PATCH] Update condition for more than one face in frame --- wyzely_detect/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wyzely_detect/utils/utils.py b/wyzely_detect/utils/utils.py index ed76e55..19ea7ea 100644 --- a/wyzely_detect/utils/utils.py +++ b/wyzely_detect/utils/utils.py @@ -151,7 +151,7 @@ def recognize_face( # Seems this is caused when someone steps into frame and their face is detected but not recognized except IndexError: print("Face present but not recognized") - return None + continue # If the parent name is the same as the path to the database, then set label to the image name instead of the parent name if path_to_image.parent == Path(path_to_directory): label = path_to_image.name