segment-anything-model

Generate zero-shot segmentation masks from point or bounding box prompts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Segment Anything Model (SAM) eliminates the need for task-specific training by letting you generate accurate object masks from simple prompts, so you can quickly isolate regions of interest in images.

Core Features & Use Cases

  • Zero-shot image segmentation: Produce masks for objects without dataset-specific annotation or fine-tuning.
  • Prompt-driven control: Use point, bounding box, previous mask, or automatic mask generation to match your workflow.
  • Model variant options & deployment paths: Choose ViT-B/L/H tradeoffs and support exporting to ONNX for broader environments.
  • Use Case: You want to build a semi-automated annotation tool where a user clicks a point (or draws a box) and SAM returns candidate masks for fast review and refinement.

Quick Start

Use the segment-anything-model skill to generate zero-shot masks for an image by providing a point prompt and selecting the highest-scoring mask.

Frequently Asked Questions about segment-anything-model

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

FAQPage Schema
How do I generate zero-shot image segmentation masks without training data?

Zero-shot image segmentation masks are generated by prompting the Segment Anything Model with points or bounding boxes to isolate arbitrary objects without dataset-specific fine-tuning. You provide a prompt, and the model returns candidate masks for immediate review and refinement.

Can I use interactive point and bounding box prompts for image annotation?

Interactive annotation is supported by accepting point, bounding box, or previous mask prompts. This allows you to click or draw a box on an image, prompting the model to return candidate masks for fast semi-automated annotation workflows.

What is the best way to automatically mask all objects in an image?

Automatic object masking is handled by the SamAutomaticMaskGenerator. It processes a static image to produce segmentation masks for all detected objects, eliminating the need for manual point or bounding box prompts during inference.

Does SAM support exporting to ONNX for deployment in other environments?

ONNX export is supported for deploying the Segment Anything Model in broader environments. You can choose from ViT-B, ViT-L, or ViT-H model variants and convert them to ONNX format outside of the standard PyTorch inference pipeline.

How do I prepare images for SAM inference?

Images must be prepared in RGB format before running deterministic inference through SamPredictor or SamAutomaticMaskGenerator. This preprocessing step ensures the input matches the model's expected channel ordering for accurate zero-shot segmentation.