Another doubt inside RPN() here
self.bbox_pred = nn.Conv2d(in_channels, num_anchors * 4, kernel_size=1, stride=1)

Here why are we doing ‘num_anchors * 4’?
from where is this 4 coming?
whereas in detectron2, in the RPN it is defined as
self.anchor_deltas = nn.Conv2d(
            in_channels, num_cell_anchors * box_dim, kernel_size=1, stride=1
        )

here its “num_cell_anchors * box_dim”
(detectron2/rpn.py at 5e2a1ecccd228227c5a605c0a98d58e1b2db3640 · facebookresearch/detectron2 · GitHub)
I don’t know whats happening here.