Writing
Deep Learning — Object Detection (2)
Fast R-CNN, Faster R-CNN, SPP, RPN, and the evolution of R-CNN-family detectors.
Preface: R-CNN detects objects but slowly (~0.03 fps). Fast R-CNN and Faster R-CNN improve speed and accuracy.
Fast R-CNN
Main contribution: accelerate R-CNN. Improvements: 1) SPP-inspired simplified ROI pooling (not full pyramid) plus proposal mapping for backprop, fixing SPP training;
What is SPP?
Spatial Pyramid Pooling—paper: Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
- Goal: handle variable feature map sizes; robust multi-scale pooling improves recognition. Before FC layers, pyramid pooling splits each feature map into 1, 4, and 16 regions → 21 maps per image.

- Multi-task loss: SoftmaxLoss replaces SVM; SmoothL1Loss for bbox regression; classification and regression merged for end-to-end training.
-
Fast R-CNN framework

-
vs R-CNN: ROI pooling after last conv (lite SPP-NET); multi-task loss. R-CNN had three training stages; Fast R-CNN uses softmax and joint bbox loss—mostly end-to-end (except selective search proposals). Fine-tunes some conv layers. Summary: merges R-CNN and SPP-NET with multi-task loss. Weakness: selective search proposals dominate runtime (~2–3s vs 0.32s feature+classify); not fully end-to-end.
Faster R-CNN
Fully end-to-end.
- End-to-end: input to output inside the deep net. On Fast R-CNN, RPN replaces selective search for proposals.
RPN
Convolutional sliding windows produce proposals; anchors at each position (3 scales × 3 ratios = 9). Classify foreground/background and regress boxes—FCN-style.

RPN is FCN, trained end-to-end for proposals. Two extra conv layers (cls and reg) on CNN.
① Encode each feature map location as a vector (256d ZF, 512d VGG).
② Per location: objectness + bounds for k proposals (9 anchors).
Input can be any size (with min resolution, e.g. VGG 228×228). With VGG16: VGG16+RPN.
-
Faster R-CNN structure

-
Training anchors: drop cross-boundary; IoU>0.7 foreground, <0.3 background; two FC heads per anchor; keep ~300; alternate training: 1) init w, train RPN 2) RPN proposals train Fast R-CNN, update w 3) repeat until convergence.
R-CNN Evolution

More: blog