How many images do I need to train YOLO?
As a rough guide, Ultralytics recommends around 1,500 images and 10,000 labelled instances per class for a robust production model. You can prototype with a few hundred well-labelled images using pretrained weights and augmentation, but variety matters more than raw count.
There is no single magic number, but there is a useful rule of thumb and, more importantly, a way to reason about it.
The rule of thumb
- ~1,500 images per class as a healthy target for production.
- ~10,000 labelled instances (individual objects) per class, this often matters more than image count.
- 5-10% background images with no objects, to cut false positives.
Instances, not just images
One image with 40 cars gives you 40 car instances. A crowded-scene dataset reaches strong instance counts with far fewer images than a dataset of one object per photo. Count instances per class, not just files.
Why variety beats volume
Ten thousand near-identical frames from one video are worth less than a few hundred images spanning different lighting, angles, backgrounds, and cameras. Aim to cover the real conditions you will deploy in. A model only learns what it has seen.
Getting away with fewer
- Start from pretrained weights (transfer learning) rather than training from scratch.
- Use augmentation (mosaic, flips, HSV) to stretch a small dataset further.
- Auto-label with a larger model or SAM to speed up annotation, then correct by hand.
- For a quick proof of concept, a few hundred solid images per class is often enough to see whether the idea works.
Stuck on this in a real project?
Book a free call and I’ll give you a straight answer on your specific case.
Book a consultation