Answers.Body: <p>Welcome to AI.SE @Stromgren!</p>
  
  <p>A likely explanation is that the animals in the "nothing" group do not have much in common with each other.</p>
  
  <p>This means it will be difficult for the network to learn which features from the images are associated with that label (in fact, there aren't any!). As a result, the network is probably assigning very low confidence to any estimate for the nothing label. You should be able to check if this is the case (i.e. examine whether it is <em>ever</em> confident about the label "nothing").</p>
  
  <p>I am not completely sure how the Inception network encodes its labels. A common scheme though is to use one output neuron for each class. The correct label for an image is thus always a "1-hot" vector, where one of the elements is set to 1, and the others all to zero.</p>
  
  <p>If that representation is being used, you can incorporate the "nothing" data by labelling it with a vector that is all zero: none of the output neurons should activate for it. That would produce precisely the training signal you want. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-26T21:08:44.987Z
Answers.LastActivityDate: 2018-08-28T01:47:10.400Z
Answers.LastEditDate: 2018-08-28T01:47:10.400Z
Answers.UserDisplayName: John Doucette
Body: <p>I’m training a network to do image classification on zoo animals. </p>
  
  <p>I’m a software engineer and not an ML expert, so I’ve been retraining Google’s Inception model and the latest models is trained using Google AutoML Vision.</p>
  
  <p>The network performs really well, but I have trouble with images of animals that I don’t want any labels for. Basically I would like images of those animals to be classified as unknowns or achieve low scores. </p>
  
  <p>I do have images of the animals that I don’t want labels for and I tried putting them all into one “nothing” label together with images I’ve collected of the animals habitats without any animals. This doesn’t really yield any good results though. The network performs for the labeled animals but ends up assigning one of those labels to the other animals as well. Usually with a really high score as well. </p>
  
  <p>I have 14 labels and 10.000 images. I should also mention that the “nothing” label ends up having a lot of images compared to the actual labels. Those images are not included in the 10.000.  </p>
  
  <p>Is there any tricks to achieve better results with this? Should I create multiple labels for the images in the “nothing” category maybe?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-26T04:51:15.070Z
Comments.Text: Just going off of what you said have you tried using fewer nothing images as "nothing", like 750 or so?
Comments.UserDisplayName: kpie
Tags: <neural-networks><convolutional-neural-networks><image-recognition>
Title: Optimizing image recognition results for unknown labels
UserDisplayName: Stromgren
ThreadText: # Optimizing image recognition results for unknown labels
  
  (Asked by: username_0 on 2018-08-25)
  
  I’m training a network to do image classification on zoo animals.
  
  I’m a software engineer and not an ML expert, so I’ve been retraining Google’s Inception model and the latest models is trained using Google AutoML Vision.
  
  The network performs really well, but I have trouble with images of animals that I don’t want any labels for. Basically I would like images of those animals to be classified as unknowns or achieve low scores.
  
  I do have images of the animals that I don’t want labels for and I tried putting them all into one “nothing” label together with images I’ve collected of the animals habitats without any animals. This doesn’t really yield any good results though. The network performs for the labeled animals but ends up assigning one of those labels to the other animals as well. Usually with a really high score as well.
  
  I have 14 labels and 10.000 images. I should also mention that the “nothing” label ends up having a lot of images compared to the actual labels. Those images are not included in the 10.000.
  
  Is there any tricks to achieve better results with this? Should I create multiple labels for the images in the “nothing” category maybe?
  
  **Tags:** neural-networks, convolutional-neural-networks, image-recognition
  > **Comments:**
  > **username_1**: Just going off of what you said have you tried using fewer nothing images as "nothing", like 750 or so?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-08-26. Score: 2
  
  Welcome to AI.SE @Stromgren!
  
  A likely explanation is that the animals in the "nothing" group do not have much in common with each other.
  
  This means it will be difficult for the network to learn which features from the images are associated with that label (in fact, there aren't any!). As a result, the network is probably assigning very low confidence to any estimate for the nothing label. You should be able to check if this is the case (i.e. examine whether it is *ever* confident about the label "nothing").
  
  I am not completely sure how the Inception network encodes its labels. A common scheme though is to use one output neuron for each class. The correct label for an image is thus always a "1-hot" vector, where one of the elements is set to 1, and the others all to zero.
  
  If that representation is being used, you can incorporate the "nothing" data by labelling it with a vector that is all zero: none of the output neurons should activate for it. That would produce precisely the training signal you want.
  
  
  ---
  
  