Skip to content
module

Faster R-CNN

5 members
lucid.models.vision.faster_rcnn

Faster R-CNN — object detection (Ren et al., NeurIPS 2015).

Paper: "Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks"

ResNet-50-FPN reference configuration (Lin et al., CVPR 2017 FPN) with a COCO-pretrained checkpoint.

Object Detection
Paper

Ren, Shaoqing, et al. "Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks." Advances in Neural Information Processing Systems, 2015.

Overview

Faster R-CNN removes the last hand-engineered component of the R-CNN family — the external selective-search proposal step — by introducing a Region Proposal Network (RPN) that shares convolutional features with the detection head.

The RPN is a small fully-convolutional network that slides over the backbone feature map. At every spatial position it evaluates kk reference boxes called anchors (the paper uses k=9k = 9 from 3 scales × 3 aspect ratios) and emits two heads:

  • Objectness — a 2k2k-dim softmax classifying each anchor as foreground or background.
  • Box regression — a 4k4k-dim parameterised offset t=(tx,ty,tw,th)t = (t_x, t_y, t_w, t_h) refining anchors toward ground-truth boxes.

Anchors with IoU ≥0.7\ge 0.7 against any GT are positive; ≤0.3\le 0.3 are negative. The multi-task loss is

L({pi},{ti})=1Ncls∑iLcls(pi,pi∗)+λ 1Nreg∑ipi∗ Lreg(ti,ti∗).L(\{p_i\}, \{t_i\}) = \tfrac{1}{N_{\mathrm{cls}}} \sum_i L_{\mathrm{cls}}(p_i, p_i^*) + \lambda \, \tfrac{1}{N_{\mathrm{reg}}} \sum_i p_i^* \, L_{\mathrm{reg}}(t_i, t_i^*).

Top-scoring proposals (after NMS) replace selective search completely. The same backbone then feeds the Fast R-CNN head, so the entire detector is end-to-end trainable. With a VGG-16 trunk the whole pipeline runs at ≈5 fps while matching or exceeding selective-search Fast R-CNN accuracy — a milestone that established two-stage anchor-based detection as the dominant paradigm and seeded all later FPN / Mask R-CNN / Cascade R-CNN extensions.

Classes

Functions

Weights