GilLevi / AgeGenderDeepLearning

628 stars 284 forks source link

Gender missclassification #27

Open adelfuchs opened 6 years ago

adelfuchs commented 6 years ago

Hi Gil,

I'm trying to predict gender with your gender model. I have a bunch of images and their true classifications. I'm predicting gender with your model and get something like 30% failure.

This is how I predict a single image: input_image=caffe.io.load_image(image_path) input_image = skimage.transform.resize(input_image, (256, 256)) imgplot = plt.imshow(input_image) // I'm able to see the image and it looks fine pred=gender_net.predict([input_image])

I get the same results also without resizing. Am I missing something?

Thanks, Adel

ireqhawk commented 6 years ago

i think maybe you have not crop face from the image @adelfuchs

adelfuchs commented 6 years ago

Images are cropped. They were taken from here: https://github.com/yu4u/age-gender-estimation (imdb database). Does the size of the images matter?

GilLevi commented 6 years ago

Hi Adel,

Thank you for your interest in our work.

If you are getting 30% error then you are actually getting 70% success which is not bad at all (since this is a binary problem). My guess is that the labels are reversed. Can you share your code?

Best, Gil

td042 commented 6 years ago

Hi Gil, thank you for your great work! I get a similar problem with missclassifications. I testest your example notebook file on Adience benchmark and could achieve almost your reported results. But when I test it on IMDB-WIKI dataset I only could achieve 56% accuracy. I have no idea if I did something wrong. Does the image has to be cropped to the face region or should I input the whole image into the network?

Thanks, Theresa

GilLevi commented 6 years ago

Hi @td042 ,

Thank you for your interest in our work. Indeed the images has to be cropped to the face region (and preferably aligned).

Best, Gil

PawelGD commented 5 years ago

@GilLevi Can you provide the code and models that you used to detect/align/crop the images for the experiments reported in your paper?

GilLevi commented 5 years ago

@PawelGD , the code for alignment is given here: https://talhassner.github.io/home/projects/Adience/Adience-code.html#inplanealign

The details regarding detection, cropping and alignment are described in the original paper presented the dataset : Eidinger, Eran, Roee Enbar, and Tal Hassner. "Age and gender estimation of unfiltered faces." IEEE Transactions on Information Forensics and Security 9.12 (2014): 2170-2179.‏

https://www.openu.ac.il/home/hassner/Adience/EidingerEnbarHassner_tifs.pdf