YOLO Architecture: Grid-Based Detection
You'll learn: How YOLO divides an image into a grid and makes predictions directly from each cell, revolutionizing real-time object detection.
The Core Idea: One Look, All Predictions
Instead of sliding windows or generating region proposals, YOLO ("You Only Look Once") takes a radically different approach: it divides the entire image into an S × S grid (commonly 7×7, 13×13, or larger) and makes all predictions simultaneously in a single forward pass.
How Grid-Based Detection Works
Think of overlaying a chess board onto your image. Each grid cell becomes "responsible" for detecting objects whose center point falls within that cell.
For each grid cell, YOLO predicts:
- Multiple bounding boxes (typically 2-5 per cell) with confidence scores
- Class probabilities for what object might be in that cell
- Box coordinates (x, y, width, height) relative to the cell
The Assignment Rule
Here's the key: if a dog's center point lands in grid cell (3, 5), then that specific cell is responsible for detecting the dog. This spatial assignment creates a natural division of labor across the image.
Why This Works
By processing the entire image at once through a CNN, YOLO sees the full context while making localized predictions. Each cell has access to features from the entire image through the convolutional layers, but makes predictions about its specific region. This is why YOLO is so fast—it's literally one detection pass instead of thousands of region proposals.
The output is a 3D tensor: S × S × (B×5 + C), where B is boxes per cell, 5 represents (x, y, w, h, confidence), and C is the number of classes.
Key Takeaway: YOLO's grid-based architecture assigns detection responsibility to specific spatial cells, enabling real-time object detection by making all predictions in a single forward pass through the network.