Ask Your Question

kukuruza's profile - activity

2015-09-02 21:39:29 -0600 received badge  Teacher (source)
2014-10-28 06:00:52 -0600 received badge  Necromancer (source)
2014-10-26 23:20:16 -0600 received badge  Editor (source)
2014-10-26 23:19:49 -0600 answered a question opencv_traincascade error : _img.rows * _img.cols == vecSize

I hope andonios figured it out (after inserting the missing space before "-h"). I had the same issue, and my problem was with backup files of opencv_traincascade and with varying sample size.

opencv_traincascade saves additional .xml files "for the case of interrupted training". First, I created a .vec file using one pair of values for sample size and trained the model. Then I decided to use a different sample size. If I didn't remove the opencv .xml backup files, opencv_traincascade would throw the error described in the question. I guess, because it decides to load those files if they exist.

If this your case, simply deleting all opencv .xml files before another training should help.