6

I have read a fair amount about Haar training and I'm not clear on how many images one should use for the positive and negative sample sets. I see it recommended to use many images, some people recommend thousands. I'm also unclear of whether the number of positive and negative sample images should be the same?

Rhubarb
  • 3,893
  • 6
  • 41
  • 55

1 Answers1

4

Here is the best tutorial on Haar training. Have you tried this? http://note.sonots.com/SciSoftware/haartraining.html

It says they used 5000 for positive and 3000 for negative.

This link says 3000 for positive and 5000 for negative. Anyway, higher number of images improves the accuracy, but it also increases training time.

Also check other SO links here.

Community
  • 1
  • 1
Abid Rahman K
  • 51,886
  • 31
  • 146
  • 157
  • 3
    Thanks for the links. The 2nd one I hadn't seen. One thing that puzzles is the concept of negative samples. Wouldn't it make sense that negative samples contain portions of the image where the positive samples are coming from, but without the positive samples? Most tutorials mention using negative samples containing random images that are unrelated to the positive samples. It would seem to me that if you're taking positive samples of fruit from a fruit market photo, you'd want the negative samples to be of other fruit that are typically found in the same photo of a fruit market? – Rhubarb Jan 20 '12 at 10:36
  • well,question make sense, but i am afraid i don't know its answer. Generally it is taken like those given in the links in answer. – Abid Rahman K Jan 21 '12 at 08:31
  • 1
    You are correct, @Rhubarb. Just as positive samples should be as representative of what you are trying to learn as possible, negative samples should be as representative of what you are *not* trying to learn as possible. In your example, clearly the ideal is as you say; however, if the algorithm's discrimination is not very sharp it is possible that negative examples that are too similar to your positive examples (similar fruit) may actually not help. Taking this further, in the vein of curriculum learning, one could introduce more difficult to discern examples as training progresses. – Ninjakannon Jan 29 '14 at 11:16
  • Please what is the relation between the number of positive and negative training ? – Christina Feb 15 '14 at 17:20