Format code

This commit is contained in:
slashtechno 2023-10-22 16:54:30 -05:00
parent 504ccb6695
commit 259cc8f200
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
2 changed files with 9 additions and 10 deletions

View File

@ -216,8 +216,7 @@ def main():
# May be better to check every iteration, but this also works # May be better to check every iteration, but this also works
if path_to_faces_exists: if path_to_faces_exists:
if face_details := utils.recognize_face( if face_details := utils.recognize_face(
path_to_directory=path_to_faces, path_to_directory=path_to_faces, run_frame=run_frame
run_frame=run_frame
): ):
plot_boxes.append(face_details) plot_boxes.append(face_details)
objects_and_peoples = notify.thing_detected( objects_and_peoples = notify.thing_detected(

View File

@ -102,7 +102,6 @@ def recognize_face(
print("representations_arcface.pkl does not exist") print("representations_arcface.pkl does not exist")
first_face_try = False first_face_try = False
# face_dataframes is a vanilla list of dataframes # face_dataframes is a vanilla list of dataframes
# It seems face_dataframes is empty if the face database (directory) doesn't exist. Seems to work if it's empty though # It seems face_dataframes is empty if the face database (directory) doesn't exist. Seems to work if it's empty though
# This line is here to prevent a crash if that happens. However, there is a check in __main__ so it shouldn't happen # This line is here to prevent a crash if that happens. However, there is a check in __main__ so it shouldn't happen
@ -117,7 +116,8 @@ def recognize_face(
silent=True, silent=True,
# Could use VGG-Face, but whilst fixing another issue, ArcFace seemed to be slightly faster # Could use VGG-Face, but whilst fixing another issue, ArcFace seemed to be slightly faster
# I read somewhere that opencv is the fastest (but not as accurate). Could be changed later, but opencv seems to work well # I read somewhere that opencv is the fastest (but not as accurate). Could be changed later, but opencv seems to work well
model_name="ArcFace", detector_backend="opencv" model_name="ArcFace",
detector_backend="opencv",
) )
except ValueError as e: except ValueError as e:
if ( if (