serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://bit.ly/deepface-py
MIT License
14.69k stars 2.22k forks source link

The reason why use opencv for preprocess_face #662

Closed KIMS0YOUNG closed 1 year ago

KIMS0YOUNG commented 1 year ago

Hi, thanks you for amazing work. By the way, I have a question for realtime.py's analysis function.

for face recognition, custom_face has defined by functions.preprocess_face() in realtime.py line 340. but in that code, you used fixed detector_backend='opencv' not detector_backend=detector_backend. So when I use DeepFace.stream("database", detector_backend='retinaface'), custom_face's detector_backend isn't chaged. Is there any reason why you used fixed detector_backend for preprocess_face() ?

Thanks.

serengil commented 1 year ago

hey, i think you are using out-of-the-date code

https://github.com/serengil/deepface/blob/master/deepface/commons/realtime.py

this one is not pubished on pip yet, you can use the source code instead of pypi version

KIMS0YOUNG commented 1 year ago

Thanks a lot.