2013-05-22 06:50:59 -0600 | commented answer | cascade classifier training error My input image format was bmp file. And I also used gray level images, it did not work. ================= Error message =============== Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters. |
2013-05-22 06:45:50 -0600 | received badge | ● Scholar (source) |
2013-05-12 20:41:46 -0600 | received badge | ● Editor (source) |
2013-05-12 20:37:31 -0600 | asked a question | cascade classifier training error Hi everyone, I want to use the cascade classifier training of OpenCV 2.4.5.0. I have done step by step as http://docs.opencv.org/doc/user_guide/ug_traincascade.html but have error message as following PARAMETERS: cascadeDirName: Data\cascade\ vecFileName: Pos\pos.vec bgFileName: Neg\neg.txt numPos: 300 numNeg: 900 numStages: 10 precalcValBufSize[Mb] : 256 precalcIdxBufSize[Mb] : 256 stageType: BOOST featureType: HAAR sampleWidth: 20 sampleHeight: 20 boostType: GAB minHitRate: 0.995 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: BASIC ===== TRAINING 0-stage ===== <begin< p=""> POS count : consumed 300 : 300 NEG count : acceptanceRatio 900 : 1 Precalculation time: 23.314 +----+---------+---------+ | N | HR | FA | +----+---------+---------+ OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si ze.p[0] && (unsigned)(i1 * DataType<_Tp>::channels) < (unsigned)(size.p[1] * cha nnels()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3) - 1))*4) & 15) == elemSize1()) in unknown function, file D:\OpenCV\opencv_ src\modules\core\include\opencv2/core/mat.inl.hpp, line 722 I traced this error in source code. The error might be due to wrong pointer assignment boost.cpp line 726 const unsigned short* shortIndices = (const unsigned short*)(buf->data.s + n->buf_idxget_length_subbuf() + visample_count + n->offset ); I do not know how to fix this error. Did I make any mistakes such as wrong input setting? Could anybody help me, please. |