Scenario: I am trying to create a dataset with images of choice for different animal classes. I am going to train those images for classification using CNN.

Problem: Lets assume I somehow don't have the privilege to collect too many images and was only able to collect few of them for each class. Here's the list: -

Baboon : 800

Fox : 1000

Hyena : 5000

Giraffe : 43

Zebra : 88

6: Hippopotamus: 233

7: Yak: 578

8: Polar Bear : 456

9: Lion : 3442

10: Indian Tiger : 40,000

Questions are: -

Is this a good dataset to train the CNN model.? I am worried about the quantity each class have.

Will it be helpful if I augmenting the data ? I think am going to.

In future the above mentioned dataset is going to increase. So there is a chance that I will train the model again. Should I create a model that fits the data of the present size or should I create a bigger one inorder to adjust future data ?

Thank you for your time.

I can get data from Internet. But this question is about the approaches to take when we are bounded by less data like the one in National Data Science Bowl (classifying Planktons).


You can build this just with 100 images. In your case, Zebra and Giraffe need more images. With DNNClassifier (tensorflow) you can do it. But the more images you have, more accurate. In Google Machine Learning video, you can see more about Inception (TensorFlow for Poets)


It is somewhat risky to discuss data independently with your learning mechanism. There is actually no such thing as good data or a good learner. There is only data that is good WITH a particular learner. That is even true of human intelligence after all the standardized education and testing done today.

There are also exceptional learners that find data to be good when most others fumble with it.

If by good data and deep learning you mean image sets that will lead to proper categorization of unsuspected images presented in production, your intuitive understanding of statistics can provide you with a general answer. The images on which the deep learner develops its activation weights and meta-parameters to provide adequate production behavior must be representative of the range of images that will be found in the production feeds.

If you intended to do a study of men and women to determine if the old belief that women are more motivated by the prospect of love and men are more motivated by the prospect of sex, you wouldn't pick 43 men and 40,000 women for the study. The study's value is limited by the lower of the two numbers.

You can train the network with the category frequencies you have, but some deep learners may capitalize fully on feature extraction for Indian Tigers and Hyenas but exhibit an unacceptable level mis-categorization of Zebras and Giraffes.

Returning to the concept above, the skew in category frequency can be accounted for by the deep learner. It is theoretically possible to create an exceptional learner or one that is well attuned to this kind of frequency skew. A simple approach is to develop a scheme that recognizes frequency skew and allocates additional computing resources to the training that focuses on the differentiation of similar animals with infrequent labeled training instances.

I don't recall who has done that, but I know it has been done.

There are several ways you can give extra attention to the infrequent categories manually in the code, but then it would be a less general solution and the resulting program would neither be an exceptional learner nor particularly reusable.

It is more cost effective to hunt for a skew resistant deep learning scheme and test its accuracy for infrequent animals than sending a photographer to Africa. If you can find more images of the less frequent animals without a monumental effort, I would do that too.


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.