Region Proposal Network
Faster R-CNN is called a two-stage technique. The first stage proposes the regions (bounding boxes) and whether an object falls within that region (objectness). Notably, at this stage, it only predicts whether an object is in the proposed box and does not classify it into a specific class. The second stage then continues to fine-tune the proposed regions and classify objects in the proposed bounding boxes into particular labels. The RPN performs the first stage. This section inspects the details of the RPN and its related components in Faster R-CNN architecture, implemented in Detectron2, as in Figure 4.6.
Figure 4.6: The Region Proposal Network and its components
Continuing from the previous code example, the following code snippet displays the RPN (proposal_generator
):
rpn = predictor.model.proposal_generator type(rpn)
This snippet should print out the following:
detectron2.modeling.proposal_generator.rpn.RPN
The following...