Objects/Faces detection toolbox v 0.28
--------------------------------------
This toolbox provides some tools for objects/faces detection using Local Binary Patterns (and some variants) and Haar features.
Object/face detection is performed by evaluating trained models over multi-scan windows with boosting models
(such Adaboosting, FastAdaboosting and Gentleboosting) or with linear SVM models.
The main objective of FDT is to bring simple but efficient tools mainly written in C codes with a matlab interface and easy to modify.
BEFORE INSTALLATION, BE SURE TO HAVE A C COMPILER ON YOUR SYSTEM!!!!!
For windows system, recommanded compilers are MSVC/MSVC express (free)/Intel compiler
For Linux system, recommanded compilers are GCC(free)/Intel compiler
PLEASE BE SURE THAT YOU SETUP YOUR COMPILER BEFORE FDT INSTALLATION.
For checking, please type in matlab command : mex -setup
and choose your favorite compiler
For Windows system, default LCC compiler included in matlab can't compile all files, you should have some errors during installation.
For windows system, mex files using BLAS/LACPACK should be linked with the Intel Math Kernel Lib. Some crashed have been observed with
shipped Matlab BLAS/LACPACK lib with multithreads option
For Windows system, you may need also to add OMP_NUM_THREADS equal to the number of core in your system variables (if OpenMP failed)
For Linux system, you may need to install, the std++ package. Use the fowllowing command (Thanks to R. Mattheij) :
$sudo apt-get install g++-multilib
Installation
------------
This toolbox has been tested on Windows system and should also work for Linux plateform without any problem (Thanks to R. Mattheij for
Linux testing, I don't have personaly a Linux box close to me).
------> Please run "setup_fdt" to install, compile each mex-files and add fdtool directory in the matlab path.
Type "help mexme_fdt" for more compilation options.
Please open *.m or *.c files to read full description/instruction of each function and main references.
Run First
---------
a) Play with "demo_detector_haar.m" or "demo_detector_hmblbp.m" for real-time face tracking.
For windows system, you can use the included VCAPG2 webcam grabber. Otherwise and for Linux systems, you must have the IMAQ Toolbox (getsnapshot function).
b) View examples included in "train_cascade" for training Haar/MBLBP features with boosting algorithms and cascade (type "help train_cascade")
c) View examples included in "train_cascade_Xpos" for training Haar/MBLBP features with boosting algorithms and cascade (type "help train_cascade_Xpos")
Positives examples are staked in a 3D tensors.
d) View examples included in "train_model" for training Haar/MBLBP/HMBLBP/HCSMBLBP features with boosting/SVM algorithms.
(type "help train_model")
VCAPG2 webcam grabber for windows
---------------------------------
In order to compile vcapg2.cpp (webcam grabber for windows), please
i) download the last Windows DDK at http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff
ii) copy qedit.h into c:\Program Files\Microsoft SDKs\Windows\vx.x\Include folder where x.x designs the DDK version (currently last is 7.1)
iii) compile with mex vcapg2.cpp -I"c:\Program Files\Microsoft SDKs\Windows\vx.x\Include"
Thanks to Pr. Fehn for the x64 adaptation of vcapg2
Training set
------------
i) Positives examples for boosting approaches
Viola-Jones [4] and Jensen positives examples are included in this package in mat format, viola_24x24.mat and jensen_24x24.mat respectively where
the size of each image is (24 x 24).
ii) Positives examples for Histogram of feature + SVM
Please download a face database, for example the MIT-CBCL at:
http://cbcl.mit.edu/software-datasets/heisele/download/MIT-CBCL-facerec-database.zip
Extract "training-synthetic" pgm files in "positives" dir.
Or use the lfw cropped database available at http://itee.uq.edu.au/~conrad/lfwcrop/lfwcrop_grey.zip
P.S: CMU+MIT frontal faces dataset is available at: http://www.ee.oulu.fi/~jiechen/download/MIT-CMU-frontal-face-set-4-Timo.zip
(since the official link seems broken)
iii) Negatives examples
A relative small "negatives" archive is also included and must be unpacked into "negatives" dir.
2 possibilities to retrieve more negatives pics in jpeg format:
a)use "build_negatives.m" function or
b)download the following zip file: http://c2inet.sce.ntu.edu.sg/Jianxin/RareEvent/nonface.zip and extract in "negatives" subfolder
(be aware that there are still some positives faces in this zip !!!)
Demos
-----
10 demos are included.
i) "demo_mblbp"
ii) "demo_chlbp"
iii) "demo_haar"
vi) "demo_detector_haar"
v) "demo_detector_hmblbp"
vi) "demo_fine_threshold.m"
vii) "demo_haar_mblbp_training.m"
viii) "demo_mblbp.m"
ix) "demo_mblbp_variant_training.m"
x) "demo_type_cascade_scaling_vs_interp.m"
xi) "demo_detector_hmblgp"
Organization
------------
A) HAAR Features
detector_haar Real-Time face detector based on Haar's features trained with boosting methods
eval_haar Compute output of a trained strong classifier for new instances matrix X
eval_haar_subwindow Compute output of a trained strong classifier for new instances matrix X at different scale
fast_haar_ada_weaklearner Train ffast a Decision stump weaklearner with adaboost on Haar features.
Assume normal pdf for positives ans negatives examples
fast_haar_adaboost_binary_model_cascade Train a strong classifier with Fasthaaradaboosting on Haar features
gui_features_dictionary GUI for creating patterns dictionary
haar Compute the Haar features for a given set of featured defined by haar_featlist
haar_ada_weaklearner Decision stump weaklearner for adaboosting on Haar features computed online
haar_ada_weaklearner_memory Decision stump weaklearner for adaboosting on Haar features computed offline
haar_adaboost_binary_train_cascade Train a strong classifier with Adaboosting on Haar features computed online
haar_adaboost_binary_train_cascade_memory Train a strong classifier with Adaboosting on Haar features computed offline
haar_adaboost_binary_predict_cascade Predict label with trained model with Adaboosting on Haar features computed online
haar_adaboost_binary_predict_cascade_memory Predict label with trained model with Adaboosting on Haar features computed offline
haar_featlist Compute Haar features parameters
haar_gentle_weaklearner Decision stump weaklearner for gentleboosting on Haar features computed online
haar_gentle_weaklearner_memory Decision stump weaklearner for gentleboosting on Haar features computed offline
haar_gentleboost_binary_train_cascade Train a strong classifier with Gentleboosting on Haar features computed online
haar_gentleboost_binary_train_cascade_memory Train a strong classifier with Gentleboosting on Haar features computed offline
haar_gentleboost_binary_predict_cascade Predict label with trained model with Gentleboosting on Haar features computed online
haar_gentleboost_binary_predi