Ask Your Question

Revision history [back]

Hello Martijn,

Basically the line of code triggering your error is this one. It means that after training each stage of weak classifiers your training algorithm has to update his training set with new data for the following stage.

As you can see in that function you have two parts in that, grabbing positive windows and grabbing negative windows. Since you have the POS count : consumed 2980 : 2981 printed, I am sure the positive window grabbing worked. However this line of code breaks the grabbing once no new negative windows have been found. So that is actually your problem.

So please provide the following information

  1. How did you collect your negative images, what is their size, how many do you have?
  2. -numNeg 3311 how did you define that number?
  3. Could you check what output was generated at stage 0 1 and 2 for pos and neg window grabbing?

Also, I must urge you NOT to use the createsamples utility to perform those rotation, translation and skewing deformations. Instead collect a large set of actual training samples, instead of creating these artificial ones. Your approach will yield not such a good results in real life applications.