-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE]: Performance Impact of Image.BICUBIC Resampling in Face Alignment #1378
Comments
The sentence If you still insist to skip alignment, you already have an option in the input argument. If you set align to False in any function, then this is going to skip alignment as mentioned here. Similarly, you can skip detection as well while setting detector_backend argument to skip as mentioned here. |
I could have described the suggestion better. I am using alignment in both situations that I measured. The with the sentence To clarifying further: Both timeit measurements were done with alingment enabled. Faster run (7.931031430998701 seconds) was done with the old image rotation that doesn't use ´Image.BICUBIC´ resampling. The slower run (41.79532476099848 seconds) was done with newer image rotation that uses ´Image.BICUBIC´ resampling. |
Okay, I could understand it now. Your request is fair enough. Thank you for the explanation. |
In the current source code, this seems retired already - https://github.com/serengil/deepface/blob/master/deepface/modules/detection.py#L346 |
Description
In pull request #1269, the face alignment method was changed to use
Image.BICUBIC
resampling. While this change may improve image quality, it significantly impacts performance.Performance Testing
I tested the performance impact by running the ´DeepFace.represent´ function with timeit for 100 rounds. The “yunet” detector and “SFace” face recognition model were used.
Results
Image.BICUBIC
resampling:Execution time: 7.931031430998701 seconds
with
Image.BICUBIC
resampling:Execution time: 41.79532476099848 seconds
Suggestion
Since the alignment method has no impact on the face recognition performance, it would be beneficial to make the resampling method configurable. This way, users can choose whether to use Image.BICUBIC resampling based on their performance needs.
Environment Details
Additional Info
No response
The text was updated successfully, but these errors were encountered: