Paper commentary
You Only Look Once: Unified, Real-Time Object Detection
- Problem Detection pipelines chain separately trained stages, which makes them slow and hard to optimize as a whole.
- Method Frames detection as one convolutional network that predicts boxes and class probabilities from the full image in a single evaluation, trained with a multi-part loss over a grid.
- Results Base YOLO runs at 45 frames per second on a Titan X, and reaches 63.4 mAP on PASCAL VOC 2007 with 2007+2012 training in the real-time table.
Why detection pipelines are slow to build and tune
Earlier detectors reuse classifiers. A detector built this way runs an object classifier over many positions and scales of the test image, as DPM does with a sliding window, or runs it on candidate regions, as the R-CNN family does. The R-CNN family adds stages after classification, such as box refinement, duplicate removal and rescoring of boxes against other objects in the scene.
Each stage is trained separately, which makes the whole chain slow and hard to optimize.
YOLO replaces this chain with a single regression from image pixels to bounding box coordinates and class probabilities. The network sees the whole image during training and at test time, so it can use context about classes along with their appearance, which the authors contrast with sliding-window and proposal methods. With no separate pipeline, the model is trained on full images and optimized directly for detection performance, end-to-end.
How one network turns an image into a grid of predictions
The pipeline has three steps. The input image is resized to 448 × 448, a single convolutional network runs once on it, and detections are kept when their confidence passes a threshold.
The image is divided into an S × S grid. The grid cell containing the center of an object is responsible for detecting that object, and each cell predicts B bounding boxes with confidence scores and C conditional class probabilities. On PASCAL VOC the authors use S = 7, B = 2 and C = 20, so the output is a 7 × 7 × 30 tensor.
Each box has five values: x and y give the box center relative to its grid cell, while w and h give the width and height relative to the whole image, plus a confidence.
At test time the class-specific score of a box is the conditional class probability times the box confidence, which reduces to \( \Pr(\text{Class}_i) \times \mathrm{IOU}^{\text{truth}}_{\text{pred}} \). Each cell holds one set of class probabilities, however many boxes it predicts.
Fast YOLO keeps the same design idea with 9 convolutional layers instead of 24 and fewer filters, while other training and testing settings stay the same.
Pretraining, loss and training schedule
The first 20 convolutional layers are pretrained on the ImageNet 1000-class dataset, followed by an average-pooling layer and a fully connected layer. That network reached 88% single-crop top-5 accuracy on the ImageNet 2012 validation set. For detection the authors add four convolutional layers and two fully connected layers with random weights, and raise the input from 224 × 224 to 448 × 448 because detection needs finer visual detail.
The final layer is linear and predicts class probabilities and box coordinates. Box width and height are normalized by the image size, and x and y are offsets within the grid cell so they stay between 0 and 1. The other layers use a leaky rectified linear activation, written as \(\varphi(x)=x\) for \(x>0\) and \(\varphi(x)=0.1x\) otherwise.
The loss is built on sum-squared error. The authors note that this weights localization and classification errors equally, and that it does not match average precision exactly. Width and height errors are measured on their square roots, which reduces the effect of deviations in large boxes.
Each object is assigned to one predictor in its cell, the one with the highest current IOU with the ground truth. The authors say this lets predictors specialize in particular sizes, aspect ratios or classes. The classification term applies only in cells that contain an object, and the coordinate term applies only to the predictor responsible for the ground truth box.
Training runs for about 135 epochs on PASCAL VOC 2007 and 2012 train and validation sets, with VOC 2007 test data added when testing on 2012. Batch size is 64, momentum 0.9 and decay 0.0005.
Inference and duplicate handling
Inference needs one network evaluation per image. On PASCAL VOC the network predicts 98 bounding boxes per image, each with class probabilities. That is far fewer than the about 2000 candidate boxes from Selective Search that R-CNN generates.
Because the grid is fixed, several cells can localize one large object or an object near a cell border. Non-maximal suppression removes these duplicate detections. The authors report that non-maximal suppression adds 2-3% mAP for YOLO, a smaller effect than they see for R-CNN or DPM.
Speed and accuracy against real-time detectors
In Table 1, which lists 2007+2012 training for both models, Fast YOLO scores 52.7 mAP and YOLO scores 63.4 mAP. The authors say Fast YOLO is more than twice as accurate as earlier real-time work, and that YOLO is 10 mAP more accurate than Fast YOLO.
The table lists the 100Hz and 30Hz DPM variants at 16.0 and 26.1 mAP, running at 100 and 30 fps. The fastest DPM listed reaches 30.4 mAP at 15 fps. Among slower detectors, R-CNN Minus R reaches 53.5 mAP at 6 fps, Fast R-CNN reaches 70.0 at 0.5 fps, and Faster R-CNN with VGG-16 reaches 73.2 at 7 fps. The table also lists YOLO VGG-16 at 66.4 mAP and 21 fps, in its less-than-real-time group.
The authors say the VGG-16 Faster R-CNN is 10 mAP higher than YOLO but six times slower, and that the Zeiler-Fergus variant is about 2.5 times slower than YOLO but less accurate. These speeds come from the authors' own tests, while the other rows of the table are taken as listed.
Where YOLO's errors come from
The analysis follows Hoiem et al. and examines the top N predictions per category, where N is the number of objects in that category.
Averaged over all 20 classes, Fast R-CNN has 71.6% correct predictions, 8.6% localization errors and 13.6% background errors. YOLO has 65.5% correct, 19.0% localization and 4.75% background.
YOLO's localization errors outnumber all its other error sources combined. Fast R-CNN is almost 3x more likely than YOLO to predict background detections. The two detectors therefore fail differently: YOLO localizes less precisely, while Fast R-CNN more often fires on background patches.
Using YOLO to rescore Fast R-CNN
For each Fast R-CNN box, the procedure checks whether YOLO predicts a similar box. If it does, the Fast R-CNN score is boosted using YOLO's probability and the overlap between the two boxes. The best Fast R-CNN model reaches 71.8% mAP on the VOC 2007 test set, and the combination raises it to 75.0, a gain of 3.2.
The two models run separately, so the combination does not benefit from YOLO's speed. The authors say YOLO adds little computation next to Fast R-CNN.
VOC 2012 leaderboard position
On the VOC 2012 test set YOLO scores 57.9% mAP, below the top methods on the leaderboard. Its score sits closer to the original R-CNN with VGG-16, which scores 59.2 in Table 3.
They say the system struggles with small objects compared with its closest competitors.
Adding YOLO raises Fast R-CNN's VOC 2012 mAP by 2.3%, from 68.4 to 70.7, which moves the combined model to the fourth highest scoring method in Table 3.
Person detection in artwork
Two artwork datasets test person detection: the Picasso Dataset and the People-Art Dataset. Picasso models are trained on VOC 2012 and People-Art models on VOC 2010, and VOC 2007 person AP is given as a reference where all models train only on VOC 2007.
On VOC 2007 person AP, YOLO reaches 59.2, R-CNN 54.2 and DPM 43.2. On the Picasso Dataset YOLO reaches 53.3 AP, against 10.4 for R-CNN and 37.8 for DPM, with a best F1 of 0.590 against 0.226 and 0.458. On People-Art YOLO reaches 45 AP, against 26 for R-CNN and 32 for DPM.
The authors attribute R-CNN's drop to Selective Search being tuned for natural images, and to its classifier seeing only small regions that need good proposals. DPM degrades less but starts from a lower AP. The authors attribute YOLO's smaller degradation to its modeling of object size, shape and layout, which they argue is similar across artwork and natural images even though pixels differ.
Limitations
Because the model learns boxes from data, it struggles with unusual aspect ratios or configurations. Its coarse features, after several downsampling layers, also limit box precision. The loss treats errors equally in small and large boxes, though a small error in a small box changes IOU much more. The authors identify incorrect localization as the main error source.
The reported experiments cover PASCAL VOC 2007 and 2012, two artwork person datasets, and a qualitative webcam demo. The VGG-16 variant is more accurate but slower than real time, so the rest of the paper focuses on the faster models.
Paper info
- Authors
- Joseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi
- Venue
- arXiv · Preprint
- First published
- 2015-6-8
- Added
- 2026-10-20
- Updated
- 2016-5-9
- Version
- v5
- arXiv
- 1506.02640
- Category
- cs.CV
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Joseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi (2015). You Only Look Once: Unified, Real-Time Object Detection. arXiv:1506.02640v5. https://arxiv.org/abs/1506.02640v5
BibTeX
@misc{redmon2015only,
title = {{You Only Look Once: Unified, Real-Time Object Detection}},
author = {Joseph Redmon and Santosh Divvala and Ross Girshick and Ali Farhadi},
year = {2015},
eprint = {1506.02640},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1506.02640v5}
}