Jabb
Jabb

Reputation: 3502

Miminum requirements for Google tensorflow image classifier

We are planning to build image classifiers using Google Tensorflow.

I wonder what are the minimum and what are the optimum requirements to train a custom image classifier using a convolutional deep neural network?

The questions are specifically:

Upvotes: 13

Views: 1921

Answers (2)

Ian Goodfellow
Ian Goodfellow

Reputation: 2614

"how many images per class should be provided at a minimum?"

Depends how you train.

If training a new model from scratch, purely supervised: For a rule of thumb on the number of images, you can look at the MNIST and CIFAR tasks. These seem to work OK with about 5,000 images per class. That's if you're training from scratch.

You can probably bootstrap your network by beginning with a model trained on ImageNet. This model will already have good features, so it should be able to learn to classify new categories without as many labeled examples. I don't think this is well-studied enough to tell you a specific number.

If training with unlabeled data, maybe only 100 labeled images per class. There is a lot of recent research work on this topic, though not scaling to as large of tasks as Imagenet. Simple to implement:

http://arxiv.org/abs/1507.00677

Complicated to implement:

http://arxiv.org/abs/1507.02672
http://arxiv.org/abs/1511.06390
http://arxiv.org/abs/1511.06440

"do we need to appx. provide the same amount of training images per class or can the amount per class be disparate?"

It should work with different numbers of examples per class.

"what is the impact of wrong image data in the training data? E.g. 500 images of a tennis shoe and 50 of other shoes."

You should use the label smoothing technique described in this paper:

http://arxiv.org/abs/1512.00567

Smooth the labels based on your estimate of the label error rate.

"is it possible to train a classifier with much more classes than the recently published inception-v3 model? Let's say: 30.000."

Yes

Upvotes: 7

keveman
keveman

Reputation: 8487

How many images per class should be provided at a minimum?

do we need to appx. provide the same amount of training images per class or can the amount per class be disparate?

what is the impact of wrong image data in the training data? E.g. 500 images of a tennis shoe and 50 of other shoes.

These three questions are not really TensorFlow specific. But the short answer is, it depends on the resiliency of your model in handling unbalanced data set and noisy labels.

is it possible to train a classifier with much more classes than the recently published inception-v3 model? Let's say: 30.000.

Yes, definitely. This would mean a much larger classifier layer, so your training time might be longer. Other than that, there are no limitations in TensorFlow.

Upvotes: 4

Related Questions