Ask Your Question
0

Positive and negative samples for haartraining

asked 2014-05-27 13:28:44 -0600

dcbf gravatar image

updated 2020-12-06 05:40:53 -0600

Where can I find some positive and negative samples of image so I could experiment on haar training?

I tried creating my own set of images (17 positives and 23 negatives). I used glasses for positive and anything but glasses (table, keyboard, cd, baby, ...) for my negatives. Sadly I got several miss detections.

I don't know if my set of images was enough or I didn't have a good set of negative images. I just want a pack and see how it should be.

Thank you in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-05-27 14:45:42 -0600

Witek gravatar image

Don't start with glasses. They are transparent and thus difficult. Start with something simple. Mugs would be better. Or some fruits like apples or bananas. Take more than 17 images, say 50-100, of your objects, each slightly different, each on different background, from different angle, preferably use many bananas or apples. Next take a number of images containing possible backgrounds for your objects WITHOUT these objects. For example 10 images of your kitchen. During training specify much more negatives than you really have images - the training function will randomly cut out these negatives from your images - so your negatives must be relatively big, don't cut them. From 10 high resolution images of your kitchen, the training function will easily generate thousands of negative samples. Experiment a bit. After some training you should be able to get a classifier able to recognize apples or bananas in your kitchen. However, it will not be robust in all possible environments. For good performance in almost any conditions you would need hundreds if not thousands of positive samples and thousands or tens of thousands of negative ones.

edit flag offensive delete link more

Comments

Thank you. What you said helped a lot. I recorded a few minutes video of my object while I moved the camera around it. I also recorded the environment where the object could be found. I got every 5th frame of both videos and used as positive and negative images. I ran the training and the object has been detected without fail.

Thank you again.

dcbf gravatar imagedcbf ( 2014-05-30 09:22:22 -0600 )edit

Question Tools

Stats

Asked: 2014-05-27 13:28:44 -0600

Seen: 2,710 times

Last updated: May 27 '14