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
- Region proposal: a separate, non-neural algorithm (Selective Search) generates roughly 2,000 candidate object regions per image.
- Feature extraction: each of these ~2,000 regions is individually cropped, resized, and passed separately through a CNN to extract features.
- 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
| Advantages | Limitations |
|---|---|
| First successful combination of region proposals with CNN features, a major accuracy leap over prior methods | Extremely slow โ ~2,000 separate CNN forward passes per image |
| Established the two-stage detection paradigm still influential today | Training 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?