Update to 2.0.0 tree from current Fremantle build
[opencv] / debian / opencv-haartraining.1
1 .TH "OPENCV\-HAARTRAINING" "1" "May 2008" "OpenCV" "User Commands"
2
3
4 .SH NAME
5 opencv-haartraining \- train classifier
6
7
8 .SH SYNOPSIS
9 .B opencv\-haartraining [options]
10
11
12 .SH DESCRIPTION
13 .PP
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.
18 .PP
19 In the output:
20 .TP
21 .RB \(aq POS: \(aq
22 shows the hitrate in the set of training samples (should be equal or near to
23 .I 1.0
24 as in stage 0)
25 .TP
26 .RB \(aq NEG: \(aq
27 indicates the false alarm rate (should reach at least
28 .I 5*10-6
29 to be a usable classifier for real world applications)
30 .PP
31 If one of the above values gets
32 .IR 0 " (" zero ")"
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.
35
36
37 .SH OPTIONS
38 .PP
39 .B opencv\-haartraining
40 supports the following options:
41
42 .PP
43 .TP
44 .BI "\-data " dir_name
45 The directory in which the trained classifier is stored.
46
47 .TP
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)
51 utility).
52
53 .TP
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.
58
59 .TP
60 .BI "\-npos " number_of_positive_samples
61 The number of positive samples used in training of each classifier stage.
62 The default is
63 .IR 2000 .
64
65
66 .TP
67 .BI "\-nneg " number_of_negative_samples
68 The number of negative samples used in training of each classifier stage.
69 The default is
70 .IR 2000 .
71
72 .PP
73 Reasonable values are
74 .BR "\-npos 7000 \-nneg 3000" .
75
76 .TP
77 .BI "\-nstages " number_of_stage
78 The number of stages to be trained. The default is
79 .IR 14 .
80
81 .TP
82 .BI "\-nsplits " number_of_splits
83 Determine the weak classifier used in stage classifiers. If the value is
84 .IP
85 .BR 1 ,
86 then a simple stump classifier is used
87 .IP
88 .BR >=2 ,
89 then CART classifier with
90 .I number_of_splits
91 internal (split) nodes is used
92 .IP
93 The default is
94 .IR 1 .
95
96 .TP
97 .BI "\-mem " memory_in_MB
98 Available memory in
99 .B MB
100 for precalculation. The more memory you have the faster the training process is.
101 The default is
102 .IR 200 .
103
104 .TP
105 .B \-sym, \-nonsym
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
109 .BR \-sym .
110
111 .TP
112 .BI "\-minhitrate " min_hit_rate
113 The minimal desired hit rate for each stage classifier. Overall hit rate may
114 be estimated as
115 .IR "\%min_hit_rate^number_of_stages" .
116 The default is
117 .IR 0.950000 .
118
119 .TP
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" .
124 The default is
125 .IR 0.500000 .
126
127 .TP
128 .BI "\-weighttrimming " weight_trimming
129 Specifies whether and how much weight trimming should be used. The default is
130 .IR 0.950000 .
131 A decent choice is
132 .IR 0.900000 .
133
134 .TP
135 .B \-eqw
136 Specify if initial weights of all samples will be equal.
137
138 .TP
139 .BI "\-mode {" BASIC | CORE | ALL "}"
140 Select the type of haar features set used in training.
141 .I BASIC
142 uses only upright features, while
143 .I CORE
144 uses the full upright feature set and
145 .I ALL
146 uses the full set of upright and 45 degree rotated feature set.
147 The default is
148 .IR BASIC .
149 .IP
150 For more information on this see \%http://www.lienhart.de/ICIP2002.pdf.
151
152 .TP
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
157 .IR GAB .
158
159 .TP
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
163 .IR misclass .
164
165 .TP
166 .BI "\-maxtreesplits " max_number_of_splits_in_tree_cascade
167 The maximal number of splits in a tree cascade. The default is
168 .IR 0 .
169
170 .TP
171 .BI "\-minpos " min_number_of_positive_samples_per_cluster
172 The minimal number of positive samples per cluster. The default is
173 .IR 500 .
174
175 .TP
176 .BI "\-h " sample_height
177 The sample height (must have the same value as used during creation).
178 The default is
179 .IR 24 .
180
181 .TP
182 .BI "\-w " sample_width
183 The sample width (must have the same value as used during creation).
184 The default is
185 .IR 24 .
186
187 .PP
188 The same information is shown, if
189 .B opencv\-haartraining
190 is called without any arguments/options.
191
192
193 .SH EXAMPLES
194 .PP
195 TODO
196 .\" http://robotik.inflomatik.info/other/opencv/OpenCV_ObjectDetection_HowTo.pdf
197
198
199 .SH SEE ALSO
200 .PP
201 .BR opencv\-createsamples (1),
202 .BR opencv\-performance (1)
203 .PP
204 More information and examples can be found in the OpenCV documentation.
205
206
207 .SH AUTHORS
208 .PP
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).