I am very much interested in pattern classification experiments and its theory etc. So I am trying some home brew experiments using MATLAB. As a first major experiment, I would like to classify persons based on sex from facial images. My doubt is basically is it worth attempting it, because right now I don't have idea on what are the basic facial features to extract and how to do that? I want basic facial features to distinguish between males and females. I am using kNN classifier.
At your first stage, which classifier to use is not that important, you may need to make your code run first. There was a very famous paper on Face Recognition and Gender Determination, in which a very complex transform was implemented to represent each node on the face. The used gabor kernal based wavelet transform to get set of coefficients for each node(refers to jet), and use sparse jets to represent the face. They also consider the template matching to ensure that each face can be decomposed of the jets. They built a look-up table to record the correlation between each jet and the gender. When a new image comes, the gender is determined by the pooling result of the jet sets.
But most approaches nowadays won't be that complicated. Basically the image intensity is used as the face input (or RGB color components but they are intensity equivalently). Each image matrix is reshaped into a long vector, and all the images from training set will form a large M X N matrix where M is the image pixel size and N is the sample number. Then Principal Component Analysis is used on the matrix to extract the core components, and project them onto a sub-space. Intra-class and inter-class scatter difference is calculated, then Linear Discriminant Analysis is applied to maximize the ratio of the determinant of Inter-class scatter and intra-class scatter. Please refer to this link to see more details (The algorithm is implemented by Python though).