资源算法2D-Face-Alignment

2D-Face-Alignment

2020-03-26 | |  38 |   0 |   0

2D-Face-Alignment

The implementation of "Face Alignment at 3000 FPS via Regressing Local Binary Features" on CVPR 2014.


Requirements

  • Visual Studio 2015+ (Below without Tests)

  • OpenCV 3.3.0+ (Below without Tests)

Result

图片.png

Blue rectangle is the bounding box of face, red points are 68 landmarks

Trainset

The trainset Helen can be downloaded from Here

Training

Code Settings

In main.cpp, comment/uncomment the main function as following:

图片.png

Config Settings

Set the configs files as following:

  • config/helen.cfg

图片.png

ImgFolderPath: Folder which store the trainset images

ImgNameFile: File which store the filenames of the trainset images

  • config/train.cfg

图片.png

feature_num: The randomly picked point pairs generated around the landmark

landmark_num: The number of landmark in the dataset

stage_num: The stage number in cascade training

tree_depth: The depth of a single tree in the random forest when generating linear binary feature

tree_num_per_forest: The number of trees in the random forest

forest_overlap: The overlap argument when generating data for random forest

local_region_size: The region size to get features in each training stage

special_point_id: The landmark id of up, down, left, right, used for coarse alignment

Start Training

Just run and wait (about 1h on Helen dataset and Intel core i7 4710hq)

Running

Code Settings

In main.cpp, comment/uncomment the main function as following:

图片.png

The predictImage function's first argument is the image path

The predictImage function can also have a second argument which has a type cv::Rect and referred to the bounding box of face

If without this second argument, the program will use OpenCV's default bounding box extracting function

Models

This program will use models in the following list:

  • model/random_forest/*

  • model/regressor/*

  • S_0.mdl

  • haarcascade_frontalface_alt2.xml

The first three models will be generated in the training stage, if you want to use my model, just unzip the regressor.zip in model/

Reference

  • Face Alignment at 3000 FPS via Regressing Local Binary Features. CVPR 2014. Ren et al.

  • Liblinear. Lin et al.


上一篇:98point_face_alingnment

下一篇:face_alignment_challenge

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...