1
$\begingroup$

Let's say I need to build a food classifier, and I want a rejection class for the inputs that are not food.

What is the best way to do that? Should I just add a new class label that includes pictures of anything but food? Is there a best way to chose which pictures I should use?

$\endgroup$
1
$\begingroup$

What is the best way to do that? Should I just add a new class label that includes pictures of anything but food?

Adding a new class which can be called none is a thing that is usual for such tasks.

Is there a best way to chose which pictures I should use?

Yes, you should pick the images of the none type from the real distribution that your classifier is going to face while test time. It means all the classes should have a same distribution while training and testing. It should be satisfied even for the none class. For instance, suppose that your none type class can be a human hand or a table or something like that. You should not put an elephant image for none type because you are not going to have an elephant in your kitchen.

$\endgroup$

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.