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.
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.
- Align face images using any of face detection work. I recommend you to use MTCNN which performs really well in most cases.
- 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/
- Connect your data by setting path conf file
./conf/path_default.conf
. - Set
log_dir
intrain_joint_morph_id.py
, and others if needed. - Run
train_joint_morph_id.py