Ask Your Question

xEden's profile - activity

2016-06-03 15:24:52 -0600 received badge  Enthusiast
2016-06-03 01:55:26 -0600 received badge  Self-Learner (source)
2016-06-02 12:59:32 -0600 received badge  Scholar (source)
2016-06-02 12:59:29 -0600 answered a question opencv_traincascade.exe crashes while at NEG current samples

After StevenPuttemans' kind suggestion, it appears that updating and using OpenCV's 3.1.0's tools and libraries (from their website) fixes this issue.

Again, thanks again to StevenPuttemans.

2016-05-30 20:38:26 -0600 commented question opencv_traincascade.exe crashes while at NEG current samples

After looking at your suggestion and digging around some more, it appears that the older versions (<3.0) have this issue, but not 3.0. If you want, you can post that as the answer, or you can leave it to me. Additionally, it appears that some cascade data, when detecting dice while livestreaming, seems to be slower than others. Should I post that as another question after doing some research, or do you have an immediate answer and solution for that? Thanks again.

2016-05-29 15:11:12 -0600 asked a question opencv_traincascade.exe crashes while at NEG current samples

My goal is to train a cascade to recognize a certain face of the dice.

I have 106 non-generated samples converted into a vec file (named dice1.vec) by opencv_createsamples, with the params -w 32 -h32. Additionally, I have a text file negTxt1.txt with around 420 lines referring to other dice faces (32x32 .png files) and around 600 lines referring to other arbitrary, 640x480 sized bg files.

I attempted to run opencv_traincacade.exe with the following params on a Windows computer with at 16GB of ram: tools\opencv_traincascade.exe -data positives/testclassifier -vec positives/1/dice.vec -bg positives/negTxt1.txt -numStages 20 -numPos 100 -numNeg 1000 -precalcValBufSize 2048 -precalcIdxBufSize 2048 -acceptanceRatioBreakValue .0001 -w 32 -h 32 -mode ALL

However, while consuming (for the lack of a better word) negative samples, the program will crash while attempting to consume negative samples, and the last line before crashing is NEG current samples: 427. Then the error window, "opencv_traincascade has stopped working..." appears.

I've looked at suggestions from SO and here (i.e. here, here) but the suggested fix did not seem to be helpful. Attempting to reduce -numPos to 80 does not prevent the crash, and the buffer size parameters are sufficiently large. Attempting to reduce -numNeg to < 427 works for the first stage, but crashes in the next stage, at the same point in training (when it says NEG current samples: ...) at another number.

What steps can I do prevent this crash, and successfully create a classifier?

I apologise for any missing information I may have left out.