Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Robust Face Detection in C/C++?

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?

like image 268
mpen Avatar asked May 25 '09 02:05

mpen


People also ask

Which algorithm is best for face recognition?

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.

What does DLIB Get_frontal_face_detector () do?

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.

How many types of face detection are there?

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.


2 Answers

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:

  • Eigenfaces with SVD/PCA
  • Fourier descriptors
  • Statistical shape models (this paper in particular)
like image 56
Amro Avatar answered Oct 05 '22 08:10

Amro


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.

like image 21
rpkelly Avatar answered Oct 05 '22 10:10

rpkelly