Haar Training got stuck [closed]
Hey guys, I use 1000 positive images and 4000 negative images with 20 stage. It got stuck at stage 6. Can anyone help me pls...
PARAMETERS: cascadeDirName: classifier/ vecFileName: samples1.vec bgFileName: ./non-face/negative.txt numPos: 1000 numNeg: 4000 numStages: 20 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 stageType: BOOST featureType: HAAR sampleWidth: 19 sampleHeight: 19 boostType: GAB minHitRate: 0.995 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: BASIC
Stop using
opencv_haartraining
and move on to the tool that is still being supported, namelyopencv_traincascade
.Please add more information
I added all the parameters please go through it and tell me what should i change...
@steven I am already using opencv_traincascade..
There is nothing bad with your parameters (you could increase maxDepth, but this shouldn't be the reason you are stuck). What do you mean: "I got stuck at stage 6"? Do you get some error message? Or the training is completed at stage 6? How do you get all your positive samples? Are they artificial (i.e. obtained from just very few of them) or really 1000 different samples? Please show what is the output on the screen.
@Vishu, than please indicate that in your title. People tend to ignore topics with
haartraining
as a keyphrase in it. Using HAAR wavelets it kind of depends what you consider getting stuck? Is the negative counter still rising, but with like 1-2 samples a minute? Then it is actually not stuck :) Keep in mind that complex HAAR models can train over days up to multiple weeks.Also, no idea what object you are detecting, but to me
sampleWidth: 19 sampleHeight: 19
seems rather small. For face detection for example they proved that going smaller than 24x24 pixels just discards to much information on the face class. This could also be your problem, your adaBoost not finding features that are discriminate enough to differ between positive and negative samples due to the small model size.@Gino @steven : samples (images of FACE) are from MIT database. and At stage 6 it will go to infinity loop.i waited for 10hours and then i stopped.
How many negative images have you got? If the algorithm is not able to collect 4000 negative windows from them it will run forever.
That could indeed be the case, but normally it should throw an error that there are unsufficient negative windows? Or doesnt it do that like it does with the positive window samples?