Unpack detection tuple to get detection dict

This commit is contained in:
roydenwa 2023-01-30 21:31:04 +01:00 committed by GitHub
parent 8f42137113
commit 7fbf474270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,8 @@ def detect_face(face_detector, img, align=True):
obj = RetinaFace.detect_faces(img, model=face_detector, threshold=0.9)
if isinstance(obj, dict):
for identity in obj.items():
for item in obj.items():
identity = item[1]
facial_area = identity["facial_area"]
y = facial_area[1]