You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We found 2 issues that could potentially be improved:
In certain cases, we need both the face identification, and emotion. Given the current implementation, we need to first call Deepface.represent(...), then DeepFace.analyze(...). Both functions call the detector, which is a duplication, especially when a slow detector, like Retinaface, or yolov8 is employed. Since the Deepface.represent() already detects the face patches, it is natural to directly use these patches for analyze.
Inside deepface/extenedmodels/Emotion.py, the predict(...) is used to processes the face patches one by one. If there are many faces to be processed, this sequential operation may lead to performance degradation, especially when using GPU. It is possible to add a batch predict function to address it.
I could submit a PR if the above could be beneficial.
Many thanks again!
4.
Additional Info
No response
The text was updated successfully, but these errors were encountered:
1- You can call extract_faces firstly and pass its output to repesent and analyze function. In that way, detection will be done once. All functions are accepting pre-loaded numpy arrays. So, I disagree to do anything for this topic.
Description
First, thank you for this handy library!
We found 2 issues that could potentially be improved:
Deepface.represent(...)
, thenDeepFace.analyze(...)
. Both functions call the detector, which is a duplication, especially when a slow detector, like Retinaface, or yolov8 is employed. Since theDeepface.represent()
already detects the face patches, it is natural to directly use these patches for analyze.predict(...)
is used to processes the face patches one by one. If there are many faces to be processed, this sequential operation may lead to performance degradation, especially when using GPU. It is possible to add a batch predict function to address it.I could submit a PR if the above could be beneficial.
Many thanks again!
4.
Additional Info
No response
The text was updated successfully, but these errors were encountered: