/age-estimation-ranking-tensorflow

Age estimation using classification-ranking joint loss

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Scale-Varying Triplet Ranking for Age Estimation

This is a Tensorflow implementation of ACCV2018 paper: Scale-Varying Triplet Ranking with Classification Loss for Facial Age Estimation. The project is based on a pretrained model of FaceNet, which is implemented and open-sourced by davidsandberg's GitHub repo.

Training data

To train the network, you need to get your data ready for training. The sample code includes and example when I used MORPH dataset that you can buy for $199.00 for academic use.

Otherwise, you may want to use other datasets including Adience, FG-NET, ChaLearn, etc.

./data/morph.py contains an example code of data preperation. You can easily modify that code for other datasets.

How to use it

  1. Align face images using any of face detection work. I recommend you to use MTCNN which performs really well in most cases.
  2. Prepare pretrained face recognition model. You need to convert pretrained model from this repo to numpy file to load it correctly. I provide the converted checkpoint file. Simply put the file under ./pretrained/FaceNet/20170216-091149/
  3. Connect your data by setting path conf file ./conf/path_default.conf.
  4. Set log_dir in train_joint_morph_id.py, and others if needed.
  5. Run train_joint_morph_id.py