File Exchange Pick of the Week

Our best user submissions

How Old Do I Look?

Brett‘s Pick this week is Age and Gender Estimation from Face, by Masayuki Tanaka.

Back in 2014, I “co-selected” one of Masayuki’s files as a Pick of the Week when I was looking for ways to quantify blur–I was (rightly) taken to task for calling it “noise”– in single images. Today, I return to his oeuvre to highlight a fun new submission that estimates age and gender from a photo.

Downloading and installing Masayuki’s code will lead you to another of his submissions that detects face parts–eyes, nose, mouth–in images. (That code primarily modifies the defaults of the “face-parts detector” in vision.CascadeObjectDetector, purportedly with better results.) Then his code will automatically install a pre-trained vgg-based neural network that does the classification (gender) and regression (age).

I really like that Masayuki provided sample code for training a network, even though he provided pre-trained models. And I like that his code predicts both age and gender. But mostly I just like how much fun I had playing around with it!

Here I was a few years ago; the age-gender predictor got it pretty right:

Apparently, I look a year older if I flip the image left-to-right:

Try it on some of your own images–it’s fun! Just be sure to shield it from your partner if it turns out to predict that she is a he, and that “he” is a few years older than she really is!

Oh, and you’ll need the Deep Learning Toolbox to run Masayuki’s code.

As always, I welcome your thoughts and comments.

Published with MATLAB® R2019a

  • print
  • send email


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.