Once your training is done there will be a number of directories created in your haarcascade location you specified when your training first began. The directories will be labelled from 0…N where N is the total number of stages the trainer completed. In each directory there will be one AdaBoostCARTHaarClassisifer.txt file and each of the files contains information about that particular one stage of classifiers. In other words, a cascaded boost Haar classifier is composed of N stages of classifiers.

Below is an example of the contents of the AdaBoostCARTHaarClassisifer.txt file that is created in every stage of the training.

A excerpt from the stage 0 classifier output:
 

3
1
2
0 6 18 7 0 -1
9 6 9 7 0 2
haar_x2
-7.839686e-002 0 -1
6.697344e-001 -6.912314e-001
1
2
9 0 7 22 0 -1
9 11 7 11 0 2
haar_y2
2.000804e-001 0 -1
-6.013643e-001 6.833895e-001
1
2
3 0 9 2 0 -1
3 1 9 1 0 2
haar_y2
1.305457e-004 0 -1
-9.137786e-001 4.921354e-001
-8.454085e-001

-1
-1

Line 1: is the number of (weak) classifiers in this current stage that will ultimately be a part of the final strong classifier.
Line 2: is the number of nodes in this decision tree. Since each of classifier is viewed as a single node decision tree, all of my weak classifiers are all composed of only 1 node.
Line 3: is the number of rectangles involved in computing a Haar-like feature.
Line 4: 6 integers representing the parameters of the 1st rectangle.

1st value – x-coordinate of the top-left corner (r.x)
2nd value – y-coordinate of the top-left corner (r.y)
3rd value – width of rectangle (r.width)
4th value – height of rectangle (r.height)
5th value – band of the rectangle
6th value – weight of the rectangle

Line 5: 6 integers representing the parameters of the 2nd rectangle

(See Line 4: for definitions)

Line 6: A string displaying the haar feature type used
Line 7: 3 integers representing branches

1st value – Branches threshold if the value is
2nd value – Index of left branch
3rd value – Index of right branch

Line 8: Output value corresponding to the leaf

Tags: , ,

Leave a Reply