Updated by Alexander Shishkov about 13 years ago
Hello,
I've downloaded opencv-2.2 release from willowgarage.com, compiled
this way: mkdir release && cd release && cmake -D CMAKE_BUILD_TYPE=RELEASE -DWITH_TBB=ON ..
and even got
"-- Use TBB: YES" in the output.
However when I run time /usr/local/bin/opencv_haartraining -data trainout -vec positives.vec -bg negatives.txt -npos 110 -nneg 1000, it uses only one CPU-core. Operating system - ubuntu-10. btw, opencv_haartraining from the default opencv-dev package on ubuntu-10 also uses only one core.
I also tried the version from trunk, no luck - it still uses only one CPU.
However when I compiled opencv-2.0 (with openmp), it uses all 4 cores - however I got a segmentation fault:
time /usr/local/bin/opencv-haartraining -data trainout -vec positives.vec -bg negatives.txt -npos 110 -nneg 1000
Data dir name: trainout
Vec file name: positives.vec
BG file name: negatives.txt, is a vecfile: no
Num pos: 110
Num neg: 1000
Num stages: 14
Num splits: 1 (stump as weak classifier)
Mem: 200 MB
Symmetric: TRUE
Min hit rate: 0.995000
Max false alarm rate: 0.500000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: BASIC
Width: 24
Height: 24
Applied boosting algorithm: GAB
Error (valid only for Discrete and Real AdaBoost): [[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
Stage 0 loaded
Stage 1 loaded
Stage 2 loaded
Stage 3 loaded
Stage 4 loaded
Stage 5 loaded
Stage 6 loaded
Tree Classifier
Stage
+---+---+---+---+---+---+---+
| 0| 1| 2| 3| 4| 5| 6|
+---+---+---+---+---+---+---+
0---1---2---3---4---5---6
Number of features used : 85848
Parent node: 6
*** 1 cluster ***
POS: 46 46 1.000000
NEG: 418 0.0210856
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-0.395958| 1.000000| 1.000000| 0.254310|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-1.186469| 1.000000| 1.000000| 0.174569|
+----+----+-+---------+---------+---------+---------+
| 3|100%|-|-0.865389| 1.000000| 0.868421| 0.351293|
+----+----+-+---------+---------+---------+---------+
| 4| 88%|+|-1.444954| 1.000000| 0.868421| 0.318966|
+----+----+-+---------+---------+---------+---------+
| 5| 77%|-|-0.444954| 1.000000| 0.746411| 0.594828|
+----+----+-+---------+---------+---------+---------+
| 6| 77%|+|-1.101890| 1.000000| 0.751196| 0.278017|
+----+----+-+---------+---------+---------+---------+
Segmentation fault
real 0m9.415s
user 0m27.270s
sys 0m0.068s
It would so great to run haartraining on many CPUs, for example on cx1g.large amazon ec2 with 16 cores.
Thanks.
I've downloaded opencv-2.2 release from willowgarage.com, compiled
this way: mkdir release && cd release && cmake -D CMAKE_BUILD_TYPE=RELEASE -DWITH_TBB=ON ..
and even got
"-- Use TBB: YES" in the output.
However when I run time /usr/local/bin/opencv_haartraining -data trainout -vec positives.vec -bg negatives.txt -npos 110 -nneg 1000, it uses only one CPU-core. Operating system - ubuntu-10. btw, opencv_haartraining from the default opencv-dev package on ubuntu-10 also uses only one core.
I also tried the version from trunk, no luck - it still uses only one CPU.
However when I compiled opencv-2.0 (with openmp), it uses all 4 cores - however I got a segmentation fault:
time /usr/local/bin/opencv-haartraining -data trainout -vec positives.vec -bg negatives.txt -npos 110 -nneg 1000
Data dir name: trainout
Vec file name: positives.vec
BG file name: negatives.txt, is a vecfile: no
Num pos: 110
Num neg: 1000
Num stages: 14
Num splits: 1 (stump as weak classifier)
Mem: 200 MB
Symmetric: TRUE
Min hit rate: 0.995000
Max false alarm rate: 0.500000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: BASIC
Width: 24
Height: 24
Applied boosting algorithm: GAB
Error (valid only for Discrete and Real AdaBoost): [[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
Stage 0 loaded
Stage 1 loaded
Stage 2 loaded
Stage 3 loaded
Stage 4 loaded
Stage 5 loaded
Stage 6 loaded
Tree Classifier
Stage
+---+---+---+---+---+---+---+
| 0| 1| 2| 3| 4| 5| 6|
+---+---+---+---+---+---+---+
0---1---2---3---4---5---6
Number of features used : 85848
Parent node: 6
*** 1 cluster ***
POS: 46 46 1.000000
NEG: 418 0.0210856
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-0.395958| 1.000000| 1.000000| 0.254310|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-1.186469| 1.000000| 1.000000| 0.174569|
+----+----+-+---------+---------+---------+---------+
| 3|100%|-|-0.865389| 1.000000| 0.868421| 0.351293|
+----+----+-+---------+---------+---------+---------+
| 4| 88%|+|-1.444954| 1.000000| 0.868421| 0.318966|
+----+----+-+---------+---------+---------+---------+
| 5| 77%|-|-0.444954| 1.000000| 0.746411| 0.594828|
+----+----+-+---------+---------+---------+---------+
| 6| 77%|+|-1.101890| 1.000000| 0.751196| 0.278017|
+----+----+-+---------+---------+---------+---------+
Segmentation fault
real 0m9.415s
user 0m27.270s
sys 0m0.068s
It would so great to run haartraining on many CPUs, for example on cx1g.large amazon ec2 with 16 cores.
Thanks.