c++ - Troubles on training Haar cascade with LBP -


i'm trying train branch logos haar_cascade. i've done is, i've taken 2500 squared pictures of 500 x 500 populate samples opencv_createsamples. generate them as:

opencv_createsamples -info 'logo.info' -vec '../logo.vec' -bg '../negatives/bg.txt' -w 24 -h 24 -num 2500

in logo.info i've got lines correspond relative path of every picture, 1 0 0 500 500 meaning "there's 1 object between (0,0) , (500, 500)"

then train cascade as:

opencv_traincascade -data 'cascade/' -vec '../logo.vec' -bg '../negatives/bg.txt' -numpos 2500 -numneg 3019 -numstages 25 -featuretype lbp -w 24 -h 24

with these parameters:

parameters:

cascadedirname: cascade/

vecfilename: ../logo.vec

bgfilename: ../negatives/bg.txt

numpos: 2500

numneg: 3019

numstages: 25

precalcvalbufsize[mb] : 256

precalcidxbufsize[mb] : 256

stagetype: boost

featuretype: lbp

samplewidth: 24

sampleheight: 24

boosttype: gab

minhitrate: 0.995

maxfalsealarmrate: 0.5

weighttrimrate: 0.95

maxdepth: 1

maxweakcount: 100

and i've got 2 kind of errors:

  1. opencv error: 1 of arguments' values out of range (no components/input_variables selected!) in cvpreprocessindexarray, file /tmp/buildd/opencv-2.3.1/modules/ml/src/inner_functions.cpp, line 432 terminate called after throwing instance of 'cv::exception' what(): /tmp/buildd/opencv-2.3.1/modules/ml/src/inner_functions.cpp:432: error: (-211) no components/input_variables selected! in function cvpreprocessindexarray

enter image description here

...

enter image description here

this errors uses happen when don't give significant difference between num of images , -num parameter. so, let's try give less 100!!

well, when i've adjusted parameters not go out array, same type of output images, error:

opencv error: assertion failed (tempnode->left) in write, file /tmp/buildd/opencv-2.3.1/modules/traincascade/boost.cpp, line 628 terminate called after throwing instance of 'cv::exception' what(): /tmp/buildd/opencv-2.3.1/modules/traincascade/boost.cpp:628: error: (-215) tempnode->left in function write

aborted

i've tried:

  • changing destiny size of images (24x24, 36x36...)
  • changing -mode parameter.
  • trying put #positivesamples < #negativesamples , #positivesamples > #negativesamples

what have do, training obligatory lbp (not haar). have clue?

thank in advance.

uninstalling , rebuilding opencv solved problem.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -