YOLO (You Only Look Once)
What YOLO Does
YOLO models locate objects and assign class labels in one detector pass. The output is a set of boxes, confidence scores, and classes that can support real-time tasks such as robotics, visual inspection, and safety monitoring.
The original You Only Look Once: Unified, Real-Time Object Detection reframed detection as a single neural-network prediction problem instead of a proposal stage followed by per-region classification. “YOLO” now refers to several related lineages, not one continuously governed architecture, so version names and benchmark numbers should be interpreted with their implementation and evaluation setup.
Core Idea
An image is encoded once, and a dense detection head predicts candidate locations and classes across the image. Modern YOLO versions use feature maps at multiple resolutions so small and large objects can be detected in the same pass.
How It Works
1. Extract Features Once
A convolutional backbone transforms the image into feature maps. In the original YOLO, 24 convolutional layers fed two fully connected layers. For PASCAL VOC, its grid output had shape for two boxes and 20 classes.
2. Predict Boxes and Classes
YOLOv1 assigns responsibility based on the grid cell containing an object's center. Each candidate predicts box coordinates , confidence, and class information. Later families changed this formulation:
- YOLOv2 introduced anchor boxes and offset prediction.
- YOLOv3 predicted at three feature-map scales.
- YOLOv4 and several descendants used CSP-style backbones and feature-pyramid/path-aggregation necks.
- Ultralytics YOLOv8 uses an anchor-free, decoupled head with separate classification and box branches.
- YOLOv10 proposes consistent dual assignments for end-to-end, NMS-free inference.
3. Fuse Multiple Scales
A modern detector commonly has three parts:
- a backbone extracts visual features;
- a neck combines high-resolution location detail with low-resolution semantic context; and
- a head predicts boxes and classes at several scales.
For a input, one implementation may predict from , , and maps. Exact channels, blocks, and outputs vary by version and model size.
4. Train Jointly
The loss combines localization and classification terms, and—where the version predicts it explicitly—objectness. Modern box losses are usually IoU-based; CIoU additionally considers center distance and aspect ratio. Label assignment determines which predictions train against each ground-truth object and is a major source of differences between versions.
5. Remove Duplicate Predictions
Most versions produce overlapping candidates and use non-maximum suppression (NMS): sort by confidence, keep a strong box, and suppress highly overlapping alternatives. NMS thresholds affect precision, recall, and crowded-scene behavior. End-to-end variants such as YOLOv10 are designed to avoid NMS at inference.
Why It Works
- Shared computation: the backbone processes the image once rather than running a classifier for every proposed region.
- Global context: predictions are conditioned on features from the whole image.
- Dense prediction: all image regions are considered in parallel on accelerator-friendly tensors.
- Multi-scale features: high-resolution maps help small objects while coarse maps carry wider context.
- Scalable families: nano through large variants trade accuracy for latency, but should be benchmarked on the target runtime.
Limitations
- Small, crowded, or heavily overlapping objects remain difficult, especially at low input resolution.
- NMS can discard valid overlapping instances; NMS-free approaches introduce their own assignment constraints.
- Results across YOLO versions are not directly comparable when datasets, model scales, image sizes, augmentation, or latency measurement differ.
- Anchor-based versions require suitable anchor settings; anchor-free versions still depend on label assignment and loss design.
- Export support does not guarantee identical numerical behavior or speed across TensorRT, ONNX, Core ML, and TFLite.
Evolution and Applications
Common applications include defect localization, PCB component checks, package inspection, PPE monitoring, and robotic pick-and-place. Quantization and accelerator-specific compilation can reduce latency, but accuracy and throughput must be measured on representative data and hardware.
- RT-DETR (2023) — a real-time transformer detector
- YOLOv9 (2024) — Programmable Gradient Information and GELAN
- YOLOv10 (2024) — end-to-end NMS-free detection
- YOLO-World (2024) — open-vocabulary detection
Related
Sources
- You Only Look Once: Unified, Real-Time Object Detection — YOLOv1 by Redmon et al. (CVPR 2016)
- YOLO9000: Better, Faster, Stronger — YOLOv2 by Redmon & Farhadi (CVPR 2017)
- YOLOv3: An Incremental Improvement — Redmon & Farhadi (2018)
- YOLOv4: Optimal Speed and Accuracy of Object Detection — Bochkovskiy et al. (2020)
- Ultralytics YOLOv8 Documentation — Official YOLOv8 docs
- YOLO — Wikipedia
- COCO Detection Benchmark