Giter Club home page Giter Club logo

Comments (16)

yu4u avatar yu4u commented on June 27, 2024

Hi @taewookim,

  1. I simply chose 32x32 for efficiency in development and testing. It is not appropriate for deployment for its poor accuracy as you pointed out.
  2. I think the image size should be larger if accuracy matters. The image size 64x64 is used in the sample code in README.md as python3 create_db.py --output data/imdb_db.mat --db imdb --img_size 64. In the original paper [1], the VGGNet is used; the input image size is 224x224.

[1] R. Rothe, R. Timofte, and L. V. Gool, "DEX: Deep EXpectation of apparent age from a single image," ICCV, 2015.

from age-gender-estimation.

taewookim avatar taewookim commented on June 27, 2024

ah oops.. completely forgot about that. Thank you @yu4u

from age-gender-estimation.

taewookim avatar taewookim commented on June 27, 2024

By the way, how do you figure out the upper limit on how far this architecture can be taken? I'm sure this is more of a hardware limitation as well as how much time I'm willing to wait on, but are there any guidelines?

from age-gender-estimation.

yu4u avatar yu4u commented on June 27, 2024

Did you mean how to determine the size of the network?
I like WideResNet with moderate depth (16-22); it provides good trade-offs between accuracy and computational cost.

from age-gender-estimation.

taewookim avatar taewookim commented on June 27, 2024

@yu4u

I tried changing img_size to 224 and the model is performing really bad. For each of the 3 dense layers (i.e. classifying 3 things), loss was anywhere between 9 and 20 .. and accuracy didnt go anywhere even above 0.25. I didn't even bother finishing 30 epochs (i stopped at 28)

I am re-training with img_size at 64, but do you have any idea where I might have gone wrong and what are some things that I can tweak?

EDIT: Lowering to 32 img_size helped to lower loss ... currently on epoch 7:

Epoch 7/30 - loss: 3.7325
dense_3_loss: 1.4535 - dense_1_loss: 0.2372 - dense_2_loss: 1.5244
dense_3_acc: 0.3509 - dense_1_acc: 0.9 - dense_2_acc: 0.4345

from age-gender-estimation.

yu4u avatar yu4u commented on June 27, 2024

Currently, my implementation is not suitable for larger sizes of images (e.g. 224) for several reasons: 1) it saves and loads all raw images; it requires large amount of memory, 2) the stride of the network is only 4 (before pool (8, 8)) because small image size is assumed.

If you use the image size 224, it seems good idea to use officially supported pre-trained models:
https://keras.io/ja/applications/

from age-gender-estimation.

taewookim avatar taewookim commented on June 27, 2024

so what's the largest possible that would you'd recommend w/your implementation? im on Google compute w/12gb VRAM K80 GPU w/ 30gb RAM

from age-gender-estimation.

yu4u avatar yu4u commented on June 27, 2024

I think 64x64 is good enough because there seem to be many low resolution images in the dataset.

from age-gender-estimation.

darshansharma avatar darshansharma commented on June 27, 2024

Hi, I tried this project with your pretrained model with default depth and width but it is giving the wrong prediction. for example it is predicting age 43 F of a 80-year female lady. It is predicting wrong on each and every image.

from age-gender-estimation.

yu4u avatar yu4u commented on June 27, 2024

Please confirm that your backend and channel order are consistent with the pretrained model.

from age-gender-estimation.

darshansharma avatar darshansharma commented on June 27, 2024

I am using your pretrained model and my hardware specs are different from your one. Is that an issue?

from age-gender-estimation.

yu4u avatar yu4u commented on June 27, 2024

What is your backend?

from age-gender-estimation.

 avatar commented on June 27, 2024

Hi, I'd like to ask you where I can see the calculation of this model? because its accuracy is bad from 0.2 to 0.4

from age-gender-estimation.

yu4u avatar yu4u commented on June 27, 2024

See:

https://github.com/yu4u/age-gender-estimation/blob/master/demo.py#L101-L105

from age-gender-estimation.

 avatar commented on June 27, 2024

Thank you for your reply. But I mean train and test(validation) accuracy.
When I set the learning rate = 0.001 by all epochs, It would be trained for train dataset. but val_loss increased so there was an over-fitting(did not decrease val_loss)

from age-gender-estimation.

yu4u avatar yu4u commented on June 27, 2024

The validation accuracy is automatically calculated by Keras using validation_data=(X_test, [y_test_g, y_test_a]).
Overfitting would be alleviated by data augmentation.

from age-gender-estimation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.