-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: Corner case when fiducial points are outside of the image #39
Comments
Hi @Strateus - why is there a big probability the points will be outside the range? Do you have examples where this is failing for reasonable images? I haven't extensively profiled or tested this portion of code, but the alignment code works for 13081 out of 13233 images from the LFW dataset. This code portion checks if the boundary points of the detected landmarks are outside of the image, which should only happen in extreme cases like if somebody's face is outside of the image. There may be heuristics that can improve this, like filling in the missing portions with black pixels or using image completion. |
Well, i used my web camera, and added 30% margins to face, and still after warping there were points out of warped image all the time i tried, maybe 5% it was ok, but rest failed. |
Code reference: openface/openface/alignment/naive_dlib.py Line 140 in 3dba58e
|
Be careful when expanding the margins since the neural network You need to train a new neural network if you want to add margins. Also, won't eliminating the check cause array out of bounds errors in: cwImg = cv2.resize(warpedImg[t:b, l:r], (size, size)) |
Yea i got the point about network. Accuracy is not my primary concern now.
|
Fixed with the new alignment technique. |
From @Strateus in #13:
The text was updated successfully, but these errors were encountered: