Gender recognition

asked 2015-01-16 04:05:26 -0600

jackmagic1 gravatar image

updated 2015-01-17 06:16:17 -0600

I've been doing some research and attempted to build a haarcascade for identifying gender.

I read this article, which describes how they did it, which i also tried to do : http://www.ijcce.org/papers/301-E043.pdf

I used a library of 228 male faces and 350 female faces. Using the opencv createclassifier on my positives.txt file which contains a list of the male faces. Using the .vec file create by the classifier I used haartraining with the following command:

opencv_traincascade -data classifier -vec positivies.vec -bg negatives.txt -numStages 20 -minHitRate 0.99 -maxFalseAlarmRate 0.5 -numPos 228 -numNeg 350 -w 640 -h 480 -mode ALL

After running this a few times I do not get a haar classifier.xml output file so I'm unsure whether I am doing everything correctly.

But my question is whether it is possible using male faces as positive samples and female as negative samples to train and use a haarcascade for classifying gender?

edit retag flag offensive close merge delete

Comments

1

I think that it is possible but actually you will need to train a female and a male classifier. On the other hand, a feature+SVM combination might work better. Keep in mind that you have a classification task, where Viola and Jones is actually an object class detector. This are two different things.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-17 06:17:44 -0600 )edit

Thanks Steven, could you elaborate on the alternative method of feature and SVM combination? Any good resources that you know of?

jackmagic1 gravatar imagejackmagic1 ( 2015-01-17 10:29:15 -0600 )edit

The idea is that once you found a possible face region you run it through a male/female binary classifier. The SVM could be trained with fisher and eigenfaces for example. Take a look at face recognition algorithms instead of detection algorithms to do the gender split.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-17 16:34:29 -0600 )edit
1

Ok thanks I'll take a look!

jackmagic1 gravatar imagejackmagic1 ( 2015-01-18 07:53:13 -0600 )edit