FoundationalComputer VisionObject DetectionReal-TimeOne-Stage

You Only Look Once: Unified, Real-Time Object Detection

This paper reframed object detection as a single glance — one neural network looks at an image once and outputs every object's location and class, fast enough for live video.

Joseph Redmon, Santosh Divvala, Ross Girshick, Ali FarhadiCVPR 2016 · 201555k+ citations10 min interactive
The story

The whole paper, in pictures

Five animated scenes — everything you need to understand this paper, no reading required. Then scroll on to play with the ideas yourself.

You Only Look Once — the picture-book version

No paper-reading needed — the pictures tell the whole story

checking region 1,847 of ~2,000…old detectors asked “anything here?” thousands of times per photo

Old detectors found objects by checking one photo… two thousand times.

Cut out a region, ask 'anything here?', repeat, repeat, repeat…

1/5
Paper overview

Pick your depth

The same ideas at three altitudes — start where you're comfortable, climb when you're curious.

One glance, not a thousand looks

Before YOLO, computers found objects the slow way: cut the photo into thousands of little regions, and ask 'is this a dog?' about each one, one at a time. YOLO works like your eyes do — it looks at the whole picture once and instantly says 'dog here, car there, person over there'. That's literally the name: You Only Look Once.

The grid trick

YOLO lays an invisible 7-by-7 grid over the picture. Each grid square has one job: 'if an object's center lands on me, I must report it.' Every square simultaneously guesses a box around its object, how confident it is, and what the object is. All 49 squares answer at the same time — that's why it's so fast.

Why speed changed everything

YOLO could process 45 pictures every second — faster than video plays. Suddenly computers could watch the world live: a self-driving car can't wait 20 seconds to notice a pedestrian. Almost every real-time camera AI you see today descends from this idea.

Key innovation

Problem → Solution → Impact

Every great paper is a story: what was broken, the idea that fixed it, and what it unlocked.

Problem

Detection was a slow, glued-together pipeline

  • Systems repurposed classifiers: propose ~2,000 regions, run each through a CNN separately.
  • Multi-stage pipelines (proposals → features → classifier → box refinement) were trained piece by piece.
  • Even the fastest accurate detector (Faster R-CNN) managed only ~7 frames per second.

Like finding your keys by photographing every square inch of the room and examining the photos one by one.

Solution

One network, one look, end to end

  • Lay a 7×7 grid on the image; every cell predicts boxes, confidence, and class simultaneously.
  • The whole pipeline is a single CNN trained end-to-end on detection performance.
  • Seeing the full image at once gives global context — fewer 'ghost' detections in the background.

Like glancing at the room once and your brain instantly tagging everything: keys, phone, cat.

Impact

Real-time vision became standard

  • 45 fps made detection usable on live video — robotics, driving, surveillance, sports.
  • Founded the one-stage detector family: SSD, RetinaNet, and YOLOv2 through today's YOLOs.
  • Its speed-first philosophy still defines deployed computer vision a decade later.

The moment computer vision went from developing photos in a darkroom to seeing live.

Interactive simulator

Don't read about detection — tune it

This is YOLO's post-processing, live: drag the confidence and IoU sliders and watch detections appear, vanish, and merge.

YOLO Detection Lab

One glance, every object — then keep only the best guesses

car 94%person 89%dog 68%

Note: the scene and candidate boxes are illustrative, but the filtering is YOLO's real post-processing math — confidence thresholding and Non-Maximum Suppression with true Intersection-over-Union geometry.

Clean result: 3 objects. NMS quietly removed 3 duplicate boxes — for each object, only the most confident box survives.

Analogy: The model shouts out everything it thinks it sees, each with a confidence score. Your sliders decide which shouts to trust and which duplicate shouts to merge.

Architecture explorer

The full machine, block by block

Follow a sentence through the model. Every block is clickable — purpose, example, and the deeper detail.

Click any block to inspect it

Convolutional Backbone

24 conv layers

A deep stack of convolution and pooling layers extracts visual features — edges, textures, parts, objects — while shrinking the image spatially.

Example

Early layers light up for edges and colors; deeper layers respond to wheels, faces, and fur (exactly what the CNN Lab below demonstrates).

Go deeper

Inspired by GoogLeNet, but uses cheap 1×1 'reduction' convolutions instead of inception modules. The first 20 layers are pretrained on ImageNet classification for a week, then 4 conv layers and the detection head are added.

Tip: follow the animated edges top-to-bottom — that is the exact journey a sentence takes through the model.

Math, demystified

Every equation earns its keep

Formula → plain meaning → real-world analogy. Hover the symbols to decode them one by one.

Box Confidence

Hover a symbol to decode it.

What it means

A box's confidence should be high only when BOTH things are true: an object really is there, and the predicted box overlaps it well. If no object exists, confidence should be zero.

Real-world analogy

A witness statement scored on two things at once: are you sure you saw something, and how precisely can you point to where it was?

Class-Specific Score

Hover a symbol to decode it.

What it means

At test time, each cell's class probabilities multiply with each box's confidence. The result scores 'this specific class, in this specific box' — the number the confidence slider in the Detection Lab thresholds.

Real-world analogy

