Gender recognition
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?
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.
Thanks Steven, could you elaborate on the alternative method of feature and SVM combination? Any good resources that you know of?
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.
Ok thanks I'll take a look!