Recently, I was reading Pytorch's official tutorial about Mask R-CNN.
When I run the code on colab, it turned out that it automatically outputs a different number of channels during prediction. If the image has 2 people on it, it would output a mask with the shape
2xHxW. If the image has 3 people on it, it would output the mask with the shape
How does Mask R-CNN change the channels? Does it have a
for loop inside it?
My guess is that it has region proposals and it outputs masks based on those regions, and then it thresholds them (it removes masks that have low probability prediction). Is this right?