Why does opencv_traincascade fail: "The train dataset for the time step cannot be filled"?

What I have tried so far ...

opencv_createsamples -info positive/positive.txt -vec positive.vec -w 100 -h 100 -num 2
opencv_createsamples -info negative/negative.txt -vec negative.vec -w 100 -h 100 -num 2
opencv_traincascade -vec positive.vec -data . -bg negative/negative.txt -numPos 1 -numNeg 1 -numStages 1 -w 100 -h 100

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

How to train the HAAR model with very few positive results? The goal is to track 2d images in 2d images.

+4
source share
2 answers

One of your arguments is "numpos", but for http://docs.opencv.org/2.4/doc/user_guide/ug_traincascade.html it should be "numPos" with capital P.

+1
source

Source: https://habr.com/ru/post/1653817/


All Articles