serengil / retinaface

RetinaFace: Deep Face Detection Library for Python
https://www.youtube.com/watch?v=Wm1DucuQk70&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E&index=3
MIT License
1.15k stars 150 forks source link

face bounding box info in RetinaFace.extract_faces(fname, threshold=0.9, model = retina_model, align = True) #8

Closed lightsailpro closed 3 years ago

lightsailpro commented 3 years ago

Is the bounding box info also available in the result of RetinaFace.extract_faces? Need bounding box to combine and visualize both face detection(RetinaFace.detect_faces) and face analysis (RetinaFace.extract_faces, DeepFace.analyze) result. But it seems that the face_id returned from RetinaFace.detect_faces can be different order from the one from RetinaFace.extract_faces. This will mess up the face_id linkage between the visual of the detected face and the emotion/race analysis from RetinaFace.extract_faces and DeepFace.analyze. Thanks

serengil commented 3 years ago

extract_faces uses detect_faces directly. You can confirm it here: https://github.com/serengil/retinaface/blob/master/retinaface/RetinaFace.py