views:

1977

answers:

6

I'm looking for a robust face detection algorithm/library, preferably in C (C++ is okay too; other languages I can port if necessary). I've used OpenCV's implementation in the past, but I don't think it's invariant to rotation. Doesn't need to be real-time, but it shouldn't be horrendously slow either (maybe one or two seconds per photo is fine). Looking for high reliability, and not a lot of false positives. Does anyone know of any good implementations?

A: 

The only thing I've worked with is Visionics FaceIt. It worked rather well, but last I knew was very, very, very far from being free (either as in beer or as in speech).

chaos
Should have mentioned "free" is good too. FaceIt looks to be face recognition software.... I'm looking for an open source algorithm.
Mark
+5  A: 

You could try taking a look at this library:

http://vasc.ri.cmu.edu/NNFaceDetector/

It shows in one of the test cases faces that are rotated. As you can see, it was done as a dissertation, so you can also read that paper as well, if you like.

rpkelly
Hm... only about 80% recall, but low false positives (high precision). I'm not sure if that's good or not? Oh well, this is good enough to start with if I can get it to compile. Thanks :)
Mark
-- high precision is more important to me anyway. The remaining 20% can be tagged manually if necessary, but I would have figured we could get rates over 95% by now. Perhaps I'm mistaken.
Mark
Okay, this does not like to compile on 64-bit Ubuntu.
Mark
+2  A: 

Over on Code Project, someone posted a detailed description of a project for facial recognition as well as some C++ source code for the project and links to the libraries he used. His algorithm focuses on using color differences to find patches of skin and then testing to see if 19x19 pixel pictures match faces. I'm not familiar with all the libraries for facial recognition but reading through some of his code, many of methods and functions have CV in the name, so he may be using the OpenCV library but I'm not familiar with it so I'm not 100% sure. However, he does provide lots of explanation about his application and the source files so it may be a good starting point.

He might be trying to build his own cv library. I thought he might have been ripping parts of opencv out, but nothing really indicates that. He boasts 98% accuracy, but that was primarily trained and tested on his own face, so that's not saying much. Doesn't mention anything about rotation... I wish he gave a more detailed evaluation. Precision-recall curves are awesome. Oh well, thanks for this. I can give it a try too... might be very good for all I know.
Mark
I've got a better statistics that the guy that claims 98% accuracy. 99.99999999999% hes lying or has over trained. Face recognition is nowhere near that accurate, even the best systems out aren't that accurate.
monksy
+3  A: 
warren
Nothing would prevent that. This is a valid answer ;)
Mark
+6  A: 

Check out this page on OpenCV Wiki about face detection using Haar-like features.

@floppydisk: The same guy posted another project implementing these Haar-like features for face detection.

The concept is not hard to understand and you could even implement it by yourself. Perhaps the most difficult part is constructing the cascade of boosted classifiers (but openCV has all of that readily implemented!)

Some other methods that can be used in face detection which can be made invariant to affine transformations include:

Amro
+1  A: 

I haven't used Haar features for face detection, but from what I remember it might be more effective at detecting a face than eigenfaces/pca.

I have run into the issue about the rotation issues with the face. My thought is maybe you could try shape matching and attempt to correct the object. Try and oriented it for the normal head aspect ratio. I never got that far in my project with Eigenface, but let me know how that works out. That should be easy in matlab. :P

monksy