Simple question about prediction classes of item in question vs not item in question

Let's say I wanted to use transfer learning to train a model to detect object A vs everything else. In this case, do I provide 2 types of input, images of object A and images of everything else, and then have the final layer of the model output either object A or not-object A?

What about in the case where I want object A vs object B vs everything else. Would it make sense in this case to provide images of A and B and then have only two output classes, but based on the confidence of the output, interpret it as 3 classes? Say that it's object A if the confidence in that is > 50%, object B if the confidence in that is > 50%, and anything else if neither of those two conditions are met?

Topic transfer-learning machine-learning

Category Data Science


That task is called one-class classification. Basically, the idea is to classify if the object belongs to the known class or if it's an outlier. The most straightforward way is to use SVM to split the identified class enclosing it to be separated from everything else. Here's a simple article detailing about one-class classification.

An Introduction to One-class Classification


It depends if the percentages are required to sum to 100%. Typically when training on only 2 classes, the model will make predicts that sum to 100% for 2 classes. There will be no chance for out-of-class predictions.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.