2
$\begingroup$

I am trying to implement Region Proposal Networks, as have been described in the original Faster R-CNN paper. One thing which is not very clear is how to generate the region proposals (the anchors). So, for a single feature on the feature map, where the RPN module slides a small window, we assign $k$ anchor boxes of different sizes to this feature. My question is, to where exactly. The paper says:

An anchor is centered at the sliding window in question, and is associated with a scale and aspect ratio

This sounds very ambiguous to me. I think of two possible alternatives:

1) For each feature in the last feature map, we back-project the feature into the original image, so it corresponds to the center of its receptive field in the original input space . (We would require some receptive field arithmetic as described in https://medium.com/syncedreview/a-guide-to-receptive-field-arithmetic-for-convolutional-neural-networks-42f33d4378e0) So, we can directly compare the anchors with the ground truth boxes in the original input space, calculate IoUs and regress them. This looks to me as the correct way to do it, since the anchors can have sizes like $512^2$ which are too large for the last convolutional layer after numerous downsamplings.

2)For a given image, we project the ground truth boxes in the original image onto the last feature map. We execute regression here as well. This sounds to me more unlikely, since the anchor boxes will be way too large compared to the projected ground truth boxes in the final layer.

My question is which of these approaches are true for generating region proposals? If both are wrong, what is the correct way then?

$\endgroup$
1
$\begingroup$

As per my understanding, the first approach is correct. Here, one needs to understand thwo topics:

  • Intersection over Union(IoU); it is used for understanding accuracy of the proposed region.
  • How to extract region proposals from an image.

Intersection over Union(IoU) IoU is a metric that helps in understanding accuracy of the proposed regions. In the image below 1, the red box is proposed region ( predicted bounding box) for an object(a stop sign), and the green box is the actual region (ground truth). Thus, IoU here is the ratio of the interseaction over the union of the two boxes i.e. the region proposed and the ground truth.
enter image description here enter image description here

Reference:

1 https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.