1

I have decided to train Haar classifier for 102 flower categories given here:(The dataset)
http://www.robots.ox.ac.uk/~vgg/data/flowers/102/categories.html

In the link you can see several categories. I am posting a few images of an individual flower to explain the question.

enter image description here enter image description here enter image description here This flower belongs to a single class. I have 250 images as positives. There is a considerable variation in this flower's others images(of color, brightness, orientation, etc.). I am hunting for negative images right now. As you might have guessed, I didn't click these pictures so I can't go to the places where these were clicked to collect negative dataset. Instead, I have decided to extract frames from a video. Here is the link:
https://www.youtube.com/watch?v=x3zT1mJE0W0

Here are the images from the video:
enter image description here enter image description here It is a video of general garden with bushes and plants background.

My question is: Will this video(and other similar videos) suffice for being negative samples for successful detection? Is it safe to train the classifier for these flowers at all?(I mean with lot of variation in the background. I also plan to use the rest flowers category images as negatives that I am not detecting except the flower that I am trying to detect which in the case here is the Passion Flower).
This is my first training and I am asking this because the training is gonna eat my whole day and night. I am skeptical about it beforehand.

Manish Kumar Sharma
  • 12,982
  • 9
  • 58
  • 105
  • I suggest migrating this to robotics.stackexchange.com – Mike Ounsworth Apr 21 '15 at 14:00
  • @MikeOunsworth : I don't know....I posted it here because I have seen a lot of other OpenCV questions on StackOverflow and they have been answered with no problem. – Manish Kumar Sharma Apr 21 '15 at 14:02
  • I agree with you, there are lots of OpenCV questions on SO, doesn't mean they're in the right place. SO is about programming and your question doesn't have any code in it.... (I'm also aware that you'll get an answer faster on SO than on Robotics :P ) – Mike Ounsworth Apr 21 '15 at 14:06
  • 1
    @MikeOunsworth : Yeah...you got me. That is why I posted it here(I wasn't actually aware of the right place either!). This is gonna be helpful to a lot of other people in future I believe because its sort of less popular unlike Java and C++. – Manish Kumar Sharma Apr 21 '15 at 14:09

1 Answers1

1

The trick with negative images is to use whatever you have, and as many as possible. The more difference, and quantity, of your negative images means that you will end up with a more robust classifier.

As for your specific question about whether the bushes are a good negative data set compared to the flowers I would say they will be ok. The background behind the bushes is relatively similar and you have quite a distinct flower pattern for your positive samples.

GPPK
  • 6,546
  • 4
  • 32
  • 57
  • Well... Thank You for the reply. This is what I was skeptical about but not anymore. I am gonna give it a shot no matter what. One more thing- I want to confirm before doing is I am gonna use all the other flowers except this particular one for negativs. Will that be okay and do you recommend it? – Manish Kumar Sharma Apr 21 '15 at 14:00
  • 1
    don't use anything for negative that could be construed as a positive feature. otherwise go for it. – GPPK Apr 21 '15 at 14:03
  • And should I keep the resolution of negatives same as positives? Pardon so many questions, its my first time using OpenCV – Manish Kumar Sharma Apr 21 '15 at 14:05