Skip to content

Age estimation project in TDT4173, NTNU Trondheim. We have created a deep CNN for predicting ages based on images.

Notifications You must be signed in to change notification settings

christianbv/AgeNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

AgeNet

This project is the final assignment in TDT4173 Machine Learning, NTNU Trondheim. Adrian Kjærran, Erling Stray-Bugge and Christian Vennerød have created a deep CNN network for multi-class age classification. The notebooks are published here in this repository, along with a script which you can download and run for yourselves. Please note that the script is a hybrid variant, where a exact age is estimated from the predicted softmax class distributions and an assumption that mean ages in each class is the middle age, e.g. mean age of (30-35) is 32.5.

Our published paper: https://arxiv.org/abs/2105.06746

Link to YouTube video:

Estimate your own age locally

*** Update 4.12.2020 ***

If you have problems with downloading the dependencies, try to pip import the following wrappers/libraries:

  1. opencv-python (for cv2)
  2. Keras (for keras)
  3. tensorflow (tf)
  4. Pillow-PIL (PIL Image wrapper)
  5. cmake (for the face-recognition library to work)
  6. face-recognition (might take some time if dlib is not installed)

*** Finish update 4.12.2020 ***

Only tested on MacOS Catalina with Python 3.8.
Required dependencies: TensorFlow, Keras, CV2, face_recognition, Numpy, and PIL.

  1. Download the file 'inference_CNN.py' from this repo
  2. Download our TensorFlow age estimation models:
  1. Unzip the zip file, and place the folder in a convenient destination.
  2. Copy the absolute destination path for the folder, and replace the path at line 16 under the variable "model_path" with your own path, in string format.
  3. Run the model, and estimate your own age :D

Notebooks

Contains:

  1. Code for downloading the different datasets
  2. Preprocessing the datasets
  3. Training the models
  4. Evaluating the models by visualizing metrics in Tensorboard.

Please check out the READme file in the notebooks folder for further descriptions.

Datasets:

  • Remember to authenticate with Google.

Link to Appa dataset: https://storage.cloud.google.com/ntnu-ml-bucket/Appa/appa_by_age_256_FIXED.zip Link to IMDB dataset: https://storage.cloud.google.com/ntnu-ml-bucket/IMDB/IMDB_by_age.zip Link to UTK dataset: https://storage.cloud.google.com/ntnu-ml-bucket/Utk/utk_by_age_256_FIXED.zip

Finished trained models:

  • Remember to authenticate with Google.
  1. A deep-CNN with 5 conv. layers and adam was trained on our data. This is our final model, and is found here:
  1. When training this model, we logged to GSB for each batch. The final zip file with logs from each batch when training our DCNN is found here (reproducibility):

About

Age estimation project in TDT4173, NTNU Trondheim. We have created a deep CNN for predicting ages based on images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •