Back to Feed
Computer Vision

Real Time Object Detection With A Single Network

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

Listen to the summary

Uses a voice available on your device

Audio options
On this page 4 sections
Related concepts 3 concepts

Key Takeaways

  • Object detection is framed as a single regression problem, mapping image pixels directly to bounding boxes and class probabilities.
  • The network architecture uses features inspired by GoogLeNet and the Darknet framework for training and inference.
  • Combining Fast R-CNN with YOLO increases Fast R-CNN mAP on the VOC 2007 test set by 3.2% from 71.8% to 75.0%.
  • YOLO scores 57.9% mAP on the VOC 2012 test set.
  • The model struggles with small objects in groups, such as flocks of birds, due to strong spatial constraints on bounding box predictions.

Summary & Methodology Analysis

The paper addresses the need for fast and accurate algorithms for object detection by reframing detection as a regression problem to spatially separated bounding boxes and associated class probabilities. This enables a single neural network, known as YOLO, to predict detections directly from full images in one evaluation. The methodology divides the input image into an S x S grid where each grid cell predicts B bounding boxes, confidence scores, and C conditional class probabilities directly from image pixels. The network architecture is inspired by the GoogLeNet model for image classification, utilizing 1x1 reduction layers followed by 3x3 convolutional layers. The convolutional layers are pretrained on the ImageNet classification task at half resolution using the first 20 convolutional layers followed by an average-pooling layer and a fully connected layer. The Darknet framework is used for all training and inference. For detection, four convolutional layers and two fully connected layers with randomly initialized weights are added to the pretrained network, and input resolution is increased from 224 x 224 to 448 x 448. Optimization relies on a multi-part sum-squared error loss function that weights localization error, coordinate predictions, confidence predictions for cells containing or not containing objects, and conditional class probabilities using parameters such as lambda_coord and lambda_noobj. Combining Fast R-CNN with YOLO increases Fast R-CNN mAP on the VOC 2007 test set by 3.2% from 71.8% to 75.0%, and YOLO scores 57.9% mAP on the VOC 2012 test set. Despite these results, the approach has several limitations. YOLO imposes strong spatial constraints on bounding box predictions since each grid cell only predicts two boxes and can only have one class, which limits the number of nearby objects the model can predict. The model struggles with small objects that appear in groups, such as flocks of birds. Because the model learns to predict bounding boxes from data, it struggles to generalize to objects in new or unusual aspect ratios or configurations. It also uses relatively coarse features for predicting bounding boxes due to multiple downsampling layers from the input image. Finally, the loss function treats errors the same in small bounding boxes versus large bounding boxes, even though a small error in a small box has a much greater effect on IOU, making incorrect localizations the main source of error.

Interactive System Flowchart

Click diagram to expand and zoom

Cross-Examination & FAQs

A deeper dive clarifying mechanics, constraints, and baseline evaluations.

Q1. What core problem does the paper address?

The paper addresses the need for fast, accurate algorithms for object detection by framing object detection as a regression problem to spatially separated bounding boxes and associated class probabilities.

Q2. How does YOLO process an image?

YOLO enables a single neural network to predict detections directly from full images in one evaluation by dividing the input image into an S x S grid where each grid cell predicts bounding boxes, confidence scores, and conditional class probabilities.

Q3. What are some of the models and datasets evaluated in the paper?

Evaluated models and datasets include YOLO, Fast YOLO, DPM, R-CNN, Fast R-CNN, Faster R-CNN, GoogLeNet, Darknet, Pascal VOC, Pascal VOC 2007, Pascal VOC 2012, ImageNet, ImageNet 1000-class competition dataset, ImageNet 2012 validation set, Caffe’s Model Zoo, Deep MultiBox, OverFeat, MultiGrasp, Picasso Dataset, People-Art Dataset, VGG-16, and Zeiler-Fergus Faster R-CNN.

Q4. What is the inspiration behind the network architecture?

The network architecture is inspired by the GoogLeNet model for image classification, utilizing 1x1 reduction layers followed by 3x3 convolutional layers.

Q5. How are the convolutional layers initialized before detection training?

The convolutional layers are pretrained on the ImageNet classification task at half resolution using the first 20 convolutional layers followed by an average-pooling layer and a fully connected layer.

Q6. What framework is used for training and inference?

The paper uses the Darknet framework for all training and inference.

Q7. What changes are made to the network for the detection task?

Four convolutional layers and two fully connected layers with randomly initialized weights are added to a pretrained network, and the input resolution is increased from 224 x 224 to 448 x 448.

Q8. How does the loss function optimize performance?

The model is optimized for a multi-part sum-squared error loss function that weights localization error, coordinate predictions, confidence predictions for cells containing or not containing objects, and conditional class probabilities using parameters such as lambda_coord and lambda_noobj.

Q9. What are the main performance results reported on Pascal VOC datasets?

Combining Fast R-CNN with YOLO increases Fast R-CNN mAP on the VOC 2007 test set by 3.2% from 71.8% to 75.0%, and on the VOC 2012 test set, YOLO scores 57.9% mAP.

Flag an issue

What is wrong with this summary?

What is wrong?