Closed Yanyi1135 closed 6 years ago
Thank you for the information of the interesting dataset! The assumption maybe true to some extent. I'll try to train the model using the dataset =D
The UTKFace dataset became available for training.
Please check Create training data from the UTKFace dataset
section.
After 30 epochs:
Epoch 30/30
21337/21337 [==============================] - 125s 6ms/step - loss: 3.3244 - pred_gender_loss: 0.1568 - pred_age_loss: 2.8744 - pred_gender_acc: 0.9400 - pred_age_acc: 0.2157 - val_loss: 3.8092 - val_pred_gender_loss: 0.2727 - val_pred_age_loss: 3.2441 - val_pred_gender_acc: 0.8941 - val_pred_age_acc: 0.1493
Hello, yu4u Very appreciate that you could reply me that fast and help me to figure the problem out. Thank you.
@yu4u if possible, could you please share the pretrained model for UTKFace, perhaps with 128x128? Thank you!
https://github.com/yu4u/age-gender-estimation/releases/download/v0.5/weights.29-3.76_utk.hdf5
Trained with default parameters (64x64 input images). I'm not tested much on this model.
[NOTE]: Because the face images in the UTKFace dataset is tightly cropped (there is no margin around the face region), faces should also be cropped in demo.py if weights trained by the UTKFace dataset is used. Please set the margin argument to 0 for tight cropping:
python3 demo.py --weight_file WEIGHT_FILE --margin 0
@yu4u Thank you so much! Like others said, thank you for sharing you code. It's been very helpful to learn and use it, and it is very clean and readable. Appreciate your help!
I ran the demo.py on my computer already. It is perfect but somehow it can not distinguish gender correctly. I am wondering it probably was trained by IMDB-wiki and does not perform well on Asian's face. So I decide to train the model with UTKFace which will be linked right here: https://susanqq.github.io/UTKFace/
Is my assumption right? Could you give me some advice about how to train the model instead of IMDB-wiki?
Hi @kaileimao1996 , I met same problem with you. The gender model trained on imdb-wiki perfor poorly on Asian faces. And I trianed a new model UTKFace and get val accuracy 90.04% but when testing on real images, it is not so good. Have you solved this problem yet? Can you share some advices with me? Thank you very much!
I ran the demo.py on my computer already. It is perfect but somehow it can not distinguish gender correctly. I am wondering it probably was trained by IMDB-wiki and does not perform well on Asian's face. So I decide to train the model with UTKFace which will be linked right here: https://susanqq.github.io/UTKFace/
Is my assumption right? Could you give me some advice about how to train the model instead of IMDB-wiki?