4
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ Just going off of what you said have you tried using fewer nothing images as "nothing", like 750 or so? $\endgroup$ – kpie Aug 26 '18 at 4:51
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.