From c83219eb7cb0c53ce0b2dc828d52b967d301c426 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Sat, 14 Oct 2023 21:07:45 +0200 Subject: [PATCH] Cosmetic changes --- facefusion/face_analyser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/facefusion/face_analyser.py b/facefusion/face_analyser.py index cec4a37a..976b718e 100644 --- a/facefusion/face_analyser.py +++ b/facefusion/face_analyser.py @@ -87,13 +87,13 @@ def sort_by_direction(faces : List[Face], direction : FaceAnalyserDirection) -> def filter_by_age(faces : List[Face], age : FaceAnalyserAge) -> List[Face]: filter_faces = [] for face in faces: - if face['age'] < 13 and age == 'child': + if face.age < 13 and age == 'child': filter_faces.append(face) - elif face['age'] < 19 and age == 'teen': + elif face.age < 19 and age == 'teen': filter_faces.append(face) - elif face['age'] < 60 and age == 'adult': + elif face.age < 60 and age == 'adult': filter_faces.append(face) - elif face['age'] > 59 and age == 'senior': + elif face.age > 59 and age == 'senior': filter_faces.append(face) return filter_faces @@ -101,8 +101,8 @@ def filter_by_age(faces : List[Face], age : FaceAnalyserAge) -> List[Face]: def filter_by_gender(faces : List[Face], gender : FaceAnalyserGender) -> List[Face]: filter_faces = [] for face in faces: - if face['gender'] == 1 and gender == 'male': + if face.gender == 1 and gender == 'male': filter_faces.append(face) - if face['gender'] == 0 and gender == 'female': + if face.gender == 0 and gender == 'female': filter_faces.append(face) return filter_faces