Predict facial landmarks with Deep CNNs powered by Caffe.
All training data can be downloaded from here.
Download the images and extract to dataset
with train
and test
.
modify level1.py, level2.py, level3.py
under dataset
to change to training datasets.
./bootstrap.sh
This will first generate prototxt files for caffe models and convert training data(images and landmarks) into h5 files. Then We will train the level-1 CNNs and use the result to generate training data for level-2. And for level-2 and level-3 goes the same way.
I strongly suggest you to train every CNN seperately. It's every important to view the loss at first to see if it is stable, if not, stop the training and restart.
I have modified Caffe source code to log the test loss over every test, and I write view_loss.py
to plot the loss, all log file are under log
so as plot. If the loss plot is unusual, retraining the CNN model is needed.
All model files are under model
, we can modify *.template
file to change the caffe model for every level.
I have created a web page to test the project, all code are under webapp
.