Sub topic 16
The YOLO Family: How Versions Differ
Assume you know Python, convolutional neural networks, image classification, bounding boxes, IoU, and the basic training loop. You should also know that a detector predicts both where an object is and what it is.
YOLO is not one permanent model. It is a family of object detectors developed by different teams and projects. Most versions share the same goal: predict many candidate boxes and class scores in one forward pass. They differ in architecture, training methods, output format, speed, licensing, and software support.
A short history
The first YOLO treated detection as one regression problem. It divided an image into a grid and predicted boxes and classes directly. This made it fast, but small objects and crowded scenes were difficult.
Later versions improved different parts of the system:
- YOLOv2 improved localization, anchor boxes, and training stability.
- YOLOv3 used multiple image scales, which helped detect small objects.
- YOLOv4 combined many training and architecture improvements.
- YOLOv5 became popular because its PyTorch implementation and tooling were easy to use.
- YOLOv6 and YOLOv7 focused strongly on efficient real-time inference.
- YOLOv8 changed the Ultralytics interface and commonly used an anchor-free detection head.
- Later projects, including YOLOv9, YOLOv10, and YOLO11, introduced different efficiency, training, and post-processing choices.
These names do not form one perfectly controlled standard. For example, YOLOv5 and YOLOv8 are associated with Ultralytics, while other versions came from separate research teams. A version number alone does not tell you which API, license, checkpoint format, or deployment runtime you will use.
Compare models by behavior, not name
A detector's size suffix usually describes a capacity choice:
nornanois small and fast.sorsmallis a middle-sized option.m,l, andxuse more computation and often achieve higher accuracy.
The exact meaning varies by project. Compare measured latency on your hardware instead of assuming that a larger model is always better. A model that misses your camera's frame-rate requirement is not useful in production.
| Decision | Smaller model | Larger model |
|---|---|---|
| Compute and memory | Lower | Higher |
| Latency | Usually lower | Usually higher |
| Accuracy ceiling | Often lower | Often higher |
| Edge-device suitability | Better | Worse |
The most important practical differences are often outside the neural network. Check:
- Whether pretrained weights match your framework.
- Whether the license fits your project.
- Whether the model exports to ONNX, TensorRT, or your target runtime.
- Whether the repository is maintained.
- Whether its training and validation results use the same dataset and image size as your task.
A practical selection method
Start with a small, supported model. Establish a baseline using your own validation images. Then compare a larger model or another YOLO family member using the same data split, confidence threshold, IoU rule, and hardware.
from ultralytics import YOLO
model = YOLO("yolov8n.pt")
results = model.predict("bus.jpg", imgsz=640, conf=0.25, iou=0.7)
for result in results:
print(len(result.boxes), "detections")Do not compare only a published mAP number. Check recall for important objects, false positives, latency, memory use, and behavior on small or partially hidden objects.
Exercise
You need real-time detection on a low-power camera. Which should you test first: a nano model or an extra-large model, and what must you measure before deciding?
Show answer
Test the nano model first. Measure accuracy on your own validation data, end-to-end latency, memory use, and missed-object rate. Increase model size only if the accuracy gain justifies the extra cost.