0

I'm running OpenCV2.4.7 on Windows8.

I'm using opencv_traincascade to train a new cascade for faces. I ran the following command:

opencv_haartraining.exe -data -haarcascadeold -vec vector.20.vec -bg infofile2.txt -nstages 40 -minhitrate 0.9999999 -maxfalsealarm 0.5 -npos 9000 -nneg 26946 -w 20 -h 20 -mem 1024

However, it seems to get stuck: enter image description here

I also tried it with -minhiterate 0.8 and maxfalsealarm 0.7 and it also gets stuck.

It's getting the same values again and again. I already stopped it and restarted it and it append again. The first time, it ran for 180 iterations producing the exact same values.

I have about 13,000 positives, but I set the npos to be 9000 so I won't run out of positive examples.

Can someone please explain the cause of this problem and how to fix it?

Thanks,

Gil

GilLevi
  • 2,117
  • 5
  • 22
  • 38

1 Answers1

-1

Please try using minhitrate 0.8 & maxfalsealarm 0.7, check if anything changes. You can then tune your parameters.

Also go with opencv_traincascade, which is the newest classifier, instead of deprecated opencv_haartraining.

baci
  • 2,528
  • 15
  • 28
  • Hi, Thanks for the answer, but it still behaves the same even after changing the parameters. – GilLevi Jan 20 '14 at 23:39
  • well, if you refer to this [tutorial](http://note.sonots.com/SciSoftware/haartraining.html) you can see the process actually takes a week. This is the nature of adaptive boosting. Try changing width and height to lower values. Try lower hitrate & higher falsealarm. If you see the convergence starts, then you are on the right track. – baci Jan 21 '14 at 10:32
  • But it doesn't even start to converge. I ran it for two full days and the outputs remain the same. It hasn't made any progress as I'm getting the same output values again and again. – GilLevi Jan 21 '14 at 10:38
  • Please check the possible duplicates http://stackoverflow.com/questions/16053378/opencv-haartraining-does-not-finish-forever?rq=1 http://stackoverflow.com/questions/14552167/opencv-traincascade-always-gets-stuck?rq=1 – baci Jan 23 '14 at 12:12