torchvision.models.detection.faster_rcnn — Torchvision 0.8 ...
pytorch.org/vision/0.8/_modules/torchvision/models/detection/faster_rcnn.htmldef fasterrcnn_resnet50_fpn (pretrained = False, progress = True, num_classes = 91, pretrained_backbone = True, trainable_backbone_layers = 3, ** kwargs): """ Constructs a Faster R-CNN model with a ResNet-50-FPN backbone. The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each image, and should be in ``0-1`` range. Different images can have ...
torchvision.models.detection.mask_rcnn — Torchvision main ...
https://pytorch.org/.../torchvision/models/detection/mask_rcnn.htmlExample:: >>> model = torchvision.models.detection.maskrcnn_resnet50_fpn(pretrained=True) >>> model.eval() >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] >>> predictions = model(x) >>> >>> # optionally, if you want to export the model to ONNX: >>> torch.onnx.export(model, x, "mask_rcnn.onnx", opset_version = 11) Args: pretrained (bool): If True, returns a model pre-trained on …