herosan163 / ageestimation Goto Github PK
View Code? Open in Web Editor NEWPyTorch Implementation of Mean-Variance Loss for age estimation.
License: MIT License
PyTorch Implementation of Mean-Variance Loss for age estimation.
License: MIT License
Log from last two epochs
epoch: 97, mean_loss: 11.779, variance_loss: 81.855, softmax_loss: 4.167, loss: 97.801, mae: 4.265306
epoch: 97, test_mae: 3.533333
[98, 0] mean_loss: 0.015, variance_loss: 0.086, softmax_loss: 0.075, loss: 0.176
[98, 1] mean_loss: 0.074, variance_loss: 0.181, softmax_loss: 0.201, loss: 0.456
[98, 2] mean_loss: 0.042, variance_loss: 0.137, softmax_loss: 0.155, loss: 0.334
[98, 3] mean_loss: 0.018, variance_loss: 0.261, softmax_loss: 0.175, loss: 0.454
[98, 4] mean_loss: 0.003, variance_loss: 0.084, softmax_loss: 0.084, loss: 0.171
[98, 5] mean_loss: 0.032, variance_loss: 0.132, softmax_loss: 0.165, loss: 0.329
[98, 6] mean_loss: 0.029, variance_loss: 0.270, softmax_loss: 0.068, loss: 0.367
[98, 7] mean_loss: 0.142, variance_loss: 0.065, softmax_loss: 0.233, loss: 0.440
[98, 8] mean_loss: 0.085, variance_loss: 0.187, softmax_loss: 0.177, loss: 0.449
[98, 9] mean_loss: 0.002, variance_loss: 0.070, softmax_loss: 0.053, loss: 0.125
[98, 10] mean_loss: 0.034, variance_loss: 0.254, softmax_loss: 0.226, loss: 0.514
[98, 11] mean_loss: 0.003, variance_loss: 0.083, softmax_loss: 0.128, loss: 0.214
[98, 12] mean_loss: 0.012, variance_loss: 0.081, softmax_loss: 0.173, loss: 0.265
[98, 13] mean_loss: 0.007, variance_loss: 0.146, softmax_loss: 0.083, loss: 0.236
epoch: 98, mean_loss: 11.781, variance_loss: 81.849, softmax_loss: 4.172, loss: 97.801, mae: 4.724490
epoch: 98, test_mae: 2.800000
[99, 0] mean_loss: 0.020, variance_loss: 0.038, softmax_loss: 0.143, loss: 0.200
[99, 1] mean_loss: 0.017, variance_loss: 0.191, softmax_loss: 0.104, loss: 0.312
[99, 2] mean_loss: 0.005, variance_loss: 0.138, softmax_loss: 0.065, loss: 0.208
[99, 3] mean_loss: 0.001, variance_loss: 0.041, softmax_loss: 0.084, loss: 0.126
[99, 4] mean_loss: 0.036, variance_loss: 0.171, softmax_loss: 0.111, loss: 0.319
[99, 5] mean_loss: 0.003, variance_loss: 0.060, softmax_loss: 0.082, loss: 0.145
[99, 6] mean_loss: 0.007, variance_loss: 0.121, softmax_loss: 0.140, loss: 0.268
[99, 7] mean_loss: 0.060, variance_loss: 0.245, softmax_loss: 0.378, loss: 0.682
[99, 8] mean_loss: 0.026, variance_loss: 0.323, softmax_loss: 0.127, loss: 0.476
[99, 9] mean_loss: 0.001, variance_loss: 0.080, softmax_loss: 0.051, loss: 0.132
[99, 10] mean_loss: 0.028, variance_loss: 0.239, softmax_loss: 0.110, loss: 0.377
[99, 11] mean_loss: 0.102, variance_loss: 0.127, softmax_loss: 0.171, loss: 0.399
[99, 12] mean_loss: 0.032, variance_loss: 0.118, softmax_loss: 0.196, loss: 0.345
[99, 13] mean_loss: 0.021, variance_loss: 0.213, softmax_loss: 0.118, loss: 0.351
epoch: 99, mean_loss: 11.747, variance_loss: 82.039, softmax_loss: 4.170, loss: 97.956, mae: 4.540816
epoch: 99, test_mae: 4.000000
best_loss_epoch: 2, best_val_loss: 96.452576, best_mae_epoch: 43, best_val_mae: 3.683673
As you can see it doesn't seem to be converging and the best loss was at epoch 2
in main.py
criterion1 = MeanVarianceLoss(LAMBDA_2, LAMBDA_1, START_AGE, END_AGE).cuda()
it looks like LAMBDA_2
and LAMBDA_1
are switched.
anyhow I couldn't replicate your result so it might be because of the above. I am not sure.
I had to go through 1000+ epochs to reach MAE of 3 or 4.
Thanks very much for your work!
Can you share the model pretrained on the IMDB-WIKI dataset?
Thank you for your implementation Herosan163.
Would it be possible for you to share the trained model?
Thank you
Hello, when I run your code, the softmax loss starts to increase during the 16th epoch. Does this happen to you?
Can you explain to me what this sentence means? Thank you.
self.labels.append(int(basename[4:6]))
Is it to get the age label of FGNET?and When I run in morph2, how should I get the label?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.