How to apply SVM train for group of pictures after extracting HOG features?

2 次查看(过去 30 天)
I'm working on project, which about "gender recognition". After reading group of images and extracting HOG features for them, I need to train these pictures and classify them by using SVM classifier. I have wrote a code put it doesn't work (I don't know where is the problem exactly). Please help me to know how to train group of pictures using SVM classifier.
This is my try:
% Perform first run of svm
SVMStruct = svmtrain(Training_Set, train_label);
Group = svmclassify(SVMStruct, Test_Set);
  1 个评论
chinnurocks
chinnurocks 2016-6-10
Hello, R u able to classify gender from face images? I would like to do a similar kind of project. Need your help in this.

请先登录,再进行评论。

回答(2 个)

Walter Roberson
Walter Roberson 2015-6-7
It is not possible to determine a person's gender from pictures. Gender is something internal, not something external. There are no known genetic or chromosome tests or x-rays or MRI that can determine gender, no hairstyles, no clothing choices -- only some items that correlate with self-reported gender to better or worse degrees.
Attempting to determine gender from pictures is a mistake very much like trying to determine someone's religion from pictures is a mistake.
Accordingly, it is not possible for your code to work for its stated purpose.
  4 个评论
Abu Qusay
Abu Qusay 2015-6-7
You are mostly right Mr. Walter Roberson, but still there are many successful tries in this field. Although there is no any try give us 100% correct answer, some of them reached up to 95% correct prediction. This is one of them ( http://how-old.net/ ). In this site you upload your photo and it shows your age and gender (not always correct but I think it's good try). Thank you again Mr. Walter Roberson :)
Walter Roberson
Walter Roberson 2015-6-7

A whole bunch of my friends tried how-old.net. The answers were pretty wrong, in both age and gender. For one of my pictures it identified me as 38 and male, and for another of my pictures it identified me as 56 and female. The difference between the two pictures was that I was looking at the camera at a slightly different angle.

Accuracy rates: please cite a source. I would like to examine the claimed rate.

"Computer Vision-Based Gender Detection from Facial Image" http://www.academia.edu/4275201/Computer_Vision-Based_Gender_Detection_from_Facial_Image

Final average accuracy rate: 78.91%. But the accuracy rate for women with short hair and no face or ear ornaments was only 44.16%

Kairos, a gender recognition product (e.g., for marketters), https://www.kairos.com/blog/gender-detection-in-live-video-and-still-images

"The ability for facial detection and recognition software to recognize gender is still in its relatively early days. There are not all that many statistics available yet. One figure that we know is that the Crowd Analytics API can boast a 92% gender accuracy rate."

However, if you read the rest of the blog they are not detecting gender, they are detecting the effects of testosterone, and detecting expression. The source for their 92% figure appears to be internal figures not scientific study.

请先登录,再进行评论。


Dima Lisin
Dima Lisin 2015-6-12
Hi Abu,
The following example showing how to classify hand-written digits using HOG and SVM would be a good place to start.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by