You are teaching YOLO one thing it has never seen: your bracket, your tote, your cap. The question that decides your week is how many pictures that takes. This guide commits to numbers: an image budget per class, the resize rule that decides whether your captures are usable, a turntable capture plan that produces the budget in an afternoon, and the arithmetic that tells you when to raise the training resolution instead of shooting more. It assumes you fine-tune weights pretrained on COCO, which is what current YOLO trainers do by default, and it is written for the engineer who has to plan a capture day and defend the dataset size afterwards.
The image budget, by situation
| Situation | Images per class | Why this number |
|---|---|---|
| Fixed camera, one pose, controlled lighting | 100 | Published fine-tuning runs on pretrained weights succeed with 50-100 images, and a fixed scene removes most variation |
| One unique object, varied angles and backgrounds | 200-300 | Covers a full turn of pose, several backgrounds and lighting changes with margin |
| Production robustness across lines, seasons or defect types | 1,000-2,000 | The per-class figure published with YOLOv5 custom training for models that must survive real-world variation |
The middle row is the default answer for one unique object: 200-300 images per class, and no fewer than about 100 even in the friendliest setup. The rule that keeps these budgets honest is to count images that add a condition, not files. A 30 fps clip of one turntable revolution is 900 frames but only about 30 distinct poses; count files and you will believe you have a dataset when you have a slideshow.
Resolution: the resize rule, not the source file
Every YOLO trainer letterboxes whatever you give it onto a square network size, 416x416 or 640x640 by default, and 640-1280 px on the long edge is the sensible starting range. Source resolutions therefore need not match: a 4000 × 3000 capture and a 1280 × 720 phone video train side by side. What the network actually sees is your object at its size after that resize, and that is the number to engineer.
The first line is the same arithmetic as calculating object-space pixel size, with the field of view standing in for magnification.
Rule of thumb: keep the object above roughly 30 px at the training resolution. The basis is grid geometry — the finest detection grid at 640 px works in 8 px cells, so an object smaller than about four cells has too few left to carry texture. Under that floor, narrowing the field of view or raising the training size fixes it; more images do not.
If a scene only works above imgsz 1280, the capture geometry is the problem, not the dataset; small pixel camera selection explains why tiny pixels do not rescue a wide field. Downscaling a mixed set yourself before training, as post-capture downscaling covers, is bookkeeping for other tools, not a YOLO requirement.
Turntable video: the fastest way to cover a full pose range
Frames cut from video are legitimate training images, and a turntable plus one video produces the 200-300 budget in an afternoon. The trap is correlation. Adjacent video frames are near-duplicates, and a dataset of near-duplicates trains a model that fails on the first pose it did not see. Space the extraction so consecutive frames differ, and vary the camera, not just the turntable.
| Capture plan step | Setting | Arithmetic |
|---|---|---|
| Turntable speed | one revolution in 30 s | 12°/s |
| Extraction spacing | one frame every 1 s | 12° of pose between frames |
| Frames per revolution | 30 | 360° / 12° |
| Camera tilts per session | 2 | 60 frames per session |
| Sessions, new background and lighting each | 4 | 240 frames |
| Hand-held odd angles | 60 | 300 images total |
| Held-out validation | a fifth session | 30-50 images never trained on |
The 1-5 s extraction spacing used in practice works for the same reason: at any ordinary turntable speed it puts at least 10° between poses, enough that successive frames stop predicting each other. Split by session, not randomly: a random split scatters neighboring frames on both sides of the divide and reports an accuracy your deployed model will not see.
Spend the budget on variation, not duplicates
A workable first split of 300 images for one object:
| Variation | Images | What it teaches the detector |
|---|---|---|
| Pose and angle | 120 | Silhouette and feature positions from every direction |
| Background and clutter | 60 | Separating the object from what surrounds it |
| Lighting direction and level | 45 | The same surfaces at different brightness and shadow |
| Working distance and scale | 30 | The object large and small in frame |
| Partial occlusion | 30 | Detection with part of the object hidden |
| Cases the first model misses | 15 | Exactly the conditions your test exposes |
Read the first trained model as a data-collection tool: its false negatives name the images to shoot next. Include empty scenes in the set — images with no target teach the background and cut false positives, which is why background images carry no labels. Lighting is the variation engineers skip and later regret, because a line under skylights produces a different image at 9 a.m. and 4 p.m.; controlling ambient light variation covers fixing it on the line or baking it into the dataset.
Training settings that match the budget
Keep annotations in one format from the start; a CSV from one tool and YOLO text files from another is a conversion bug waiting to happen, and converting CSV annotations to YOLO walks the mapping. Then:
- Split by capture session: four sessions for training, the fifth for validation.
- Train 300 epochs as the first run, the standard starting point, and stop early once validation mAP sits flat for tens of epochs.
- imgsz 640 first; move to 1280 only when the resize arithmetic puts the object under the 30 px floor.
- When accuracy stalls below target, read the misses and capture images of those exact conditions. More epochs on the same images cannot teach a condition the dataset never showed.
If the run crashes before epoch one finishes, that is the environment, not the dataset; the usual GPU memory and CUDA segmentation faults have their own fixes. The wider training toolbox lives on the systems topic page.
Capture hardware that keeps the dataset small
The turntable plan needs steady frame delivery with no dropped frames, and enough capture resolution to keep the object over the 30 px floor after resize. The LS-CMR-0166 captures 4000 × 3000 at 30 fps over USB3 — the capture behind the worked example above.
- Sensor format
- 1/1.7"
- Interface
- USB3
- Resolution
- 12 MP
- Shutter
- Rolling
Small objects that push you to imgsz 1280 reward sensor pixels, because pixels bought on the sensor survive the letterbox: the MV-CS200-10GC resolves 20 MP onto a 1" sensor with a C-mount.
- Sensor format
- 1"
- Lens mount
- C-mount
- Interface
- GigE
- Resolution
- 16-25 MP
To deploy the finished detector without the training PC, move inference to a smart camera: the MV-SC5060XM-08M-WBN pairs a 6 MP sensor with an 8 mm M12-mount lens over GigE.
- Interface
- GigE
- Resolution
- 6-10 MP
- Sensor format
- 1/2.4"
- Shutter
- Rolling
Whichever camera captures the data, freeze exposure and gain in manual — auto exposure re-brightens each scene differently and silently adds a variable you never budgeted for, the failure behind image brightness drift. On a line, strobed lighting makes every session's images interchangeable; the light controller finder filters for strobe output.
Before you annotate: a five-minute pre-flight
- Zoom to 100% on ten sampled frames; edges crisp, no double edges from motion blur.
- Exposure and gain in manual, identical settings in every session.
- Resize arithmetic done for every scene type: object width after resize above 30 px.
- Extraction spacing honored: no two neighboring video frames both made the cut.
- At least 20-30 negative images with no target captured.
- The validation session copied to its own folder before any training, so it cannot leak in.
- Boxes tight to the object, one format, class names consistent.
The decision, per case
Fixed cell, one pose, controlled light: 100 images fine-tuned from pretrained weights, and stop there — the budget buys robustness, and a fixed scene has none to buy. One unique object seen from many angles and places: capture 200-300 with the turntable plan and let the first model nominate the next 15. Production across lines, seasons or many appearances: budget 1,000-2,000 per class and split training by environment. Object under 30 px after resize: no dataset size fixes it — narrow the field of view or train at 1280. A class added months later: retrain on the combined dataset, because fine-tuning only on new-class images erodes the classes the model already knew.
Size your own numbers with the resolution calculator above, pick the capture camera in area scan cameras or smart cameras, start the chain in the camera configurator, or bring the scene to us through the contact page.
Questions
Is 100 images enough to train YOLO on one object?
Yes, in a fixed setup. With weights pretrained on COCO, around 100 images of one object in one pose, one background and controlled lighting is a workable fine-tuning budget, and published fine-tuning runs have succeeded with 50-100. The 200-300 figure exists because a deployed model sees angles, lighting and clutter the lab did not. Buy robustness with variation, not with duplicates of the same view.
Do all training images need the same resolution?
No. The trainer letterboxes every image, whatever its size, onto the network input, typically 640x640, so a mix of 4K captures and phone photos trains fine. Keep the object's pixel size after that resize consistent: an object that spans 800 px in one image and 40 px in another teaches the detector two different problems. Scaling a mixed-resolution set down before training, as some pipelines do, is optional bookkeeping, not a requirement.
Can I cut training images from video of a turntable?
Yes, it is the fastest way to cover 360°. Space the frames at least 1 s apart so consecutive poses differ by roughly 10-15°, mix in at least two camera tilts, and treat the result as pose coverage rather than as independent images. Keep at least one full capture session out of training and use it for validation, so near-duplicate frames cannot inflate your metrics.
What image size should I train and run YOLO at?
Start at the 640 default. Compute the object's pixel width after the 640 resize; if it drops below roughly 30 px, train at 1280 instead, and run inference at the same size you trained at. A model trained at 1280 and served at 640 silently loses small-object accuracy. Doubling the training size multiplies training time and memory, so narrow the field of view first if you can.
How does the budget change with several classes?
Count per class, not per dataset: five classes at 200-300 each means 1,000-1,500 annotated images. One image can carry several classes, which is why cluttered scenes with multiple objects are efficient captures. When you add a class later, retrain from the combined dataset; fine-tuning only on new-class images degrades the classes the model already knew.


