Skip to content

Instantly share code, notes, and snippets.

@kscottz
Created May 14, 2014 17:51
Show Gist options
  • Save kscottz/f626e1850c30b9dffbdb to your computer and use it in GitHub Desktop.
Save kscottz/f626e1850c30b9dffbdb to your computer and use it in GitHub Desktop.
opencv_haartraining -data haar_rab -vec new_positives.vec -bg negatives.txt -minhitrate 0.98 -maxfalsealarm 0.5 -npos 200 -nneg 800 -w 30 -h 80 -mem 1024 -mode ALL -bt RAB
Data dir name: haar_rab
Vec file name: new_positives.vec
BG file name: negatives.txt, is a vecfile: no
Num pos: 200
Num neg: 800
Num stages: 14
Num splits: 1 (stump as weak classifier)
Mem: 1024 MB
Symmetric: TRUE
Min hit rate: 0.980000
Max false alarm rate: 0.500000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: ALL
Width: 30
Height: 80
Applied boosting algorithm: RAB
Error (valid only for Discrete and Real AdaBoost): misclass
Max number of splits in tree cascade: 0
Min number of positive samples per cluster: 500
Required leaf false alarm rate: 6.10352e-05
Tree Classifier
Stage
+---+
| 0|
+---+
Number of features used : 2209481
Parent node: NULL
*** 1 cluster ***
POS: 200 200 1.000000
NEG: 800 1
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-1.020072| 1.000000| 1.000000| 0.154000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-2.595074| 1.000000| 1.000000| 0.154000|
+----+----+-+---------+---------+---------+---------+
| 3|100%|-|-0.979816| 1.000000| 0.518750| 0.135000|
+----+----+-+---------+---------+---------+---------+
| 4|100%|+|-1.564271| 1.000000| 0.518750| 0.148000|
+----+----+-+---------+---------+---------+---------+
| 5|100%|-|-0.783499| 0.990000| 0.292500| 0.129000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1180.00
Number of used features: 5
Parent node: NULL
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+
| 0|
+---+
0
Parent node: 0
*** 1 cluster ***
POS: 200 202 0.990099
NEG: 800 0.312378
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-0.863480| 1.000000| 1.000000| 0.206000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-1.446028| 1.000000| 1.000000| 0.289000|
+----+----+-+---------+---------+---------+---------+
| 3|100%|-|-2.138508| 1.000000| 1.000000| 0.256000|
+----+----+-+---------+---------+---------+---------+
| 4|100%|+|-1.810724| 0.985000| 0.741250| 0.237000|
+----+----+-+---------+---------+---------+---------+
| 5| 79%|-|-2.334069| 0.990000| 0.786250| 0.139000|
+----+----+-+---------+---------+---------+---------+
| 6| 82%|+|-1.574730| 0.985000| 0.390000| 0.110000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1136.00
Number of used features: 6
Parent node: 0
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+---+
| 0| 1|
+---+---+
0---1
Parent node: 1
*** 1 cluster ***
POS: 200 205 0.975610
NEG: 800 0.125254
BACKGROUND PROCESSING TIME: 1.00
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-0.658453| 1.000000| 1.000000| 0.208000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-1.378907| 1.000000| 1.000000| 0.290000|
+----+----+-+---------+---------+---------+---------+
| 3|100%|-|-0.784060| 0.990000| 0.721250| 0.152000|
+----+----+-+---------+---------+---------+---------+
| 4| 77%|+|-1.751043| 0.990000| 0.600000| 0.152000|
+----+----+-+---------+---------+---------+---------+
| 5| 94%|-|-1.106983| 0.985000| 0.567500| 0.155000|
+----+----+-+---------+---------+---------+---------+
| 6| 77%|+|-1.756062| 0.985000| 0.402500| 0.127000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1083.00
Number of used features: 6
Parent node: 1
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+---+---+
| 0| 1| 2|
+---+---+---+
0---1---2
Parent node: 2
*** 1 cluster ***
POS: 200 212 0.943396
NEG: 800 0.051563
BACKGROUND PROCESSING TIME: 4.00
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-0.648187| 1.000000| 1.000000| 0.195000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-1.386318| 1.000000| 1.000000| 0.195000|
+----+----+-+---------+---------+---------+---------+
| 3|100%|-|-1.491017| 0.985000| 0.852500| 0.338000|
+----+----+-+---------+---------+---------+---------+
| 4| 88%|+|-1.284087| 0.985000| 0.831250| 0.231000|
+----+----+-+---------+---------+---------+---------+
| 5| 86%|-|-2.146930| 0.990000| 0.780000| 0.185000|
+----+----+-+---------+---------+---------+---------+
| 6| 82%|+|-1.554341| 0.985000| 0.575000| 0.250000|
+----+----+-+---------+---------+---------+---------+
| 7| 79%|-|-1.613585| 0.990000| 0.647500| 0.171000|
+----+----+-+---------+---------+---------+---------+
| 8| 75%|+|-1.925669| 0.985000| 0.626250| 0.119000|
+----+----+-+---------+---------+---------+---------+
| 9| 78%|-|-1.675977| 0.985000| 0.478750| 0.112000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1620.00
Number of used features: 9
Parent node: 2
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+---+---+---+
| 0| 1| 2| 3|
+---+---+---+---+
0---1---2---3
Parent node: 3
*** 1 cluster ***
POS: 200 215 0.930233
NEG: 800 0.0265349
BACKGROUND PROCESSING TIME: 7.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-1.518366| 1.000000| 1.000000| 0.334000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-0.748756| 0.990000| 0.695000| 0.147000|
+----+----+-+---------+---------+---------+---------+
| 3| 75%|-|-2.080725| 0.985000| 0.723750| 0.290000|
+----+----+-+---------+---------+---------+---------+
| 4| 90%|+|-2.467461| 0.990000| 0.602500| 0.110000|
+----+----+-+---------+---------+---------+---------+
| 5| 82%|-|-1.265574| 1.000000| 0.593750| 0.082000|
+----+----+-+---------+---------+---------+---------+
| 6| 76%|+|-1.852009| 0.985000| 0.363750| 0.082000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 993.00
Number of used features: 6
Parent node: 3
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+---+---+---+---+
| 0| 1| 2| 3| 4|
+---+---+---+---+---+
0---1---2---3---4
Parent node: 4
*** 1 cluster ***
POS: 200 219 0.913242
NEG: 800 0.01102
BACKGROUND PROCESSING TIME: 19.00
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-1.674509| 1.000000| 1.000000| 0.210000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-1.453373| 0.985000| 0.943750| 0.210000|
+----+----+-+---------+---------+---------+---------+
| 3| 95%|-|-2.811851| 0.995000| 1.000000| 0.297000|
+----+----+-+---------+---------+---------+---------+
| 4|100%|+|-3.232551| 0.995000| 1.000000| 0.078000|
+----+----+-+---------+---------+---------+---------+
| 5|100%|-|-1.332502| 1.000000| 0.427500| 0.107000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 856.00
Number of used features: 5
Parent node: 4
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+---+---+---+---+---+
| 0| 1| 2| 3| 4| 5|
+---+---+---+---+---+---+
0---1---2---3---4---5
Parent node: 5
*** 1 cluster ***
POS: 200 219 0.913242
NEG: 800 0.00453754
BACKGROUND PROCESSING TIME: 46.00
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-2.097667| 1.000000| 1.000000| 0.105000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-1.659071| 1.000000| 0.330000| 0.029000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 328.00
Number of used features: 2
Parent node: 5
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+---+---+---+---+---+---+
| 0| 1| 2| 3| 4| 5| 6|
+---+---+---+---+---+---+---+
0---1---2---3---4---5---6
Parent node: 6
*** 1 cluster ***
POS: 200 219 0.913242
NEG: 800 0.00157381
BACKGROUND PROCESSING TIME: 131.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-3.912019| 1.000000| 1.000000| 0.004000|
+----+----+-+---------+---------+---------+---------+
| 2| 80%|+|-0.001357| 1.000000| 0.000000| 0.061000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 258.00
Number of used features: 2
Parent node: 6
Chosen number of splits: 0
Total number of splits: 0
Tree Classifier
Stage
+---+---+---+---+---+---+---+---+
| 0| 1| 2| 3| 4| 5| 6| 7|
+---+---+---+---+---+---+---+---+
0---1---2---3---4---5---6---7
Parent node: 7
*** 1 cluster ***
POS: 200 219 0.913242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment