I'm reading based on this article: https://tryolabs.com/blog/2018/01/18/faster-r-cnn-down-the-rabbit-hole-of-modern-object-detection as well as this YouTube video: https://www.youtube.com/watch?v=X3IlbjQs190
I'm confused as to how anchors have anything to do with how the RPN works. In the article it mentions that the RPN network takes in the feature map obtained from the base network as input and applies a 3x3 convolution over it, obtaining a layer with 512 channels. I'm guessing the height and width of this layer should be around 14x14, since applying a 3x3 convolution shouldn't change the dimensions by that much. And then this layer is connected to two independent layers with a 1x1 convolution over the 512 channels layer, yielding one layer with a size of 4k (where k is the number of anchors) corresponding to the center locations and the dimensions per anchor and one layer with a size of 2k corresponding to the probability that each anchor is background or foreground.
I don't understand how applying a 1x1 convolution over a multidimension array gives a scalar (as the loss is computed with the last 1x1 convolutional layer) and nowhere does the article mention that there are any fully connected layers. Also, I don't understand where anchors come into play, as the RPN simply just does operations on the input feature map.