Java Bindings of FaceRecognizer

asked 2014-04-04 08:49:29 -0600

ales gravatar image

updated 2014-04-04 09:03:34 -0600

berak gravatar image

I'm following up on this stack overflow discussion as well as a discussion on github.

Thanks to berak I got everything working and can now use the the FaceRecognizers within a java app. I still wanted to follow up on the question whether the FaceRecognizers (and especially the new pointers implementation) will make it into the java bindings for 3.0? I'm happy to use the current version from the repository if there is already a better support.

Besides - how does the confidence value of the LBPHFaceRecognizer work? When I use an image from the training set I get a confidence value of 0, if I use another image I get a confidence value in the hundreds. Does that mean that a lower value is better?

edit retag flag offensive close merge delete

Comments

1

let me just start with a comment on the latter: yes, less distance is better.

if you test with an image from the trainset, it will find its exact replica there, so the distance is 0, pretty ok. the 'confidence' value is actually the distance between your test-img and the best fitting train-img.

the constructor for all 3 FaceRecognizers has a 'threshold' value as last arg, which you can use to 'cut-off' bad results, so anything with a distance above threshold will return -1 for label (unknown). but again, to find a good value there, it needs some experimenting.

berak gravatar imageberak ( 2014-04-04 09:01:57 -0600 )edit
1

unfortunately it seems, noone is or was working on a general solution (i.e : change the wrapper generator scripts) for the skipped cv::Ptr<something> functions. (there's only a handful of cases in 2.4)

my own try there had a couple of flaws (like needing too many special cases for special classes), so i was quite happy to pull out (without having done much harm there).

also, the cv::Ptr implementation is quite different in 3.0 from the 2.4 branch, and with 3.0 around the corner, i doubt, that someone will do a fix for 2.4

berak gravatar imageberak ( 2014-04-04 09:14:26 -0600 )edit
1

btw, what about putting your code on github or similar ? might be very helpful for others !

berak gravatar imageberak ( 2014-04-04 09:17:51 -0600 )edit
1

I will release it as soon as I have time to wrap everything nicely.

ales gravatar imageales ( 2014-04-07 10:20:39 -0600 )edit

I would also encourage you to put your code on github or etc.

Will Stewart gravatar imageWill Stewart ( 2014-04-14 13:42:57 -0600 )edit