Eddy Ma
Eddy Ma

Reputation: 108

Image recognition classification in convolution neural network

I am using convolution neural network to train my model with two classes Horse and Lion, i want the model evaluation return "none of the above" if i use a image of a Dog, any idea how should i train my model to accomplish that?

Upvotes: 0

Views: 165

Answers (1)

Dwight Crow
Dwight Crow

Reputation: 368

There's two ways you could likely structure this:

  1. Create a third label "Other", and continue having your convolutional net use softmax normalization to output probabilities such that p(Horse), p(Lion), and and p(Other) add to 1.0. Then simply add any number of pictures that don't have Horse or Lion in them and label them with Other

  2. Rearchitect your system as detection rather than classification - ie it looks at any given picture and "detects" whether there is a Horse or a Lion in it with the possibility that there are neither, one, or both present. In this system, you won't use the softmax constraint that the p(Horse) + p(Lion) = 1.0, you'll simply train each class detection independently. Then include training data with neither Horses or Lions and make sure they are labeled as Horse=0 and Lion=0.

Hope that helps!

Upvotes: 1

Related Questions