segment-anything-model

Produces tumor-tissue segmentations and biophysical parameter maps from MRI and CT images.

4|Updated May 18, 2026
One-click install
npx skills add https://github.com/ZardLi1115/zedclaw --skill segment-anything-model-zardli1115
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-anything-model
Source: https://github.com/ZardLi1115/zedclaw/tree/main/skills/mlops/models/segment-anything
Command: npx skills add https://github.com/ZardLi1115/zedclaw --skill segment-anything-model-zardli1115

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires segment-anything, transformers>=4.30.0, torch>=1.7.0, opencv-python, pycocotools, matplotlib, onnxruntime, onnx, pycocotools-windows, and includes references (resource) components.

What problem does it solve?

This Skill helps you generate accurate image segmentation masks without training a custom model, using only lightweight prompts like points, boxes, or prior masks.

Core Features & Use Cases

  • Zero-shot image segmentation (SAM): Produce object masks across new image domains without task-specific fine-tuning.
  • Prompt-driven control: Segment foreground/background regions using point prompts, bounding boxes, and iterative refinement with previous masks.
  • Production-friendly deployment: Export and run via ONNX, and extend workflows with advanced guides such as video segmentation (SAM 2) and text-prompting (Grounded SAM).
  • Use cases: Build interactive annotation tools, generate training data, run object extraction pipelines, and support domain imagery like medical or satellite images.

Quick Start

Ask the agent to download the ViT-H checkpoint, load SAM, and segment an image using a single foreground click prompt at coordinates (500, 375).

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 segmentation masks without training a custom model?

You can generate zero-shot image segmentation masks using prompt-based control with points, boxes, or prior masks. This approach produces object masks across new image domains without task-specific fine-tuning. It leverages SamPredictor or SamAutomaticMaskGenerator to output masks, scores, and quality metrics.

How does prompt-driven segmentation work for extracting objects from images?

Prompt-driven segmentation works by using lightweight inputs like point prompts, bounding boxes, and iterative refinement with previous masks to segment foreground and background regions. It allows interactive annotation and object extraction pipelines without custom training.

Do I need PyTorch and OpenCV to run zero-shot segmentation with SAM?

Yes, you need to install segment-anything with compatible PyTorch (version 1.7.0 or higher) and optionally transformers (version 4.30.0 or higher). OpenCV and pycocotools are also required to process inputs and handle mask output formats.

Can I export SAM masks to ONNX for production deployment?

Yes, you can export and run SAM via ONNX for production-friendly deployment. The Skill supports ONNX runtime environments, allowing you to integrate zero-shot segmentation into automated mask generation pipelines and broader workflows.

What is the best way to segment objects in medical or satellite images without annotations?

The best way is using zero-shot segmentation to generate accurate masks for domain imagery like medical or satellite images without annotations. By providing prompt-based controls such as foreground clicks or bounding boxes, you can extract target objects instantly.

Does this SAM Skill support text-prompted and video segmentation?

Yes, it provides optional extensions for text-prompted segmentation using Grounded SAM and video segmentation using SAM 2. These advanced guides expand the core zero-shot mask generation capabilities to handle multi-modal and sequential frame workflows.