I’ve been doing some research around age recognition and found some old forum threads and few other models that could do young/old classifications.
Looking further I found this paper - Gil Levi and Tal Hassner. Age and Gender Classification Using Convolutional Neural Networks. IEEE Workshop on Analysis and Modeling of Faces and Gestures (AMFG), at the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Boston, 2015.
This is the link to the paper and dataset - https://talhassner.github.io/home/publication/2015_CVPR
Basically they provided images labeled using one out of 8 possible age categories: 0-2, 4-6, 8-12, 15-20, 25-32, 38-43, 48-53, 60-100. They also provided gender classification, which I did not use.
The paper, which dates back to 2015, said the model they build had 84.7% accuracy for age detection, so I made it my mission to beat that score using FASTAI!
I tried with many different learning rates, epochs, weight decay, etc. Eventually, I accomplish to get 84.4% accuracy with a Resnet 50. I was both happy and sad - it was close to 84.7% but I did not seem to be able to beat the 84.7%
That’s when I re-read the paper and found that I had completely misunderstood the accuracy of the model in the original paper: it was 50.7% (not 84.7%), meaning that the FASTAI model was 33.7% more accurate.
The 84.7% score I had seen was a metric they called “1-off” which meant the algorithm guessed the incorrect category, but it was adjacent to the right one. Hence I build a confusion matrix and calculated the “1-off” for the FASTAI model - it is 96.6%
All of the code is posted on my GitHub - https://github.com/jpmiskatonic/age-detection-fastai
Hopefully, someone can find this information useful!