Chained certainty: (sure it's a dog, given something's there) × (sure something's there) × (sure about where) = one final trust score.

Intersection over Union (IoU)

Hover a symbol to decode it.

What it means

The standard measure of how much two boxes agree: the area where they overlap, divided by the total area they cover together. 1 means identical boxes; 0 means no contact.

Real-world analogy

Two people circle the same dog on a photo with markers. IoU asks: of all the ink on the page, what fraction is double-inked? That's their agreement.

Localization Loss (with the √ trick)

Hover a symbol to decode it.

What it means

Box size errors are punished on the square root of width and height, not the raw values — so being 10 pixels off on a tiny box hurts much more than 10 pixels off on a huge box. λ_coord = 5 makes box accuracy matter more than the many empty cells.

Real-world analogy

Missing a dartboard by 10 cm is embarrassing; missing a football goal by 10 cm is fine. The √ makes the loss judge errors relative to the target's size.

Interactive playground

How the backbone sees

YOLO's 24 convolutional layers are built from this exact operation. Watch a real filter slide across an image and produce a feature map.

CNN Convolution Lab

How computers see: a tiny magnifying glass scanning a picture

Input

Vertical

Feature map (10×10)

Compares each pixel's left side to its right side. Big difference = a vertical edge lives here. Press play to watch the filter scan the image — this exact multiply-and-add is what every CNN layer does, millions of times.

Analogy: Sliding a small stencil over a photo and asking at every spot: how much does this patch look like my pattern?

Real-world impact

Where this research lives today

Eight pages from 2017 that you now interact with every single day.

Autonomous driving

Perception stacks must find pedestrians, cars, and signs in every frame with millisecond budgets — the exact real-time constraint YOLO was built for.

Security & surveillance

Live camera feeds are monitored by one-stage detectors flagging people, vehicles, and objects across thousands of streams simultaneously.

Sports analytics

Player, ball, and event tracking in broadcast video runs on YOLO-family detectors — fast enough to follow the action live.

Medical & scientific imaging

Detecting cells in microscopy, lesions in scans, and wildlife in drone footage all use one-stage detection descended from this paper.

Robotics & drones

Robots grasping objects and drones avoiding obstacles need onboard, low-latency detection — Fast YOLO's 155 fps set the template.

Retail & industry

Checkout-free stores, shelf monitoring, and factory quality control run continuous real-time detection on the YOLO lineage.

Code example

The core idea in ~40 lines of code

Reading real code is the final test of understanding. This is the paper's core mechanism, minimally.

YOLO post-processing: decode the grid + NMSpython

The network's output is just a 7×7×30 block of numbers. This is the real post-processing that turns it into detections — scoring, thresholding, and Non-Maximum Suppression. It's the same math the Detection Lab's sliders control.

1import numpy as np
2
3S, B, C = 7, 2, 20 # grid size, boxes per cell, classes
4
5
6def iou(box_a, box_b):
7 """Intersection over Union of two [x1, y1, x2, y2] boxes."""
8 x1 = max(box_a[0], box_b[0]); y1 = max(box_a[1], box_b[1])
9 x2 = min(box_a[2], box_b[2]); y2 = min(box_a[3], box_b[3])
10 inter = max(0, x2 - x1) * max(0, y2 - y1)
11 area_a = (box_a[2] - box_a[0]) * (box_a[3] - box_a[1])
12 area_b = (box_b[2] - box_b[0]) * (box_b[3] - box_b[1])
13 return inter / (area_a + area_b - inter)
14
15
16def decode(pred, conf_thresh=0.25):
17 """pred: (S, S, B*5 + C) tensor -> list of scored boxes."""
18 boxes = []
19 for row in range(S):
20 for col in range(S):
21 cell = pred[row, col]
22 class_probs = cell[B * 5:] # 20 class probabilities
23 for b in range(B):
24 x, y, w, h, conf = cell[b * 5 : b * 5 + 5]
25 # class-specific score = Pr(Class|Obj) * Pr(Obj) * IoU
26 scores = class_probs * conf
27 cls = int(np.argmax(scores))
28 if scores[cls] < conf_thresh:
29 continue # too unsure -> discard
30 # (x, y) are relative to the cell; (w, h) to the image
31 cx, cy = (col + x) / S, (row + y) / S
32 boxes.append({
33 "box": [cx - w / 2, cy - h / 2, cx + w / 2, cy + h / 2],
34 "score": float(scores[cls]),
35 "class": cls,
36 })
37 return boxes
38
39
40def nms(boxes, iou_thresh=0.45):
41 """Keep the best box per object; drop overlapping duplicates."""
42 boxes = sorted(boxes, key=lambda d: d["score"], reverse=True)
43 kept = []
44 for cand in boxes:
45 duplicate = any(
46 k["class"] == cand["class"]
47 and iou(k["box"], cand["box"]) > iou_thresh
48 for k in kept
49 )
50 if not duplicate:
51 kept.append(cand)
52 return kept
53
54
55# --- Try it on random 'network output' ---
56pred = np.random.rand(S, S, B * 5 + C)
57detections = nms(decode(pred))
58print(f"{len(detections)} objects after decode + NMS")
Check yourself

Did it stick?

Four questions, each targeting a concept people commonly get wrong. Mistakes come with explanations.

Question 1 of 4

Why was R-CNN-style detection so slow?

You Only Look Once: Unified, Real-Time Object Detection · PaperLab