18

I'm looking for an SDK or library that can detect faces in a webcam stream, and detect gender. Free or paid, C++ or C# under Windows. Any suggestions?

Shachar Weis
  • 936
  • 2
  • 20
  • 44

5 Answers5

19

I did an experiment on gender classification with the Fisherfaces method in my blog at: http://bytefish.de/blog/gender_classification and got a 98% recognition rate for geometrically normalized images. I am providing an implementation of the Fisherfaces method for GNU Octave/MATLAB, Python and C++.

libfacerec, a modern face recognition library for the OpenCV C++ API (BSD license), includes an implementation of the Fisherfaces method. The latest revision of the libfacerec is available at:

libfacerec 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:

I am providing a Python and GNU Octave/MATLAB implementation of Fisherfaces at:

For detecting a face in an image simply use the CascadeClassifier coming with OpenCV, but don't expect perfect recognition results on misaligned data.

There's an answer above to use Eigenfaces, which won't work. Eigenfaces use a Principal Component Analysis, an unsupervised algorithm that doesn't know about classes. You must be really lucky if the subspace you embed your data into discriminates between genders. Perhaps it generates some positive predictions by finding the closest image and associated gender.

bytefish
  • 3,697
  • 1
  • 29
  • 35
  • can you provide a link to your training/testing datasets? I am trying to do gender identification using fisherfaces and don't get much higher than 80%...http://answers.opencv.org/question/13282/fisherfaces-improve-classification/ – jeremy_rutman Aug 24 '15 at 10:38
  • I'm currently trying to do so with a live camera preview. I've tried your method with a dataset taken from the Wiki part of the IMDB-Wiki Dataset, and when I aim it at someone, it fluctuates between 'Male' and 'Female' with no end. I must be doing something very wrong with my training dataset and/or preprocessing, because my dataset is mostly males (by 1:4), and my preprocessing only consists of detecting the face with another classifier, do the grayscale-HE-crop-resize routine on the face area, and putting it in as the training data. – Gensoukyou1337 Aug 31 '17 at 10:48
2

Eigenfaces uses PCA, and this is implemented in OpenCV. This algorithm can be used to perform gender recognition: http://campillos.ucmerced.edu/~jboiser/eigfaces.pdf

To use eigenfaces with OpenCV, see http://www.cognotics.com/opencv/servo_2007_series/part_5/index.html

It will take a bit of coding on your part though.

rossb83
  • 1,694
  • 4
  • 21
  • 40
1

At first sight, I would say OpenCV, but your surely already tested it...

Seems this blog talk a lot about face and gender recognition. Hope it will help: http://www.computer-vision-software.com/blog/

Macmade
  • 52,708
  • 13
  • 106
  • 123
  • OpenCV doesn't have gender recognition. I've seen these guys, their audience measurement product has been "coming soon" since 2009. – Shachar Weis Mar 11 '11 at 04:14
0

You can use OpenCV built in face detector. For gender you can train your own gender detector using Haartraining. You should find a database of Male and Female faces and train it with HaarTraining module in OpenCV.

Krish
  • 1,747
  • 14
  • 19
-1

I think you are looking for Intel AIM.

Amit Soni
  • 11
  • 1
  • 4