Git Product home page Git Product logo

age-detector's Introduction

Age Predictor Application

This project leverages Deep Learning to predict a person's age in a photo.

Here is the live version of the App: https://age-predictor.now.sh/

I used the fastai library for Deep Learning: https://github.com/fastai/fastai

I used the IMDB-Wiki Database for my data: https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/

Specifically, I used the Faces Only data from Wikipedia in that dataset which is around 1 GB. I trained this on a resnet-50 model pre-trained on Imagenet.

Data Preparation

The Jupyter notebook has all the steps required to prep the data and generate labels.

Once downloaded and untarred, the data is divided into subsets and stored in folders numbered 01–99. A python snippet in the notebook will loop through the directories and move all the files into one folder where the model could consume it.

There is no separate file for labels but rather they are within the filenames of the images themselves. The images in the dataset have filenames that include the date of birth of the person and the year the picture was taken. Using these, and assuming a mid-year date of 7/1 for when the photo was taken, we can come up with a good estimate of the age of the person in the photo when it was taken.

Another snippet of python code in the notebook will derive the age from these two dates to get the labels. To keep it simple for now, I selected only images from ages between 10–120. This means the model will not work for really young kids…or really really old people. The final data looks like this:

alt text

Model Training

I used a Resnet-50 pretrained on Imagenet for this project.

Results

You can check out a live version of the app here: https://age-predictor.now.sh/

alt text

Citations

@article{Rothe-IJCV-2016, author = {Rasmus Rothe and Radu Timofte and Luc Van Gool}, title = {Deep expectation of real and apparent age from a single image without facial landmarks}, journal = {International Journal of Computer Vision (IJCV)}, year = {2016}, month = {July}, }

@InProceedings{Rothe-ICCVW-2015, author = {Rasmus Rothe and Radu Timofte and Luc Van Gool}, title = {DEX: Deep EXpectation of apparent age from a single image}, booktitle = {IEEE International Conference on Computer Vision Workshops (ICCVW)}, year = {2015}, month = {December}, }

Check out Fastai if you want to get into Deep Learning. It's awesome: https://www.fast.ai/

age-detector's People

Contributors

btahir avatar

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.