For gender detection, I took 20 faces of men and 20 faces of women and then trained fisherface algorithm with these faces by using id 1 for all male faces and 2 for all female faces. now when I am predicting with any male or female image, it gives correct answer. but here I want to know that Is this approach is right or not. Is there any better way to this?