Ask Your Question

Opencv3.1-Train dataset for temp stage can not be filled. Branch training terminated. Is this error if not how can i improve it further ?

asked 2017-01-24 11:16:04 -0500

I used following command to train the cascade-

opencv_traincascade -data /home/ishan/ishan/opencv-haar/classifier -vec /home/ishan/ishan/opencv- haar/merged_vec/samples.vec -bg /home/ishan/ishan/opencv-haar/negatives.txt\ -numStages 10 -minHitRate 0.99 -maxFalseAlarmRate 0.5 -numPos 1350\ -numNeg 623 -w 20 -h 20 -mode ALL -precalcValBufSize 512\ -precalcIdxBufSize 512

After Stage7 it says: Train dataset for temp stage can not be filled. Branch training terminated.

I want to ask is it an error ? If yes how to rectify it and if not then how can i further train the model ?

edit retag flag offensive close merge delete


@OptimUs welcome on board! For your next question, please use short title and post your question in the text area. A small tour on FAQ also is useful. ... as many users today ...

pklab gravatar imagepklab ( 2017-01-25 05:39:36 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-25 03:56:08 -0500

Is it an error?

No it is not, it is a warning. Basically given your data and your settings, you have reached the desired efficiency with the model finished after stage 7. In other to combine the training results, now rerun your training with parameter -numStages set to 8, since we start counting at 0. Then your cascade folder will have a cascade.xml file.

Why is this happening?

It cannot find enough training data for a next stage. Try increasing the number of samples that you have!

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-01-24 11:16:04 -0500

Seen: 191 times

Last updated: Jan 25 '17