I am building an image classifier that discriminates against a certain class. As a toy example, let's say the classifier checks if the image is a hotdog or not (1 or 0). My question is what images would I be using to train on the 0 (not hotdog) class? Should I just use random objects or is there a more sensible way to go about this? Thanks


Think about the context in which you want to run your classifier later on. Will you want to extract still-usable food from garbage (so you can, say, turn it into livestock feed)? Then get a lot of garbage, separate it out and train your classifier. Do you want to automatically distinguish hot dogs from hamburgers and cheeseburgers? Then train it against such images.

  • $\begingroup$ Hello, Stephan, What if there are many kinds of object on the negative side? and I can't good model all objects. as I collect more and more negative data, the data set become bigger and bigger, I have to increase the positive data set, but it's very hard to do that. Is there a better approach? $\endgroup$ – Craig.Li Nov 29 '17 at 0:30
  • 1
    $\begingroup$ Of course you can train your classifier against whatever labeled images you have. If you simply don't have a particular class of images (e.g., animals), then your trained classifier simply won't be as good at distinguishing hot dogs against such images later on. I fully appreciate that large amounts of labeled images are often not available or expensive. My answer was intended more to address where one should invest scarce resources in collecting training data in the first place. By all means use all training images you can get. $\endgroup$ – Stephan Kolassa Nov 29 '17 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.