A region proposal, or region of interest (RoI), is a candidate image region that may contain an object. Two-stage detectors use proposals to separate “where might an object be?” from classification and bounding-box refinement. In R-CNN, selective search produces about 2,000 candidate regions per image; each is labeled positive or negative during training from its overlap with ground-truth boxes. section 11.3.1 section 11.4.4
Proposal generation moved from a separate computer-vision algorithm to a learned network. Faster R-CNN uses a region proposal network (RPN) on convolutional feature maps to predict candidate RoIs across a range of scales and aspect ratios. The RPN and the downstream Fast R-CNN detector share convolutional layers, avoiding separate backbones. section 11.3.3 section 11.4 section 11.4.4
From a proposed region to a detection
A backbone reduces an input image to a convolutional feature map. For an RoI of (0, 0, 256, 256) with subsampling factor 16, the corresponding feature-map region is (0, 0, 16, 16). RoI pooling converts regions of differing sizes into fixed-sized features, which classifier and regressor layers use to predict an object class or background and bounding-box coordinates. section 11.4.3 section 11.4
During Faster R-CNN training, proposals connect the RPN and Fast R-CNN stages. Alternate optimization repeatedly trains the RPN and detector in turn. Approximate joint training instead combines their losses in one network, treating generated proposals as fixed during the detector update; this is faster but ignores a derivative through the proposals. section 11.4.4
Figure 11.18 A conv feature map with two regions of interest of different sizes. RoI pooling extracts a fixed-sized output feature map (2 × 2 in this image) from each of the RoIs in a single pass via max pooling. This enables us to extract fixed-sized representative feature vectors for each RoI, which are then fed into further classifier and regressor layers for classification and localization.
Compare differently sized RoIs on one feature map and see how RoI pooling produces equally sized representations for the detection head. section 11.4.3

