Image Processing Toolbox Model for Segment Anything Model 2

Pre-trained Segment Anything Model 2 for instance segmentation
18 Downloads
Updated 15 Oct 2025
Image Processing Toolbox™ Model for Segment Anything Model 2 provides pretrained SAM2 models for visually prompted instance segmentation. These models can segment objects in an image using prompts such as foreground points, background points, and bounding boxes.
Through the support package, users can choose from the following four pretrained SAM2 models:
  • sam2-large
  • sam2-baseplus
  • sam2-small
  • sam2-tiny
For guidance on getting started with both interactive and automated segmentation workflows, please refer to the official documentation, which includes examples.
MATLAB Release Compatibility
Created with R2026a
Compatible with R2026a
Platform Compatibility
Windows macOS (Apple Silicon) macOS (Intel) Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!