segment-anything-model

Generate object masks from prompts or automatically across images.

1.2k|116|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/math-inc/OpenGauss --skill segment-anything-model-math-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-anything-model
Source: https://github.com/math-inc/OpenGauss/tree/main/skills/mlops/models/segment-anything
Command: npx skills add https://github.com/math-inc/OpenGauss --skill segment-anything-model-math-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Segment Anything Model provides zero-shot image segmentation to generate object masks from prompts or automatically across diverse images, enabling rapid annotation and analysis without task-specific training.

Core Features & Use Cases

  • Zero-shot segmentation: segment any object in an image using prompts like points, boxes, or masks.
  • Interactive prompts: supports point, box, or previous mask prompts for precise control.
  • Automatic mask generation: generate multiple masks from a single image for data annotation pipelines.
  • Model variants and deployment: offers ViT-H/L/B variants and export options for deployment (e.g., ONNX).
  • Use cases: annotation tools, dataset creation, medical imaging, satellite imagery, and rapid prototyping in CV research.

Quick Start

Install the segment-anything package and run a basic segmentation example following the quick start steps.

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 generates object masks from prompts without task-specific training. Segment Anything Model accepts interactive point, box, or mask prompts to isolate objects across diverse images instantly.

What is the best way to automate dataset generation and annotation for computer vision?

Automated dataset generation uses automatic mask generation to extract multiple object masks from a single image. This creates annotated datasets rapidly, supporting pipelines for annotation tools and research.

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

Yes, running Segment Anything Model requires dependencies including torch>=1.7.0 and transformers>=4.30.0. You also need to install the segment-anything package to execute the segmentation workflows.

Can I export the Segment Anything Model for ONNX deployment?

Yes, Segment Anything Model supports export options for deployment including ONNX. It offers ViT-H, ViT-L, and ViT-B model variants to balance performance and resource constraints during inference.

Does zero-shot image segmentation work for medical and satellite imagery?

Zero-shot image segmentation applies to medical imaging and satellite imagery. The model segments unfamiliar visual data without task-specific training, enabling rapid prototyping across computer vision tasks.