File: opencv_haartraining.1

package info (click to toggle)
opencv 4.2.0+dfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 267,588 kB
  • sloc: xml: 903,522; cpp: 899,500; lisp: 29,303; python: 29,102; java: 24,637; sh: 854; cs: 601; ansic: 546; perl: 494; makefile: 157
file content (215 lines) | stat: -rw-r--r-- 5,213 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
.TH "OPENCV_HAARTRAINING" "1" "May 2010" "OpenCV" "User Commands"


.SH NAME
opencv_haartraining \- train classifier


.SH SYNOPSIS
.B opencv_haartraining [options]


.SH DESCRIPTION
.PP
.B opencv_haartraining
is training the classifier. While it is running, you can already get an
impression, whether the classifier will be suitable or if you need to improve
the training set and/or parameters.
.PP
In the output:
.TP
.RB \(aq POS: \(aq
shows the hitrate in the set of training samples (should be equal or near to
.I 1.0
as in stage 0)
.TP
.RB \(aq NEG: \(aq
indicates the false alarm rate (should reach at least
.I 5*10-6
to be a usable classifier for real world applications)
.PP
If one of the above values gets
.IR 0 " (" zero ")"
there is an overflow. In this case the false alarm rate is so low, that
further training doesn't make sense anymore, so it can be stopped.


.SH OPTIONS
.PP
.B opencv_haartraining
supports the following options:

.PP
.TP
.BI "\-data " dir_name
The directory in which the trained classifier is stored.

.TP
.BI "\-vec " vec_file_name
The file name of the positive samples file (e.g. created by the
.BR opencv_createsamples (1)
utility).

.TP
.BI "\-bg " background_file_name
The background description file (the negative sample set). It contains a list
of images into which randomly distorted versions of the object are pasted for
positive sample generation.

.TP
.BI "\-bg-vecfile
This option is that bgfilename represents a vec file with discrete negatives. The default is
.BR "not set".

.TP
.BI "\-npos " number_of_positive_samples
The number of positive samples used in training of each classifier stage.
The default is
.IR 2000 .

.TP
.BI "\-nneg " number_of_negative_samples
The number of negative samples used in training of each classifier stage.
The default is
.IR 2000 .

.PP
Reasonable values are
.BR "\-npos 7000 \-nneg 3000" .

.TP
.BI "\-nstages " number_of_stage
The number of stages to be trained. The default is
.IR 14 .

.TP
.BI "\-nsplits " number_of_splits
Determine the weak classifier used in stage classifiers. If the value is
.IP
.BR 1 ,
then a simple stump classifier is used
.IP
.BR >=2 ,
then CART classifier with
.I number_of_splits
internal (split) nodes is used
.IP
The default is
.IR 1 .

.TP
.BI "\-mem " memory_in_MB
Available memory in
.B MB
for precalculation. The more memory you have the faster the training process is.
The default is
.IR 200 .

.TP
.B \-sym, \-nonsym
Specify whether the object class under training has vertical symmetry or not.
Vertical symmetry speeds up training process and reduces memory usage. For
instance, frontal faces show off vertical symmetry. The default is
.BR \-sym .

.TP
.BI "\-minhitrate " min_hit_rate
The minimal desired hit rate for each stage classifier. Overall hit rate may
be estimated as
.IR "\%min_hit_rate^number_of_stages" .
The default is
.IR 0.950000 .

.TP
.BI "\-maxfalsealarm " max_false_alarm_rate
The maximal desired false alarm rate for each stage classifier. Overall false
alarm rate may be estimated as
.IR "\%max_false_alarm_rate^number_of_stages" .
The default is
.IR 0.500000 .

.TP
.BI "\-weighttrimming " weight_trimming
Specifies whether and how much weight trimming should be used. The default is
.IR 0.950000 .
A decent choice is
.IR 0.900000 .

.TP
.B \-eqw
Specify if initial weights of all samples will be equal.

.TP
.BI "\-mode {" BASIC | CORE | ALL "}"
Select the type of haar features set used in training.
.I BASIC
uses only upright features, while
.I CORE
uses the full upright feature set and
.I ALL
uses the full set of upright and 45 degree rotated feature set.
The default is
.IR BASIC .
.IP
For more information on this see \%http://www.lienhart.de/ICIP2002.pdf.

.TP
.BI "\-h " sample_height
The sample height (must have the same value as used during creation).
The default is
.IR 24 .

.TP
.BI "\-w " sample_width
The sample width (must have the same value as used during creation).
The default is
.IR 24 .

.TP
.BI "\-bt {" DAB | RAB | LB | GAB "}"
The type of the applied boosting algorithm. You can choose between Discrete
AdaBoost (\fIDAB\fR), Real AdaBoost (\fIRAB\fR), LogitBoost (\fILB\fR) and
Gentle AdaBoost (\fIGAB\fR). The default is
.IR GAB .

.TP
.BI "\-err {" misclass | gini | entropy "}"
The type of used error if Discrete AdaBoost (\fB\-bt DAB\fR) algorithm is
applied. The default is
.IR misclass .

.TP
.BI "\-maxtreesplits " max_number_of_splits_in_tree_cascade
The maximal number of splits in a tree cascade. The default is
.IR 0 .

.TP
.BI "\-minpos " min_number_of_positive_samples_per_cluster
The minimal number of positive samples per cluster. The default is
.IR 500 .

.PP
The same information is shown, if
.B opencv_haartraining
is called without any arguments/options.


.SH EXAMPLES
.PP
TODO
.\" http://robotik.inflomatik.info/other/opencv/OpenCV_ObjectDetection_HowTo.pdf


.SH SEE ALSO
.PP
.BR opencv_createsamples (1),
.BR opencv_performance (1)
.PP
More information and examples can be found in the OpenCV documentation.


.SH AUTHORS
.PP
This manual page was written by \fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&>
and \fBNobuhiro Iwamatsu\fR <\&iwamatsu@debian.org\&>
for the Debian project (but may be used by others).