1 .TH "OPENCV\-HAARTRAINING" "1" "May 2008" "OpenCV" "User Commands"
5 opencv-haartraining \- train classifier
9 .B opencv\-haartraining [options]
14 .B opencv\-haartraining
15 is training the classifier. While it is running, you can already get an
16 impression, whether the classifier will be suitable or if you need to improve
17 the training set and/or parameters.
22 shows the hitrate in the set of training samples (should be equal or near to
27 indicates the false alarm rate (should reach at least
29 to be a usable classifier for real world applications)
31 If one of the above values gets
33 there is an overflow. In this case the false alarm rate is so low, that
34 further training doesn't make sense anymore, so it can be stopped.
39 .B opencv\-haartraining
40 supports the following options:
44 .BI "\-data " dir_name
45 The directory in which the trained classifier is stored.
48 .BI "\-vec " vec_file_name
49 The file name of the positive samples file (e.g. created by the
50 .BR opencv\-createsamples (1)
54 .BI "\-bg " background_file_name
55 The background description file (the negative sample set). It contains a list
56 of images into which randomly distorted versions of the object are pasted for
57 positive sample generation.
60 .BI "\-npos " number_of_positive_samples
61 The number of positive samples used in training of each classifier stage.
67 .BI "\-nneg " number_of_negative_samples
68 The number of negative samples used in training of each classifier stage.
74 .BR "\-npos 7000 \-nneg 3000" .
77 .BI "\-nstages " number_of_stage
78 The number of stages to be trained. The default is
82 .BI "\-nsplits " number_of_splits
83 Determine the weak classifier used in stage classifiers. If the value is
86 then a simple stump classifier is used
89 then CART classifier with
91 internal (split) nodes is used
97 .BI "\-mem " memory_in_MB
100 for precalculation. The more memory you have the faster the training process is.
106 Specify whether the object class under training has vertical symmetry or not.
107 Vertical symmetry speeds up training process and reduces memory usage. For
108 instance, frontal faces show off vertical symmetry. The default is
112 .BI "\-minhitrate " min_hit_rate
113 The minimal desired hit rate for each stage classifier. Overall hit rate may
115 .IR "\%min_hit_rate^number_of_stages" .
120 .BI "\-maxfalsealarm " max_false_alarm_rate
121 The maximal desired false alarm rate for each stage classifier. Overall false
122 alarm rate may be estimated as
123 .IR "\%max_false_alarm_rate^number_of_stages" .
128 .BI "\-weighttrimming " weight_trimming
129 Specifies whether and how much weight trimming should be used. The default is
136 Specify if initial weights of all samples will be equal.
139 .BI "\-mode {" BASIC | CORE | ALL "}"
140 Select the type of haar features set used in training.
142 uses only upright features, while
144 uses the full upright feature set and
146 uses the full set of upright and 45 degree rotated feature set.
150 For more information on this see \%http://www.lienhart.de/ICIP2002.pdf.
153 .BI "\-bt {" DAB | RAB | LB | GAB "}"
154 The type of the applied boosting algorithm. You can choose between Discrete
155 AdaBoost (\fIDAB\fR), Real AdaBoost (\fIRAB\fR), LogitBoost (\fILB\fR) and
156 Gentle AdaBoost (\fIGAB\fR). The default is
160 .BI "\-err {" misclass | gini | entropy "}"
161 The type of used error if Discrete AdaBoost (\fB\-bt DAB\fR) algorithm is
162 applied. The default is
166 .BI "\-maxtreesplits " max_number_of_splits_in_tree_cascade
167 The maximal number of splits in a tree cascade. The default is
171 .BI "\-minpos " min_number_of_positive_samples_per_cluster
172 The minimal number of positive samples per cluster. The default is
176 .BI "\-h " sample_height
177 The sample height (must have the same value as used during creation).
182 .BI "\-w " sample_width
183 The sample width (must have the same value as used during creation).
188 The same information is shown, if
189 .B opencv\-haartraining
190 is called without any arguments/options.
196 .\" http://robotik.inflomatik.info/other/opencv/OpenCV_ObjectDetection_HowTo.pdf
201 .BR opencv\-createsamples (1),
202 .BR opencv\-performance (1)
204 More information and examples can be found in the OpenCV documentation.
209 This manual page was written by \fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&>
210 for the Debian project (but may be used by others).