C++ implementation of Face Alignment at 3000 FPS via Regressing Local Binary Features
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
3rdparty/liblinear init Sep 29, 2015
data init Sep 29, 2015
images update README.md Oct 2, 2015
include/lbf update Oct 2, 2015
model init Sep 29, 2015
src fix landmark id error for 29 landmark dataset Jan 9, 2016
.gitignore init Sep 29, 2015
CMakeLists.txt update Sep 29, 2015
LICENSE init Sep 29, 2015
README.md fix link Oct 19, 2016
lib3000fps.cmake init Sep 29, 2015

README.md

face-alignment-at-3000fps

C++ implementation of Face Alignment at 3000 FPS via Regressing Local Binary Features.

Prepare Data

We can download dataset from here. The dataset contains 68 points for every face, however it doesn't provide a bounding box for faces. We need our face detector to generate face bounding box (I think it is resonable because we should ues the same face detector for training and prediction).

Download the dataset and extract the data (xxx.jpg and xxx.pts) to the directory data, e.g. data/68. We also need two text file data/68/Path_Images_train.txt and data/68/Path_Images_test.txt to list the images used for train and test. The path can be relative like ../data/68/xxx.jpg or absolute like /home/zhangjie/projects/face-alignment-at-3000fps/data/68/xxx.jpg or E:/projects/face-alignment-at-3000fps/data/68/xxx.jpg.

Build the project

We only need OpenCV and CMake to build the project.

$ git clone https://github.com/luoyetx/face-alignment-at-3000fps.git
$ cd face-alignment-at-3000fps
$ mkdir build && cd build
$ cmake ..

If you are on Linux, simply use make to compile the project. If you are on Windows, you may compile using Visual Studio.

Train

Since we have prepare the data, $ ./FaceAlignment prepare will generate two text file train.txt and test.txt under ../data/68. These text files are used for training and testing, each line points out an image path and face bounding box in this image with facial points location. We use VJ detector provided by OpenCV, you can use your own face detector to generate these two text file.

$ ./FaceAlignment train will start training and result will be lied in the directory model. $ ./FaceAlignment test will test the model on test data. If you have a Desktop Environment on the Linux, $ ./FaceAlignment run will do the prediction over test data by presenting a window to show the result.

Tuning

The Configure is under src/lbf/common.cpp/Config::Config, modify the config under your own condition.

Notice

The relative path used in source code are all start from ../build, you may change this under your own condition.

Pre-trained Model

I will not provide a pre-trained model, please train the code on your own data.

Some Test

License

BSD 3-Clause

Reference