Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
7da0e37b
Commit
7da0e37b
authored
Jul 25, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2999 from jpuigcerver:traincascade_choose_threads
parents
ee90b88d
16a82b17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
traincascade.cpp
apps/traincascade/traincascade.cpp
+7
-0
ug_traincascade.rst
doc/user_guide/ug_traincascade.rst
+6
-0
No files found.
apps/traincascade/traincascade.cpp
View file @
7da0e37b
...
...
@@ -13,6 +13,7 @@ int main( int argc, char* argv[] )
int
numPos
=
2000
;
int
numNeg
=
1000
;
int
numStages
=
20
;
int
numThreads
=
getNumThreads
();
int
precalcValBufSize
=
256
,
precalcIdxBufSize
=
256
;
bool
baseFormatSave
=
false
;
...
...
@@ -36,6 +37,7 @@ int main( int argc, char* argv[] )
cout
<<
" [-precalcValBufSize <precalculated_vals_buffer_size_in_Mb = "
<<
precalcValBufSize
<<
">]"
<<
endl
;
cout
<<
" [-precalcIdxBufSize <precalculated_idxs_buffer_size_in_Mb = "
<<
precalcIdxBufSize
<<
">]"
<<
endl
;
cout
<<
" [-baseFormatSave]"
<<
endl
;
cout
<<
" [-numThreads <max_number_of_threads = "
<<
numThreads
<<
">]"
<<
endl
;
cascadeParams
.
printDefaults
();
stageParams
.
printDefaults
();
for
(
int
fi
=
0
;
fi
<
fc
;
fi
++
)
...
...
@@ -82,6 +84,10 @@ int main( int argc, char* argv[] )
{
baseFormatSave
=
true
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-numThreads"
)
)
{
numThreads
=
atoi
(
argv
[
++
i
]);
}
else
if
(
cascadeParams
.
scanAttr
(
argv
[
i
],
argv
[
i
+
1
]
)
)
{
i
++
;
}
else
if
(
stageParams
.
scanAttr
(
argv
[
i
],
argv
[
i
+
1
]
)
)
{
i
++
;
}
else
if
(
!
set
)
...
...
@@ -98,6 +104,7 @@ int main( int argc, char* argv[] )
}
}
setNumThreads
(
numThreads
);
classifier
.
train
(
cascadeDirName
,
vecName
,
bgName
,
...
...
doc/user_guide/ug_traincascade.rst
View file @
7da0e37b
...
...
@@ -200,6 +200,12 @@ Command line arguments of ``opencv_traincascade`` application grouped by purpose
This argument is actual in case of Haar-like features. If it is specified, the cascade will be saved in the old format.
* ``-numThreads <max_number_of_threads>``
Maximum number of threads to use during training. Notice that
the actual number of used threads may be lower, depending on
your machine and compilation options.
#.
Cascade parameters:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment