Ask Your Question
0

opencv_traincascade insufficient count of sample in vec file

asked 2017-12-06 18:44:36 -0600

Derick gravatar image

updated 2017-12-06 18:57:18 -0600

I have 20 positive images and 750 negative images. I generate the positive sample, it gave me a info.lst(37800 line records) and newly generate image in the info folder. It has around 37800 images. After that I start generate the vector file. With this required info ready, I start train the classifier using script below

opencv_traincascade -data data -vec positives.vec -bg bg.txt -numPos 37000 -numNeg 700 -numStages 40 -w 20 -h 20.

It gave me an error when in the stage 5. It complaint insufficient count of sample? Why it complaint insufficient sample since I have 37000 newly generate positive sample. Please help

edit retag flag offensive close merge delete

Comments

1

" I generate the positive sample," -- this is usually pointless.

berak gravatar imageberak ( 2017-12-07 02:48:31 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-12-08 04:23:14 -0600

Because in boosting, you want to find new samples that do not get correctly classified by your previous weak stages. This means that all your artificially generated samples are already perfectly seperated by your 5 stage classifier and thus it needs new data if you want to continue training.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-06 18:44:36 -0600

Seen: 184 times

Last updated: Dec 08 '17