opencv_traincascade 3.0 on windows always crashes

asked 2015-02-25 09:36:15 -0500

marcello gravatar image

Hi, I spent so much time and tried different combinations of opencv_traincascade command, but it crashes ALWAYS after some time. I am on win7 (32) First I tried with many samples:

1) create the samples: opencv_createsamples -info "./images/pos.txt" -num 120 -vec "./images/posVec.vec" -maxxangle 0.6 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 50 -h 50

then

2) traincascade opencv_traincascade -data classifier -vec "./images/posVec.vec" -bg "./imagesneg/neg.txt" -numStages 5 -minHitRate 0.9 -maxFalseAlarmRate 0.5 -numPos 80 -numNeg 120 -w 50 -h 50 -mode ALL -precalcValBufSize 128 -precalcIdxBufSize 128 -mode BASIC

After some stages it crashed, no error messages

Then I also tried with create samples from 1: opencv_createsamples -img SmallPin.png -num 100 -bg neg.txt -vec "./onesample/posVec.vec" -maxxangle 0.1 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 255 -bgthresh 0 -w 25 -h 25

opencv_traincascade -data classifier -vec "./onesample/posVec.vec" -bg neg.txt -numStages 5 -minHitRate 0.9 -maxFalseAlarmRate 0.5 -numPos 50 -numNeg 120 -w 25 -h 25 -mode ALL -precalcValBufSize 128 -precalcIdxBufSize 128 -mode BASIC

Same issue-> crash

Any help ? -Does the directory strucure matter ? -When create samples from 1: What is bgcolor mean ? I ahve a png file where transparent color is 255/255/255 (RGB). Is it correct to use -bgcolor 255 in this case ?

edit retag flag offensive close merge delete