segment-anything-model

Segment objects in images using Meta AI's Segment Anything Model.

Updated May 3, 2026
One-click install
npx skills add https://github.com/eliottbusiness/DeptFlow-Agent --skill segment-anything-model-eliottbusiness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-anything-model
Source: https://github.com/eliottbusiness/DeptFlow-Agent/tree/main/profile/skills/mlops/models/segment-anything
Command: npx skills add https://github.com/eliottbusiness/DeptFlow-Agent --skill segment-anything-model-eliottbusiness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires segment-anything, transformers>=4.30.0, torch>=1.7.0, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows for zero-shot image segmentation, enabling users to segment any object in images without specific training.

Core Features & Use Cases

  • Zero-shot Segmentation: Segment any object in images without task-specific training.
  • Flexible Prompts: Use points, bounding boxes, or previous masks as prompts.
  • Automatic Segmentation: Automatically generate all object masks.
  • High Quality: Trained on 1.1 billion masks from 11 million images.
  • Multiple Model Sizes: Choose from ViT-B (fastest), ViT-L, and ViT-H (most accurate).
  • ONNX Export: Deploy in browsers and edge devices.
  • Use Cases: Building interactive annotation tools, generating training data for other vision models, zero-shot transfer to new image domains, building object detection/segmentation pipelines, processing medical, satellite, or domain-specific images.

Quick Start

Use the 'segment-anything-model' skill to segment objects in the 'input.jpg' image.

Frequently Asked Questions about segment-anything-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform zero-shot image segmentation without task-specific training?

Zero-shot image segmentation is performed using Meta AI's Segment Anything Model to segment objects without specific training. You can provide point or box prompts to isolate regions automatically.

Can I use bounding boxes and points as prompts for image segmentation?

Yes, image segmentation supports flexible prompts including points, bounding boxes, or previous masks. This enables interactive annotation and precise object isolation within your images.

Do I need PyTorch and Transformers to run the Segment Anything Model?

Yes, running the Segment Anything Model requires PyTorch (version 1.7.0 or higher) and Transformers (version 4.30.0 or higher). These dependencies provide the necessary backend for executing image segmentation pipelines.

What's the best way to automatically generate all object masks in an image?

Automatically generating all object masks is best done using the automatic segmentation feature of the Segment Anything Model. It processes images to identify and outline distinct objects without requiring manual prompts.

Does the Segment Anything Model support ONNX export for edge devices?

Yes, the Segment Anything Model supports ONNX export for deployment in browsers and edge devices. This enables running zero-shot segmentation pipelines directly within lightweight environments.

Which model size should I choose for balancing speed and accuracy in object detection?

For object detection, the Segment Anything Model offers ViT-B for fastest processing, ViT-L for balance, and ViT-H for highest accuracy. Choose based on your specific latency and precision requirements.