Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

opencv_traincascade.exe and background file

I create 10 samples and 10 negative samples. In positive/ directory is 10 .jpg files from 01.jpg to 10.jpg and file pos.dat:

01.jpg 1 0 0 54 67

10.jpg 1 0 0 48 59

Similar in directory negative is 10 files and neg.dat :

01.jpg 1 0 0 54 67

10.jpg 1 0 0 48 59

I can create vec by:

d:\opencv\build\x86\vc10\bin\opencv_createsamples -num 10 -info positive\pos.dat -vec pos.vec -w 40 -h 40

and vec for negative:

d:\opencv\build\x86\vc10\bin\opencv_createsamples -num 10 -info negative\neg.dat -vec neg.vec -w 40 -h 40

But is error if I try opencv_traincascade.exe

d:\opencv\build\x86\vc10\bin\opencv_traincascade.exe -data dir -vec pos.vec -bg negative\neg.dat -numPos 10 -numNeg 10 -w 40 -h 40

or

d:\opencv\build\x86\vc10\bin\opencv_traincascade.exe -data dir -vec pos.vec -bg neg.vec -numPos 10 -numNeg 10 -w 40 -h 40

I error:

Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.

Is error for -bg negative\neg.dat and neg.vec, can be other?

opencv_traincascade.exe and background file

I create 10 samples and 10 negative samples. In positive/ directory is 10 .jpg files from 01.jpg to 10.jpg and file pos.dat:

01.jpg 1 0 0 54 67

10.jpg 1 0 0 48 59

Similar in directory negative is 10 files and neg.dat :

01.jpg 1 0 0 54 67

10.jpg 1 0 0 48 59

I can create vec by:

d:\opencv\build\x86\vc10\bin\opencv_createsamples -num 10 -info positive\pos.dat -vec pos.vec -w 40 -h 40

and vec for negative:

d:\opencv\build\x86\vc10\bin\opencv_createsamples -num 10 -info negative\neg.dat -vec neg.vec -w 40 -h 40

But is error if I try opencv_traincascade.exe

d:\opencv\build\x86\vc10\bin\opencv_traincascade.exe -data dir -vec pos.vec -bg negative\neg.dat -numPos 10 -numNeg 10 -w 40 -h 40

or

d:\opencv\build\x86\vc10\bin\opencv_traincascade.exe -data dir -vec pos.vec -bg neg.vec -numPos 10 -numNeg 10 -w 40 -h 40

I Is error:

Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.

Is error for -bg negative\neg.dat and neg.vec, can be other?