mask_rcnn_model {fastai}R Documentation

MaskRCNN model

Description

MaskRCNN model implemented by torchvision.

Usage

mask_rcnn_model(
  num_classes,
  backbone = NULL,
  remove_internal_transforms = TRUE,
  pretrained = TRUE
)

Arguments

num_classes

Number of classes.

backbone

Backbone model to use. Defaults to a resnet50_fpn model.

remove_internal_transforms

The torchvision model internally applies transforms like resizing and normalization, but we already do this at the ‘Dataset' level, so it’s safe to remove those internal transforms.

pretrained

Argument passed to 'maskrcnn_resnet50_fpn' if 'backbone is NULL'. By default it is set to TRUE: this is generally used when training a new model (transfer learning). 'pretrained = FALSE' is used during inference (prediction) for cases where the users have their own pretrained weights. **mask_rcnn_kwargs: Keyword arguments that internally are going to be passed to 'torchvision.models.detection.mask_rcnn.MaskRCNN'.

Value

model


[Package fastai version 2.2.2 Index]