c++ - OPENCV training cascade "out of range" -
i'm trying train own detector using opencv 3.0 traincascade. have 82 positive , 188 negative sample , following
opencv_traincascade -data data -vec signals.vec -bg negative.txt -numpos 82 -numneg 188 -numstages 20 -w 50 -h 50 -featuretype lbp
i'm able reach stage 8. @ stage 9 have following error
===== training 9-stage ===== <begin pos count : consumed 82 : 82 neg cterminate called after throwing instance of 'std::out_of_range' what(): basic_string::substr aborted (core dumped)149
someone knows why? thank in advance.
the short answer - don't have enough negative samples selected maxfalsealarm
, numstages
parameters. have 3 options (starting best):
- provide more negative samples (imho it's best option - it's not hard , give best results)
- decrease value of
maxfalsealarm
parameter (you can find here) - decrease number of stages
if remember correct (better check it..) should have @ least (1-maxfalsealarm)^(numstages-1)
(where '^' power, not xor) negative samples complete training.
Comments
Post a Comment