Fast Asymmetric Learning For Cascade Face Detection Training/Testing Utility
Fast Asymmetric Learning For Cascade Face Detection Training/Testing Utility
Pi19404
July 4, 2013
Contents
Contents
Fast Asymmetric Learning for Cascade Object Detection
0.1 0.2 0.3 0.4 Introduction . . . . . . . . . . . . . . Motivation . . . . . . . . . . . . . . . . Implementation . . . . . . . . . . . . . Setup . . . . . . . . . . . . . . . . . . . Directory Setup . . . . . . . 0.4.1 Creating Training File . . . 0.4.2 Viewing The Training Data 0.4.3 Configuration File . . . . . . 0.4.4 Haar Features . . . . . . . . 0.4.5 Train The Classifier . . . . . 0.4.6 Testing the Classifier . . . 0.4.7 Code . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3 3 3 4 4 5 6 7 8 9 10 10 10
2 | 11
0.2 Motivation
The motivations of using this technique as opposed to standard haar cascade is reduced training time,seperation of feature extraction and ensemble classification and better performance. The reduced training times helps us is quickly training a classifier for required objects and observed and evaluate the performance of classifier. Seperation of feature extraction and ensemble classification provides us with a way to try out various feature extraction strategies and test the performance .Finally different methods of ensemble classification can be tested out. This user has flexibility in choosing feature extraction and ensemble classification techniques and relatively reduced training time.
0.3 Implementation
The source code is provided along with paper however the original code is only compatible with windows. Changes were made to code so that it can run on Ubuntu Linux platform and tested with latest version of OpenCV. The Visual C++ based GUI is replaced with Qt GUI. Here we are looking to train a cascade classifier to detect object of interest.
3 | 11
0.4 Setup
For training the classifier we need a set of positive and negative sample images.
Directory Setup
Create the following Directory structure. create a base directory object_detection.
Place the positive sample images in sub-directory 1 or training directory Place the negative samples image in the sub-directory 0 of training directory Place the test images in test directory Place the positive validation image in sub-directory 1 of validation directory Place the negative bootstrap images in the negative directory
Below are typical activities to be carried out for training a ensemble cascade classifier.
Create Binary Training Data File Create Binary Training Validation File
4 | 11
Go to menu Option Create View/File Select option Create Binary Training Data File Select the training database directory created earlier For example /media/windows/pi19404/Haar/training_database
5 | 11
The same process is required to be repeated for creating a validation binary data file. Provide as input the validation database path and a new validation file name. validation set is required to to evaluate the performance inorder to decide termination criteria and evaluate the performance during the training process.Validation set only consists of positive examples.
Go to menu Option Create View/File Select option Create Binary Training Data File Select the training database directory created earlier For example /media/windows/pi19404/Haar/validation_database Enter the file name of new training data file to be created For example /media/windows/pi19404/Haar/validation_database.dat
6 | 11
7 | 11
The options file contains other parameters like image size,false positive rate of cascade,detection rate of cascade,maximum number of nodes in cascade classifier, max number of features in each node of classifier and other parameters relating to feature extraction methods .
Go to menu Option Create View/File Select option Create Binary Training Data File Select the training database directory created earlier For example /media/windows/pi19404/Haar/validation_database Enter the file name of new training data file to be created For example /media/windows/pi19404/Haar/validation_database.dat
8 | 11
haar feature to incorporate a more complete set.But this leads to larger set of features. classifier.txt needs to be placed in the path specified in options.txt file before starting the application. In future this code would be updated to include a more complete feature set and use a more generic approach that listing co-ordinates in a file.
Options for feature selection methods :- Adaboost,Asyboost,FSS Options for ensemble training methods :- Ensemble Cascade Classifier,Linear Asymmetric Classifier and FDA
The feature selection methods will try to select a reduced set of features/weak classifier from a total of 16232 features. At each node of cascade classfier incremental increasing number of features are choosen. This considrably help in improving real time performance.This structure helps in rejecting a lot of candidates. Therotically the number of features selected based on false positive
9 | 11
Fast Asymmetric Learning for Cascade Object Detection rate and detection rate.However this criteria may still lead to large number of features.Hence a upper limit on the number of features is manually specified in options.txt file along with maximum number of nodes,false positive rate and detection rate. Before starting the application place the training and validation dataset files in the path specified by options.txt file .They can be empty files,but the files must be present.Also as mentioned earlier copy the classifier.txt file as per path specified in the options.txt file.
(e) Testing
0.4.7 Code
The code for the testing and training utility can be found at https://github.com/pi19404/m19404/tree/master/objdetect/LAC
10 | 11
Bibliography
Bibliography
[1] Jianxin Wu et al. Fast Asymmetric Learning for Cascade Face Detection. In: 0162-8828.
url: http://dx.doi.org/10.
issn:
11 | 11