Region of Interest Heads
The components of the Region of Interest Heads perform the second stage in the object detection architecture that Detectron2 implements. Figure 4.10 illustrates the steps inside this stage.
Figure 4.11: The Region of Interest Heads
Specifically, this stage takes the features extracted from the backbone network and the ground-truth bounding boxes (if training) and performs the following steps:
- Label and sample proposals (if training).
- Extract box features.
- Perform predictions.
- Calculate losses (if training).
- Perform inferences (if inferencing).
If it is training, out of the 2,000 proposals (POST_NMS_TOPK_TRAIN
), there can be many negative proposals compared to those positive ones (especially at the early stage of the training when the RPN is not accurate yet). Similar to the RPN stage, this step also labels (based on ground truth) and samples another mini-batch with a fraction of positive proposals...