Thing classifier - how to recognize unseen classes

I will have project at work regarding classifying some real life products.
How can I create a model that will run inference on 1 obtained image of a product and second one for comparison that will be able to tell whenever they are the same thing?

For example: model was trained on various items form iMaterialist and knows what a pen and what a shoe is, but I want to give it like specific shoe image and other reference image and the model should tell whenever that is the same thing.

Only thing that comes to mind is generating labels from input image and comparing them with second image labels, but that seems to me more like a crutch.

If I didn’t explain the problem clear enough please tell.

You can extract features from the model (i.e. the output of the layer before the classification layer) and then use k-nearest neighbors to compare it to the features of the other product.

1 Like