实例分割
Computer Vision Toolbox™ 中的实例分割工具支持您检测、分类和分割图像中的单个目标,即使多个目标相互重叠也可以。您可以首先使用图像标注器和视频标注器创建标注真实值,它们支持使用多边形或矩形 ROI 对目标实例进行交互式和 AI 辅助注解。有关详细信息,请参阅Label Objects Using Polygons for Instance Segmentation。
工具箱提供了预训练实例分割网络,如 SOLOv2 和 Mask R-CNN。您可以直接使用这些模型进行推断,或通过迁移学习将其适配到特定应用。有关详细信息,请参阅Get Started with Instance Segmentation Using Deep Learning和Get Started with SOLOv2 for Instance Segmentation。对于类别无关的实例分割,工具箱通过 imsegsam 函数和 segmentAnythingModel 目标支持分割一切模型 (SAM)。
为了准备训练数据,工具箱提供了用于管理和组织数据集以及数据增强和预处理的实用工具。有关详细信息,请参阅Postprocess Exported Labels for Instance Segmentation Training。
使用预训练或自定义模型生成预测结果后,您可以评估实例分割性能,并生成有关分割准确性、目标级精确率以及不同目标大小下性能表现的详细分析结果。这些度量有助于评估掩膜预测和边界框定位的质量。有关详细信息,请参阅 evaluateInstanceSegmentation。
工具箱还支持利用 Pose Mask R-CNN 框架,通过实例分割实现三维目标位姿估计,从而能够对目标的朝向和结构进行细粒度分析。有关详细信息,请参阅Perform 6-DoF Pose Estimation for Bin Picking Using Deep Learning。

函数
主题
快速入门
- Get Started with Instance Segmentation Using Deep Learning
Segment objects using an instance segmentation model such as SOLOv2 or Mask R-CNN. - Get Started with SOLOv2 for Instance Segmentation
Perform multiclass instance segmentation using SOLOv2 and deep learning. - Getting Started with Mask R-CNN for Instance Segmentation
Perform multiclass instance segmentation using Mask R-CNN and deep learning. - Get Started with Segment Anything Model for Image Segmentation
Perform interactive image segmentation using Segment Anything Model 2 (SAM 2) and deep learning.
为实例分割创建真实值
- Label Objects Using Polygons for Instance Segmentation
Label ground truth objects using polygons for instance segmentation. - Postprocess Exported Labels for Instance Segmentation Training
Postprocess exported ground truth labels and create training datastore for training instance segmentation networks such as SOLOv2 or Mask R-CNN.
为实例分割准备训练数据
- Create Instance Segmentation Training Data From Ground Truth
This example shows how to create instance segmentation training data from agroundTruthobject. - Get Started with Image Preprocessing and Augmentation for Deep Learning
Preprocess data for deep learning applications with deterministic operations such as resizing, or augment training data with randomized operations such as random cropping. - Datastores for Deep Learning (Deep Learning Toolbox)
Learn how to use datastores in deep learning applications.







