Hi, I want to use torchvision.models.detection.maskrcnn_resnet50_fpn
I have a use case of two classes (and background), so I’m invoking it with arguments pretrained=False, num_classes=3, pretrained_backbone=True.
My questions are:


If the backbone is pretrained, does this mean I need to transform my input images to have the same distribution as the images that the original model was trained on?
1.1 If so, how do I use it? What are the means and the std’s? Do I need to transform the data before forwarding, during the dataset creation (as with the PyTorch ResNet FCN model for semantic segmentation, pretrained on ImageNet, with mean = [0.485, 0.456,0.406] and std = [0.229, 0.224, 0.225]), or do I need to pass arguments image_mean, image_std to the MaskRCNN class?


From the docs,




boxes ( FloatTensor[N, 4] ): the ground-truth boxes in [x1, y1, x2, y2] format, with values between 0 and H and 0 and W



Shouldn’t it be H - 1 and W - 1?

From the docs,



masks ( UInt8Tensor[N, H, W] ): the segmentation binary masks for each instance


By binary mask the meaning is a matrix of zeros, and ones where the mask of instance exists? If so, why do we need to also pass boxes? Maybe I misunderstood, but can’t the boxes be calculated by the minimal and maximal coordinates of ones, per dimension? And also, wouldn’t it be safer to be a Boolean tensor?
Thanks.