How much data does a CNN need to learn - continuation

A few weeks ago I started a topic sharing some experience and asking for thoughts about determining how much training data a CNN needs.

As described in that thread, I used 3 different data sets to try to quantify the number of training images that seemed to suffice. Two of those datasets seemed really too small. I did more experiments with the 3^{rd} one, with the vegetables, and share that here. I ran exactly the same model, loss, optimization, and training iterations. I created a dataset with the same 15,000 images. I varied only the validation split. So of the 15K, an image was either in the training set or the validation set every run. Below are the accuracy and loss curves, with the number of training images embedded in the title. Starting with lowest…

My conclusion? More is better :smiley: but 10K is still looking like a reasonable floor, at least for this model and these images. HTH

@Christian_Simonis I’m ready to start thinking about the uncertainty idea, and see if the results track with what my simple experiments suggest. Will let you know if I get anything interesting. Cheers

1 Like

I think this is a good example to explain how adding training data can help solve overfitting. I am going to bookmark this.

Great overview, @ai_curious!

I read this article on enabling smaller pretrained models to perform a training with a few (8) examples per class and contrastive learning and thought you might also find it interesting. Feel free to take a look:

Best regards

Thanks for the link. Of course my analysis applies to the case where we’re not doing any type of transfer learning. Maybe what my analysis suggests is that no one should be doing that :thinking:. Instead, regular people should always start with a model trained on a big data set on a big computing platform by someone else.

From the linked page ‘… the next step is to load a pretrained Sentence Transformer model from the Hub…’. Kind of like it’s easier to dunk a basketball if the first step is lace up the anti-gravity shoes, soon no one will play sports without them.

1 Like