๐Ÿ”ฅLimited Offer: Get 50% OFFon AI & Full Stack Courses๐Ÿ”ฅ
Back to Deep Learning Notes
Topic #199

R-CNN

R-CNN (Regions with CNN features, 2014) was the first architecture to successfully combine region proposals with CNN-based classification for object detection โ€” establishing the two-stage detection paradigm, at the cost of being extremely slow.

The Problem It Solved

Before R-CNN, object detection relied heavily on hand-engineered features and sliding-window classifiers โ€” exhaustively checking every possible location and scale in an image was both computationally expensive and produced comparatively weak features. R-CNN asked: what if a separate, cheaper algorithm first proposed a much smaller set of likely object regions, and only those were run through a (much more powerful) CNN?

The Three-Step Pipeline

  1. Region proposal: a separate, non-neural algorithm (Selective Search) generates roughly 2,000 candidate object regions per image.
  2. Feature extraction: each of these ~2,000 regions is individually cropped, resized, and passed separately through a CNN to extract features.
  3. Classification: each region's extracted features are classified (e.g. with an SVM) into an object class or background.

The Fatal Flaw: Extreme Slowness

Running the CNN separately for each of ~2,000 proposed regions, per image, means the same image's overlapping regions get redundantly re-processed by the CNN over and over โ€” R-CNN could take tens of seconds per image, making it entirely impractical for any real-time or large-scale use. This single bottleneck is exactly what Fast R-CNN, covered next, was designed to eliminate.

Advantages and Limitations

AdvantagesLimitations
First successful combination of region proposals with CNN features, a major accuracy leap over prior methodsExtremely slow โ€” ~2,000 separate CNN forward passes per image
Established the two-stage detection paradigm still influential todayTraining required multiple separate stages (CNN fine-tuning, SVM training, box regression), not end-to-end

Use Cases

R-CNN itself is purely of historical interest today โ€” its successors (Fast R-CNN, Faster R-CNN) fixed its core inefficiency almost immediately and are what's actually used in any modern two-stage detector.

Common Mistakes

  • Assuming R-CNN's core idea (region proposals + CNN classification) was flawed โ€” the idea itself was sound and influential; the specific implementation's redundant per-region CNN passes were the fixable bottleneck.

Interview Relevance

Q: "What made the original R-CNN so slow, and what was the key insight that fixed it?" R-CNN ran a full CNN forward pass separately for each of roughly 2,000 proposed regions per image, with massive redundant computation across overlapping regions. Fast R-CNN's key insight was to run the CNN just once per whole image, then extract per-region features from that single shared feature map โ€” eliminating the redundant computation entirely.

Practice Question

Roughly how many separate CNN forward passes does R-CNN perform per image, and why is that number so costly?

Want to go beyond the notes?

Join CodingNow 2.0's Deep Learning course โ€” live mentorship, real projects, and 100% placement support.

Enroll Now โ€” Free Demo Available

R-CNN โ€“ FAQs

Quick answers about learning R-CNN in Deep Learning.

This free note from CodingNow 2.0 explains R-CNN in Deep Learning โ€” concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every Deep Learning topic on CodingNow 2.0, including R-CNN, is 100% free with no signup required.
With focused practice, most students grasp R-CNN in 1โ€“3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) โ€” expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now