I'm having some trouble understanding the way the Faster R-CNN algorithm works. Specifically, the way the authors describe the concept of anchors.

In their paper from here they describe anchors in the following way:

At each sliding-window location, we simultaneously predict multiple region proposals, where the number of maximum possible proposals for each location is denoted as k. So the reg layer has 4k outputs encoding the coordinates of k boxes, and the cls layer outputs 2k scores that estimate probability of object or not object for each proposal. The k proposals are parameterized relative to k reference boxes, which we call anchors. An anchor is centered at the sliding window in question, and is associated with a scale and aspect ratio (Figure 3, left). By default we use 3 scales and 3 aspect ratios, yielding k = 9 anchors at each sliding position. For a convolutional feature map of a size W × H (typically ∼2,400), there are W Hk anchors in total.

I can't wrap my head around this. How do you incorporate the fixed scales (128x128, 256x256, 512x512) and aspect ratios (1x1, 1x2, 2x1) (which they mention later), into this, when they also predict the bounding box with its parameters x, y, width and height in the reg layer for each anchor?

  • $\begingroup$ The k (9) anchors of fixed sizes and scales are the inputs of the reg layer, and for each anchor it regresses an output bounding box (a proposal). This is done for every location in the image downsampled by the anchors' x and y stride (to avoid doing that operation on each pixel). $\endgroup$ – Mat Jun 24 '19 at 20:09

Your Answer

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

Browse other questions tagged or ask your own question.