Face recognition Library

Image ProcessingComputer VisionFace Recognition

Image Processing Problem Overview


I'm looking for a free face recognition library for a university project. I'm not looking for face detection. I'm looking for actual recognition. That means finding images that contain specified faces or libraries that calculate distances between specific faces.

I'm currently using OpenCV for detecting the faces and a rough Eigenface algorithm for the recognition. But I thought there should be something out there with better performance than a self-written Eigenface algorithm. I'm not talking about speed as performance, I'm looking for a library with better results than a simple Eigenface approach.

I took a look at Faint, but it seems the library is not very reusable for my own applications.

I'm happy with a library in Python, Java, C++, C or something like that. The best thing would be if it can be run on a Windows machine because I'm relying on some external Windows-only code at the moment.

Image Processing Solutions


Solution 1 - Image Processing

Here is a list of commercial vendors that provide off-the-shelf packages for facial recognition which run on Windows:

  1. Cybula - Information on their Facial Recognition SDK. This is a company founded by a University Professor and as such their website looks unprofessional. There's no pricing information or demo that you can download. You'll need to contact them for pricing information.

  2. NeuroTechnology - Information on their Facial Recognition SDK. This company has both up-front pricing information as well as an actual 30 day trial of their SDK.

  3. Pittsburgh Pattern Recognition - (Acquired by Google) Information on their Facial Tracking and Recognition SDK. The demos that they provide help you evaluate their technology but not their SDSK. You'll need to contact them for pricing information.

  4. Sensible Vision - Information on their SDK. Their site allows you to easily get a price quote and you can also order an evaluation kit that will help you evaluate their technology.

Solution 2 - Image Processing

Update

OpenCV 2.4.2 now comes with the very new cv::FaceRecognizer. Please see the very detailed documentation at:

Original Post

I have released libfacerec, a modern face recognition library for the OpenCV C++ API (BSD license). libfacerec has no additional dependencies and implements the Eigenfaces method, Fisherfaces method and Local Binary Patterns Histograms. Parts of the library are going to be included in OpenCV 2.4.

The latest revision of the libfacerec is available at:

The library was written for OpenCV 2.3.1 with the upcoming OpenCV 2.4 in mind, so I don't support OpenCV versions earlier than 2.3.1. This project comes as a CMake project with a well-documented API, there's also a tutorial on gender classification. You can see a HTML version of the documentation at:

If you want to understand how those algorithms work, you might want to read my Guide To Face Recognition (includes Python and GNU Octave/MATLAB examples):

There's also a Python and GNU Octave/MATLAB implementation of the algorithms in my github repository. Both projects in facerec also include several cross validation methods for evaluating algorithms:

The relevant publications are:

  • Turk, M., and Pentland, A. Eigenfaces for recognition.. Journal of Cognitive Neuroscience 3 (1991), 71–86.
  • Belhumeur, P. N., Hespanha, J., and Kriegman, D. Eigenfaces vs. Fisherfaces: Recognition using class specific linear projection.. IEEE Transactions on Pattern Analysis and Machine Intelligence 19, 7 (1997), 711–720.
  • Ahonen, T., Hadid, A., and Pietikainen, M. Face Recognition with Local Binary Patterns.. Computer Vision - ECCV 2004 (2004), 469–481.

Solution 3 - Image Processing

pam-face-authentication a PAM Module for Face Authentication: but it would require some work to get what you want. A quick test showed, that the recognition rate are not as good as those of VeriLook from NeuroTechnology.

Malic is another open source face recognition software, which uses Gabor Wavelet descriptors. But the last update to the source is 3 years old.

From the website: "Malic is an opensource face recognition software which uses gabor wavelet. It is realtime face recognition system that based on Malib and CSU Face Identification Evaluation System (csuFaceIdEval).Uses Malib library for realtime image processing and some of csuFaceIdEval for face recognition."

Further this could be of interest:

gaborboosting: A scientific program applied on Face Recognition with Gabor Wavelet and AdaBoost Algorithm

Feature Extraction Library - FELib refers to "Face Annotation by Transductive Kernel Fisher Discriminant,"

Solution 4 - Image Processing

I would think Eigenface, which you are doing already, is the way to go if you want to calculate the distance between faces. You could try out different approaches like Support Vector Machine or Hidden Markov Model. I found a page that lists major algorithms that could be used for facial recognition: Face Recognition Homepage.

Also, when you say "better performance," do you mean speed or accuracy? What kind of problem are you having? How varying are the data? Are they mostly frontal face or do they include profiles?

Solution 5 - Image Processing

If your project is on a movie or TV, or anything that has a script, it looks like you definitely want to look at the work of Mark Everingham et al.. The software is available, as are the results on a Buffy episode.

Solution 6 - Image Processing

You should look at http://libccv.org/

It's fairly new, but it provides a free open source high level API for face detection.

(...and, I dare say, is pretty damn amazing)

Edit: Worth noting also, that this is one of the few libs that does NOT depend on opencv, and just for kicks, here's a copy of the code for face detection off the documentation page, to give you an idea of whats involved:

#include <ccv.h>
int main(int argc, char** argv)
{
    ccv_dense_matrix_t* image = 0;
    ccv_read(argv[1], &image, CCV_IO_GRAY | CCV_IO_ANY_FILE);
    ccv_bbf_classifier_cascade_t* cascade = ccv_load_bbf_classifier_cascade(argv[2]);         ccv_bbf_params_t params = { .interval = 8, .min_neighbors = 2, .accurate = 1, .flags = 0, .size = ccv_size(24, 24) };
    ccv_array_t* faces = ccv_bbf_detect_objects(image, &cascade, 1, params);
    int i;
    for (i = 0; i < faces->rnum; i++)
    {
        ccv_comp_t* face = (ccv_comp_t*)ccv_array_get(faces, i);
        printf("%d %d %d %d\n", face->rect.x, face->rect.y, face->rect.width, face->rect.y);
    }
    ccv_array_free(faces);
    ccv_bbf_classifier_cascade_free(cascade);
    ccv_matrix_free(image);
    return 0;
} 

Solution 7 - Image Processing

I know it has been a while, but for anyone else interested, there is the Faint project, which has bundled a lot of these features (detection, recognition, etc.) into a nice software package.

Solution 8 - Image Processing

We're using OpenCV. It has lots of non-face-recognition stuff in there also, but, rest assured, it does do face-recognition.

Solution 9 - Image Processing

You can try open MVG library, It can be used for multiple interfaces too.

Solution 10 - Image Processing

The next step would be FisherFaces. Try it and check whether they work for you. Here is a nice comparison.

Solution 11 - Image Processing

Not really what you're looking for, but it may be useful to you. Face Detection/Computer Vision algorithms in MATLAB.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJanuszView Question on Stackoverflow
Solution 1 - Image ProcessingPraveen AngyanView Answer on Stackoverflow
Solution 2 - Image ProcessingbytefishView Answer on Stackoverflow
Solution 3 - Image Processingjk.View Answer on Stackoverflow
Solution 4 - Image ProcessingEugene YokotaView Answer on Stackoverflow
Solution 5 - Image ProcessingFrancois GView Answer on Stackoverflow
Solution 6 - Image ProcessingDougView Answer on Stackoverflow
Solution 7 - Image ProcessingMarcus P SView Answer on Stackoverflow
Solution 8 - Image ProcessingPaul J. LucasView Answer on Stackoverflow
Solution 9 - Image Processinguser2915398View Answer on Stackoverflow
Solution 10 - Image ProcessingŁukasz LewView Answer on Stackoverflow
Solution 11 - Image Processinguser21037View Answer on Stackoverflow