How can I create a neural network that can recognize objects without having data for objects that aren't in the classification set?

by Anthony   Last Updated August 13, 2019 19:19 PM

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.



Answers 3


Yes, but it 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". This is also called "one-vs-all". Your result will be, effectively, a separate set of weights for each of the five classes, five models that will decided 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. There are more sophisticated treatments, but a discussion of those broadens beyond the typical scope of Stack Overflow.

Prune
Prune
August 13, 2019 18:32 PM

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

Silver
Silver
August 13, 2019 18:34 PM

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:

  1. 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.

  2. 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...

guoyili
guoyili
August 13, 2019 18:57 PM

Related Questions


Updated March 13, 2017 04:19 AM

Updated October 15, 2018 04:19 AM

Updated September 18, 2017 21:19 PM

Updated July 06, 2018 11:19 AM

Updated May 21, 2019 19:19 PM