• Stars
    star
    197
  • Rank 196,552 (Top 4 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created almost 9 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

More Repositories

1

mini-caffe

Minimal runtime core of Caffe, Forward only, GPU support and Memory efficiency.
C++
375
star
2

deep-landmark

Predict facial landmarks with Deep CNNs powered by Caffe.
Python
283
star
3

JDA

C++ implementation of Joint Cascade Face Detection and Alignment.
C++
185
star
4

mx-lsoftmax

mxnet version of Large-Margin Softmax Loss for Convolutional Neural Networks.
Python
175
star
5

Joint-Face-Detection-and-Alignment

Caffe and Python implementation of Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
Python
101
star
6

OrdinalRegression

Caffe Loss Layer for Ordinal Regression with Multiple Output CNN for Age Estimation.
C++
45
star
7

mini-caffe-example

detect facial landmark with mini-caffe
C++
18
star
8

FashionAI.KPS

My solution to FashionAI Key Points Detection of Apparel.
Python
13
star
9

Apriori

a simple implementation of Apriori algorithm in Python.
Python
12
star
10

WGAN

Play with Wasserstein GAN on MXNet.
Python
10
star
11

jsmnpp

jsmn++ is a tiny json parser embedded in your C++ project for configuration.
C++
8
star
12

QMIBBrowser

a mib browser based on snmp++ and Qt
C
5
star
13

face-alignment-presentation

All materials used in Face Alignment Presentation for MultiMedia Course.
4
star
14

rcpr-annotated

RCPR ไปฃ็ ๆณจ่งฃ
MATLAB
3
star
15

luoyetx.github.io

Resume
CSS
2
star
16

installers

scripts for installing open source tools and libraries from source code. Currently On CentOS
Shell
2
star
17

spider-event

a simple workflow for web crawling
JavaScript
1
star
18

CourseraHW

Homework Code on Coursera
MATLAB
1
star