Limited data

The question I'm most often asked when it comes to computer vision and transfer learning is: How many images do I have to have? It's a difficult question to answer because, as we will see in the next section, more is usually better. A better question might be: How few images can I use to solve my business problem adequately?

So, just how limited can our dataset be? While far from scientific, I have built useful models using as few as 2,000 images for binary classification tasks. Simpler tasks and more diverse image sets typically result in more satisfying results with smaller datasets.

As a rule of thumb, you'll need at least a few thousand images of some class, and 10 to 20 thousand images is usually better.

Get Deep Learning Quick Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.