RoI pooling converts each proposed feature-map region into the same small shape, allowing one prediction head to process proposals uniformly. section 8.4.1
Within Faster R-CNN, the operation fits into this sequence:
- A backbone produces a multi-channel feature map from the image. section 8.4.1
- The region proposal network identifies feature-map regions that may contain objects. section 8.4.1
PyTorch shape normalization
A compact implementation uses nn.AdaptiveMaxPool2d((7, 7)), followed by nn.Flatten(), a hidden nn.Linear layer, and a final classifier. This gives every proposal the same downstream representation size.

