I'm trying to understand R-CNN, but I'm a bit lost in the first stage (region proposal). Correct me if I'm wrong, but as far as I understand, there is an algorithm that proposes regions in the image that may have an object. Then, these regions are resized (to the input size of the CNN) and features are extracted with a CNN. Finally, these features are analyzed and classified with an SVM.
How does this region proposal algorithm work? And how is the size of these proposed regions calculated?