Haar Training hang after few stages.
I am doing haar training for object detection, first 10 stages goes very fast after 10th stages. it will hangs more than 9 days.i am using i7-12gb-ram.still slow. Pos samples 494 and negative samples 2500.
MY steps for haar training :-
1. Create training samples from one { createsamples -img face.png -num 10 -bg negatives.dat -vec samples.vec -maxxangle 0.6 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 20 -h 20}
2*Create training samples from some* {opencv_createsamples -info samples.dat -vec samples.vec -w 20 -h 20]
3. Create test samples {opencv_createsamples -img face.png -num 10 -bg negatives.dat -info test.dat -maxxangle 0.6 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0}
4. Show images {opencv_createsamples -vec samples.vec -w 20 -h 20}
5 haar training {Opencv_haartraining -data haarcascade -vec samples.vec -bg negatives.dat -nstages 20 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -npos 7000 -nneg 3019 -w 20 -h 20 -nonsym -mem 512 -mode ALL}
Tree Classifier Stage +---+---+---+---+---+---+---+---+---+---+---+ | 0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| +---+---+---+---+---+---+---+---+---+-- 0---1---2---3---4---5---6---7---8---9--10 Parent node: 10
* 1 cluster * POS: 90 90 1.000000
And other one like this aftr 16th stage
137531| 77%|-| 0.999988| 1.000000| 1.000000| 0.707736| +----+----+-+---------+---------+---------+---------+ |137532| 70%|-|-0.000012| 1.000000| 1.000000| 0.712034| +----+----+-+---------+---------+---------+---------+ |137533| 77%|-| 0.999988| 1.000000| 1.000000| 0.707736| +----+----+-+---------+---------+---------+---------+ |137534| 70%|-|-0.000012| 1.000000| 1.000000| 0.712034| +----+----+-+---------+---------+---------+---------+ |137535| 77%|-| 0.999988| 1.000000| 1.000000| 0.707736| +----+----+-+---------+---------+---------+---------+ |137536| 70%|-|-0.000012| 1.000000| 1.000000| 0.712034| +----+----+-+---------+---------+---------+---------+ |137537| 77%|-| 0.999988| 1.000000| 1.000000| 0.707736| +----+----+-+---------+---------+---------+---------+
Kindly help what will i do
I suggest you to use
opencv_trainingcascade
instead ofopencv_haartraining
. With TBB enabled, the training will run faster with the multithreading enabled.tell me some other thing help.....and methods is right or wrong
It is wrong to state that LBP will go much faster in training due to multithreading. It is only due to the fact it are integer operations in stead of floating point operations. There is only a very small amount of processing done multithreaded due too how the cascade boosting algorithm actually works.