CNN for checking existance of single label

0

i am just thinking about training a neural network which uses data of only one single label.

For example: Assuming i have many images which contain a dog. Now i want to teach the network how a dog looks like, without images containing no dogs.

More formal: I want to check for availability of one label, so in theory, i need 2 datasets: Dog and NoDog

The question i am raising to myself now is: How would i define the NoDog-class? I can throw in anything, some random noise or just any unlabelled data which does not contain a dog? But how do i make sure that i sample the "no-dog"- space correctly? Which features does a "no-dog" image have? The "no-dog" space is huge, it is extremely difficult to describe it, somehow.

I had different ideas:

-Use the same dog-images, but cut out the dogs and fill it with noise

-Train a gan and use the discriminator for the binary classification

-Use tons of unlabelled data

Does anyone know how to tackle this problem in a systematic manner? Thank you

dog fish

Posted 2019-07-18T14:20:55.550

Reputation: 141

I think the question is stupid... the "boundary" gets defined by the dog-features, there is no need to find features for nodog-images. But can i throw in ANY data now for the nodog-dataset, or is it important for the network to find the boundary? – dog fish – 2019-07-18T14:37:26.887

Answers

1

Convolutional models can be used either for classification or not. You cannot train a classifier on a single label, because the loss function of such models is meant to punish the model every time an image is missclassified. If you have a single label, accuracy will be 100% all the time, by definintion. And such a model would be useless.

I think you have two options:

  1. Get a bunch of images that are not dogs, then train a CNN classifier.
  2. Train an Autoencoder for dimensionality reduction on your "dog data". These models can be used for anomaly detection tasks. Once you have trained such a model, when you feed a non-dog image it should be able to recognize it as an anomaly and flag it.

Both methods could work equally good. The first is the simplest one, but if you like playing and experimenting with DL the second is much more fun.

Leevo

Posted 2019-07-18T14:20:55.550

Reputation: 4 928