segment-anything-model

Generate object masks from point or box prompts using Segment Anything Model.

2|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/AlexiosBluffMara/mercury --skill segment-anything-model-alexiosbluffmara
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-anything-model
Source: https://github.com/AlexiosBluffMara/mercury/tree/main/skills/mlops/models/segment-anything
Command: npx skills add https://github.com/AlexiosBluffMara/mercury --skill segment-anything-model-alexiosbluffmara

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Segment objects in images by applying the Segment Anything Model (SAM) to generate precise masks from prompts.

Core Features & Use Cases

  • Zero-shot segmentation: segment any object with point, box, or mask prompts without task-specific training.
  • Interactive annotation: accelerate labeling workflows and dataset creation for computer vision.
  • Flexible deployment: supports single-image and batch processing, with multiple model sizes and ONNX export options.

Quick Start

Run SAM to segment objects in an image using prompts like points or boxes.

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 image masks from prompts without training a model?

Zero-shot image segmentation uses the Segment Anything Model to generate precise masks from point, box, or mask prompts without task-specific training. This accelerates interactive annotation and dataset preparation for computer vision workflows.

Can I use SAM for batch processing multiple images?

Yes, the Segment Anything Model supports both single-image and batch processing to generate masks. This flexible deployment capability scales interactive labeling and dataset creation across computer vision tasks.

What do I need to run zero-shot image segmentation with SAM?

To run zero-shot image segmentation, you need the segment-anything library, transformers>=4.30.0, and torch>=1.7.0. These dependencies load models, handle prompts, and produce masks for computer vision workflows.

Does the Segment Anything Model support ONNX export?

Yes, the Segment Anything Model includes ONNX export options for flexible deployment. This allows you to integrate zero-shot image segmentation and mask generation into broader computer vision preprocessing pipelines.

What is the best way to automate image annotation for dataset generation?

Using zero-shot image segmentation with the Segment Anything Model accelerates interactive annotation and dataset creation. By applying point, box, or mask prompts, you can automatically generate precise masks for computer vision tasks.