-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
alignment_procedure crashes when both eyes are in the same position #94
Comments
Of course, it would be nice if I've opened a StackOverflow question asking if enabling such a check is possible. |
Good spot! Do you mind to share your input image? Would be easier to fix if i can reproduce. |
It happened while processing a video stream. I no longer have the problematic frame, but I'll try to reproduce one by moving in front of my webcam. 🕺 |
I've tried, but so far failed to align my head in a pose to fulfill the required condition. Hope you can maybe fix it even without such an example image. |
No problem, we can still fix it. |
@Dobiasd if we set an initial 0 value to angle in alignment produce function, then this will be sorted. Do you mind to create a PR for this? I would like to see your name as a contributor because you found this issue. |
Fix UnboundLocalError in alignment_procedure, closes #94
FYI: While So in case you're interested in preventing such issues automatically in the future, using |
Oh no, very satisfied with pylint, do not want to switch anything else :) |
Ah, no, I did not mean to replace |
When looking at a face from the side, the landmark detector may give the same position for both eyes.
In that case,
retinaface.commons.postprocess.alignment_procedure
crashes withUnboundLocalError: cannot access local variable 'angle' where it is not associated with a value
.Some IDEs also highlight this problem:
Here is a minimal example to reproduce the problem:
The text was updated successfully, but these errors were encountered: