How can I create a neural network that can recognize objects without having data for objects that aren't in the classification set? I have a data set of 10,000 images of 5 different recycling items. The goal of my neural network is to tell me if an item is recyclable or not. The problem is that I only have data for the 5 different classifications (soda can, crushed soda can, water bottle, glass bottle, cardboard boxes). If you feed the trained network something that is not one of these 5 items (something like a plastic bag) it will still try to label it as one of these 5. Is there a way to logically separate out the garbage items without having data of the garbage. I don't have time to collect more data of garbage items and add a 6th classification to the neural network.
 A: Yes, but the most focused treatment takes a different approach.  You need to choose a model type that will train each class on an "is or is-not" basis. This is also called "one-vs-all". Your result will be, effectively, a separate set of weights for each of the five classes, i.e. five models that will decide whether or not the observation (one datum) is a member of that class. If none of the five sub-models claims the item, it winds up in the "garbage" class.
SVM (support vector machine) is good for this, given compatible input.  Although, there are more sophisticated treatments as well.
A: Yes, and this is called: one-class classification when you train a model only on the positive data and try to predict the outliers.
check this it might help: https://medium.com/squad-engineering/one-class-classification-for-images-with-deep-features-69182fb4c9c5
A: I think you need to look at this problem in a different aspect. Based on your case, instead of training your model to recognize 'if this item is recyclable', you can approach this problem as 'if this item is not recyclable'. The reason is you only have 5 recyclable items, which is much less that those of in reality. So, by the way, you can look at this problem as an unsupervised learning way or a semi-supervised learning way, with the assumption that you have access to the items that are NOT recyclable. In detail, the suggested approaches are of two:


*

*unsupervised learning: design your problem as an outlier detection problem. Build the training information with most of non-recyclable item with very few recyclable item. Follow the approaches such as k-means clustering, Gaussian mixture model, etc.

*semi-supervised learning: in this one, you are doing a regression on only the non-recyclable item. If you provide a item that is recyclable to your trained model, your model will predicted a value with large deviation comparing with you predefined value. Please refer to one-class SVM or one-class neural network. In your subject, for image based detection, probably constitutional neural network will be better...
A: I would suggest you to get more data and build a binary classifier.


*

*First combine all of your data into 1 class (recyclable)

*Then craw internet and find items not recyclable. We should found items that people usually throw in the trash. But not trying to get irrelevant images such as cats and dogs.

