issue trainHog sample

asked 2018-05-29 14:48:50 -0600

alexandratuu@gmail.com gravatar image

updated 2018-05-29 18:51:34 -0600

I'm trying to train inria dataset with this sample but i don't know what is the problem cause when it gets to this i receive the assert? What i'm doing wrong?

 clog << "Histogram of Gradients are being calculated for negative images...";
        computeHOGs(pos_image_size, neg_lst, gradient_lst, flip_samples);
        size_t negative_count = gradient_lst.size() - positive_count;
        labels.insert(labels.end(), negative_count, -1);
        CV_Assert(positive_count < labels.size()); ?
edit retag flag offensive close merge delete

Comments

1

check your cmd line params. probably positive images or negative images folder does not contain images or OpenCV can't read images. recently i can't check but i used before params like -d -dw=64 -dh=128 -pd=/INRIAPerson/96X160H96/Train/pos -nd=/INRIAPerson/neg -tv=../data/vtest.aviNOTE : if your OpenCV version has latest libpng you will have a problem reading png files of INRIA see https://github.com/opencv/opencv/pull...

sturkmen gravatar imagesturkmen ( 2018-05-29 18:32:39 -0600 )edit