hdjsjyl / landmark_py

Landmark with Regressition in Python (LBF(3000fps), ESR and SDM)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Landmark with Regressition in Python

Now It only supportes LBF(Local Binary Features) regression(Based on the matlab version) with pts format dataset

Dependencies


All of the following modules can be easily installed by pip

PIL
numpy
scipy
scikit-learn
OpenCV (Optional: Only Used in demo_evaluate.py to show the result)

Install script on Ubuntu 14.04

sudo aptitude install python-pip gfortran
sudo pip install pillow numpy scipy sklearn

Usage


  • Train
    Get more details of training configuration in ./config/config_lbf.py

./demo_train.py ../config/config_lbf.py

  • Evaluate
    You can evaluate on different dataset via change the line99:demo_evaluate.py

./demo_evaluate.py ../config/model/train.model path.lst

Tips


  1. Data Augmentation by flip the image and points

Extension


  • Training with your own dataset
    You should implement your own reader. Please refer to AFLWReader in ./cascade/dator/reader.py.

  • Implement other regression algorithm Please refer to cascade/regressor/lbfRegressor.py. And then wrapped in cascade/regressor/regressorWrapper.py

TODO


You can find more todo list via searching "TODO" in source code

  • [TODO] Support Face Detector to detect the face instead of getting face rect via landmarks
  • [TODO] Support Explicit Shape Regression
  • [TODO] Support Supervised Descent Method
  • [TODO] Try random ferns instead of random forest
  • [TODO] Try finding the best split when training Random Forest. Now using random split
  • [TODO] Try different interpolations when computing Pixel Difference Feature

References


  1. Face Alignment at 3000 FPS via Regressing Local Binary Features
  2. Face Alignment by Explicit Shape Regression
  3. Supervised Descent Method and its Applications to Face Alignment

Contact


If you have any questions, please email shenfei1208@gmail.com or creating an issue on GitHub.

About

Landmark with Regressition in Python (LBF(3000fps), ESR and SDM)


Languages

Language:Python 100.0%