Pca+lda Human face judging sex

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/kklots/article/details/8247738

Recently, as a result of the curriculum needs, has been studying through the face to judge gender, in the OPENCV contrib provides two methods that can be used to identify gender: Eigenface and Fisherface,eigenface mainly using PCA (principal component analysis), By eliminating the correlation in the data, the high-dimensional image is reduced to the low-dimensional space, the sample in the training set is mapped to a point in the low-dimensional space, the test picture is mapped to the low-dimensional space, and then the last sample point is calculated from the test image, and the gender of the nearest sample point is assigned to the test picture Fisherface mainly uses the idea of LDA (linear projection analysis) to project the male and female samples in the sample space into a straight line over the origin, and ensures that the sample has the smallest distance within the projection class on the line, and the distance between the classes is the largest, thus separating the distinction between men and women.

The Lda method (i.e., fisherface) is more suitable for human face judging gender, because PCA considers the direction in which all the different kinds of samples are most widely distributed, regardless of the relationship between the different classes, and LDA considers how to make the different classes of samples as open as possible.

In Fisherface's introductory document, the author claims that it obtained about 98% of the sex recognition rate in cross-testing, but in the actual use of the process, I found that fisherface is not so good as the author, just less than 60%, only slightly better than random guesses, good sad urging-_-!。

Through experimental observation, I think the main reasons are as follows: 1. In the experiment, the sample was carefully calibrated to the eye position, all the samples of the eye position are strictly coincident, so fisherface can find more stable difference information, but in practice, the pre-facial recognition work by Viola_ Jones classifier, because the viola_jones classifier is unable to accurately locate the eye, so the test picture and sample can not be better coincident; 2. The original sample uses 200*200-sized images to form a 40000-D feature vector, which contains a large amount of redundant information and noise. Results in the inaccuracy of the Lda method.

Here I through a simple method, overcome the shortcomings of the existence of Fisherface: First, the original sample image is reduced to the PCA, and then used LDA for classification training, in the test, the original image is also the PCA dimensionality, and then use LDA to identify, This can effectively eliminate redundant information and noise interference, compressed information on the face position also become insensitive. By randomly downloading some network pictures to test, found that in the Training sample library fixed, the optimized fisherface enough to correctly identify about 90% of the gender of the characters, compared to the original method to improve about 30% or so.

Here is the human face classification executable file: Click here (2012/12/14 latest upload, bug has been modified, not installed CUDA environment of the computer can also execute), the need for children's shoes please click to download.

Give some renderings:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.