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?
The most common type of machine learning algorithm used for facial recognition is a deep learning Convolutional Neural Network (CNN). CNNs are a type of artificial neural network that are well-suited for image classification tasks.
You can use dlib. get_frontal_face_detector() to create a frontal face detector, which is based on Histogram of Oriented Gradients (HOG) features and a linear classifier in a sliding window detection approach.
The methods used in face detection can be knowledge-based, feature-based, template matching or appearance-based. Each has advantages and disadvantages: Knowledge-based, or rule-based methods, describe a face based on rules. The challenge of this approach is the difficulty of coming up with well-defined rules.
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With