maskrcnn
Description
The maskrcnn object performs instance segmentation of objects in
an image using a Mask R-CNN (regions with convolution neural networks) object detector. To
detect objects in an image, pass the trained detector to the segmentObjects
function.
Note
This function requires the Computer Vision Toolbox™ Model for Mask R-CNN Instance Segmentation. You can install the Computer Vision Toolbox Model for Mask R-CNN Instance Segmentation from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons. To run this function, you will require the Deep Learning Toolbox™.
Creation
Syntax
Description
detector = maskrcnn("resnet50-coco") loads a pretrained Mask
R-CNN object detector trained on the COCO data set with a ResNet-50 network as the feature
extractor.
detector = maskrcnn("resnet50-coco",classNames) creates a
pretrained Mask R-CNN object detector and configures it to perform transfer learning using
a specified set of object classes. The classNames argument sets the
ClassNames property. For optimal
results, train the detector on new training images before performing detection.
detector = maskrcnn("resnet50-coco",classNames,anchorBoxes)
creates a pretrained Mask R-CNN object detector and configures it to perform transfer
learning using a specified set of object classes and anchor boxes. The
classNames argument sets the ClassNames property. The anchorBoxes
argument sets the AnchorBoxes property.
detector = maskrcnn(___,
uses name-value arguments to specify ROI pooling sizes or to set the Name=Value)ModelName or InputSize properties. Specify name-value arguments in addition
to the input arguments from any of the previous syntaxes.
For example, maskrcnn("resnet50-coco",classNames,anchorBoxes,PoolSize=[11
11]) specifies the ROI pooling size for the detection head as 11-by-11
pixels.
Name-Value Arguments
Properties
Object Functions
forward | Run forward pass on Mask R-CNN network |
segmentObjects | Segment objects using Mask R-CNN instance segmentation |
Examples
Version History
Introduced in R2021b
