Silly question about opencv_traincascade.exe

asked 2014-03-19 03:08:22 -0600

diploma gravatar image

Given:

  • 1 positive sample in out.vec file

  • 5 negative samples - 5 jpg files in 'negative' directory

I tried start opencv_traincascade.exe with parameters below:

E:\OpenCV\opencv\build\x64\vc12\bin\opencv_traincascade.exe -data "E:\Dropbox\Diplom\haartraining-result" -vec "E:\Dropbox\Diplom\out.vec" -bg "E:\Dropbox\Diplom\negative\bg.txt" -numPos 1 -numNeg 5 -numStages 1 -featureType HAAR -w 64 -h 64 -precalcValBufSize 4092 -precalcIdxBufSize 4092

and get an error 'Cascade classifier can't be trained. Check the used training parameters.'

Which parameter incorrect, what i doing wrong?

Thanks!

edit retag flag offensive close merge delete

Comments

2

Read this document first, http://docs.opencv.org/doc/user_guide/ug_traincascade.html Add more samples, both positive and negative, numPos must be lower than number of positive samples in .vec file. It makes no sense to have only one stage.

mada gravatar imagemada ( 2014-03-19 04:48:46 -0600 )edit
2

There are no silly questions.

GilLevi gravatar imageGilLevi ( 2014-03-19 07:28:01 -0600 )edit

Thanks for replies. I'm created a cascade by picking values, but not quite understand how it works :)

diploma gravatar imagediploma ( 2014-03-19 13:52:23 -0600 )edit