Computer Vision

One-Stage vs Two-Stage Detectors

Comparing slow high-accuracy Two-Stage region proposal detectors against ultra-fast One-Stage single-pass detectors.

🔴 advanced5 min readvision
Object detectors divide into Two-Stage (Faster R-CNN, Mask R-CNN) and One-Stage (YOLO, SSD, RetinaNet, DETR) architectures. Two-stage detectors first generate candidate Region Proposals via a Region Proposal Network (RPN), then classify and refine boxes in Stage 2, achieving high accuracy. One-stage detectors predict bounding boxes and class probabilities directly from feature maps in a single dense forward pass, enabling real-time FPS video processing.

Two-Stage vs One-Stage Architectural Comparison

  TWO-STAGE DETECTOR (Faster R-CNN):
  Image ──► Backbone ──► [ Stage 1: RPN (Region Proposals) ] ──► [ Stage 2: RoI Align + Classification ] ──► Output Boxes
                         (Extracts ~2000 candidate boxes)         (Classifies & refines each candidate)
                         Slow, High Precision (~15-30 FPS)

  ONE-STAGE DETECTOR (YOLOv8):
  Image ──► Backbone + FPN ──► [ Single Dense Grid Forward Pass ] ───────────────────────────────────────► Output Boxes
                               (Predicts boxes & classes simultaneously for all grid cells)
                               Ultra-Fast Real-Time (60-150+ FPS)

Detailed Comparison Matrix

PropertyTwo-Stage (Faster R-CNN, Mask R-CNN)One-Stage (YOLO, SSD, RetinaNet)Transformer (DETR)
Pipeline Steps1. Region Proposals (RPN) -> 2. RefinementSingle dense forward passBipartite matching queries
Inference SpeedSlow (15 – 30 FPS)Ultra-Fast (60 – 150+ FPS)Moderate (30 – 60 FPS)
Accuracy (mAP)Traditionally higher on small objectsMatches Two-Stage with modern YOLO/RetinaNetHigh global context accuracy
Anchor DependencyUses Anchor BoxesAnchor-based OR Anchor-Free (YOLOv8)Anchor-Free (Queries)
NMS DependencyRequires Non-Maximum SuppressionRequires Non-Maximum SuppressionNMS-Free (Direct End-to-End)

Stage 1 vs Stage 2 Mechanics in Faster R-CNN

  1. Backbone Feature Extractor: Input passes through ResNet, producing deep feature map $C_4$.
  2. Stage 1 (Region Proposal Network - RPN): A small 3x3 sliding window slides over feature maps, outputting top ~2,000 candidate regions likely to contain objects.
  3. RoI Align (Region of Interest Alignment): Extracts fixed $7 \times 7$ feature vectors for each candidate region using precise bilinear interpolation.
  4. Stage 2 (Full Classification Head): Fully connected layers classify each candidate box and refine final $(x, y, w, h)$ coordinates.

How One-Stage (YOLO) Achieves Real-Time Speed

YOLO divides the image into an $S \times S$ grid (e.g. $80 \times 80, 40 \times 40, 20 \times 20$).

If an object's center falls into a grid cell, that grid cell is responsible for predicting its bounding box offsets and class probabilities.

Because the entire image is processed in a single unified tensor operation, GPUs execute YOLO at 100+ frames per second!

Say this out loud

Two-stage detectors (Faster R-CNN) use a Region Proposal Network (RPN) in Stage 1 to generate candidate boxes before classifying them in Stage 2, achieving high accuracy at lower FPS. One-stage detectors (YOLO) evaluate bounding boxes and class scores simultaneously across a dense grid in a single forward pass, enabling real-time 60+ FPS processing for autonomous vehicles and live video feeds.

Follow-ups to expect

Check yourself

Question 1 of 3

What is the main architectural difference between Two-Stage (Faster R-CNN) and One-Stage (YOLO) object detectors?

More in Computer Vision

See all →
Image Augmentation Strategies5 minResizing, Normalization & Colour Spaces4 minResNet, EfficientNet & Friends5 min