opencv_traincascade.exe crashes without an errormessage

asked 2016-03-03 09:04:53 -0500

DD gravatar image

Hi, I'm trying to create my own Haar-cascade file but when executing the command, I only get to see the following in the console window:

PARAMETERS: cascadeDirName: C:\Users\narato\Desktop\OpenCv\BirdHaar vecFileName: C:\Users\narato\Desktop\OpenCv\birds24x24.vec bgFileName: C:\Users\narato\Desktop\OpenCv\negative.txt numPos: 4900 numNeg: 2800 numStages: 25 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 acceptanceRatioBreakValue : -1 stageType: BOOST featureType: HAAR sampleWidth: 24 sampleHeight: 24 boostType: GAB minHitRate: 0.9 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100

I have made a .vec file with 5980 positive images (size 24x24). I have a folder with 3270 negative images in it. They are different sizes, the smallest being 80x80 and the biggest 292x80 , is this ok? All of these negative images are referenced in the negative.txt file.

This is the command I try to run: opencv_traincascade.exe -data C:\Users\narato\Desktop\OpenCv\BirdHaar -vec C:\Users\narato\Desktop\OpenCv\birds24x24.vec -bg C:\Users\narato\Desktop\OpenCv\negative.txt -mem 500 -numPos 4900 -numNeg 2800 -numStages 25 -w 24 -h 24 -minHitRate 0.9 -maxFalseAlarmRate 0.5 -mode All

As said, this crashes right after the parameters are shown in the console window and I can't seem to find what's causing it. Any help is greatly appreciated!

edit retag flag offensive close merge delete

Comments

  • "I have a folder with 3270 negative images in it. They are different sizes," -- yes, that's ok.
  • "numPos: 4900 numNeg 2800" -- that's a lot of images. i guess, the whole thing runs out of memory
  • "precalcIdxBufSize[Mb] : 1024" -- try to increase it
berak gravatar imageberak ( 2016-03-03 10:04:12 -0500 )edit

Hi, I've been playing around with the parameters a bit, but increasing precalcIdxBufSize results in the same crash. specifying only 10 images or so for numpos and numneg does not make a difference either. Can I find some errorlog somewhere?

DD gravatar imageDD ( 2016-03-04 01:56:44 -0500 )edit