Skip to content
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

Unknown predict face_recognition #9

Open
bbhushan-ds opened this issue Aug 19, 2016 · 6 comments
Open

Unknown predict face_recognition #9

bbhushan-ds opened this issue Aug 19, 2016 · 6 comments

Comments

@bbhushan-ds
Copy link

Hi

We have predict functionality in face_recognition which somehow predict the person. But do we have unknown person functionality which person is not available in training?

Thanks
BB

@shrubb
Copy link
Collaborator

shrubb commented Aug 19, 2016

You can insert an extra "person" into the gallery called "Unknown" and assign this label to all the unknown people. Or, if you want to experiment with the code, you may try other classifiers besides SVM.

@bbhushan-ds
Copy link
Author

bbhushan-ds commented Aug 20, 2016

Thanks for reply.

Logically I would not have pic for unknown persons. Or is it beneficial to have unknown person label?

Second, could you please give me some idea how I can try other classifier besides svm? It would be great if you help me for this. I would appreciate.

Thanks
BB

@bbhushan-ds
Copy link
Author

Hi,

Do you have any idea how we can calculate the confidence in SVM. which will allow me to predict the unknown person.
Thanks

@shrubb
Copy link
Collaborator

shrubb commented Aug 31, 2016

Sorry for delay.You may get the wrong thing with SVM's "confidences" (which are not really a natural thing for it). I suggest 2 alternatives:* Read this research on open set learning. For example, the 2011 article proposes two SVM modifications for that.* Try nearest neighbors instead of SVM. Make sure you have a decent number of samples, maybe even more than #gallerySize. When predicting, get the distance to the nearest neighbor. If it's greater than X, then yield "unknown". Choose X empirically.

@bbhushan-ds
Copy link
Author

is there any simple way to find the nearest neighbors of a person. And how to get the distance while predicting. I am asking any working example in lua language.

Thanks
Bharat Bhushan

@shrubb
Copy link
Collaborator

shrubb commented Sep 9, 2016

There's kNN implementation in OpenCV: http://docs.opencv.org/trunk/dd/de1/classcv_1_1ml_1_1KNearest.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants