n.models.detection.MaskRCNN_ResNet50_FPN_V2_Weights` below for more details, and possible values. By default, no pre-trained weights are used. progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. num_classes (int, optional): number of output classes of the model (including the background) weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for the backbone. trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from final block. Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. If ``None`` is passed (the default) this value is set to 3. **kwargs: parameters passed to the ``torchvision.models.detection.mask_rcnn.MaskRCNN`` base class. Please refer to the `source code `_ for more details about this class. .. autoclass:: torchvision.models.detection.MaskRCNN_ResNet50_FPN_V2_Weights :members: NrB