Instance Segmentation - MATLAB & Simulink (original) (raw)

Main Content

Perform instance segmentation using pretrained deep learning networks and train networks using transfer learning on custom data

Instance segmentation is a computer vision technique that plays a crucial role in tasks requiring precise object localization and the identification of individual object instances, such as in medical imaging and autonomous driving. By combining the principles of object detection and semantic segmentation, instance segmentation provides a more refined understanding of visual data by identifying individual object instances and delineating their boundaries pixel by pixel. Use instance segmentation to precisely identify, classify, and separate individual objects within an image.

You can run inference on an image using a pretrained deep learning network, or train a network using transfer learning. Transfer learning is an approach in which you start with a pretrained network and train it on a custom data set for your application. You can interactively generate ground truth data for training by using the Image Labeler, Video Labeler, or Ground Truth Labeler (Automated Driving Toolbox) app to label pixels and export label data. Instance segmentation requires Deep Learning Toolbox™. Training and inference support CUDA® enabled GPU. Use of a GPU is recommended, and requires Parallel Computing Toolbox™. For more information, see Parallel Computing Support in MathWorks Products (Parallel Computing Toolbox).

Instance segmentation using SOLOv2: Left — segmented and labeled road scenario using a sample modified RGB image from the CamVid data set, Right — segmented image of PVC pipe connectors

Functions

expand all

Configure Instance Segmentation Network

solov2 Segment objects using SOLOv2 instance segmentation network (Since R2023b)
maskrcnn Detect objects using Mask R-CNN instance segmentation (Since R2021b)

Perform Inference

segmentObjects Segment objects using Mask R-CNN instance segmentation (Since R2021b)
segmentObjects Segment objects using SOLOv2 instance segmentation (Since R2023b)

Load Training Data

Train Instance Segmentation Networks

trainSOLOV2 Train SOLOv2 network to perform instance segmentation (Since R2023b)
trainMaskRCNN Train Mask R-CNN network to perform instance segmentation (Since R2022a)

Augment and Preprocess Training Data

posemaskrcnn Predict object pose using Pose Mask R-CNN pose estimation (Since R2024a)
predictPose Estimate object pose using Pose Mask R-CNN deep learning network (Since R2024a)
trainPoseMaskRCNN Train Pose Mask R-CNN network to perform pose estimation (Since R2024a)

Topics

Get Started

Train Data for Instance Segmentation