segment-anything-model

Segment any object in images using point, box, or mask prompts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a solution for zero-shot image segmentation, allowing users to segment any object in images without task-specific training.

Core Features & Use Cases

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

Quick Start

Use the segment-anything-model skill to segment objects in the attached image 'example.jpg' using a point 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 perform zero-shot image segmentation without task-specific training?

Zero-shot image segmentation allows you to segment any object in images without task-specific training. By using the Segment Anything Model, you can generate object masks by providing simple prompts like points, bounding boxes, or previous masks.

What types of prompts can I use for interactive image annotation with SAM?

For interactive image annotation with the Segment Anything Model, you can use points, bounding boxes, or previous masks as prompts. This flexible prompting allows precise object segmentation across various image domains.

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

Yes, you need PyTorch and Transformers installed to run the Segment Anything Model. Specifically, the environment requires the segment-anything library, transformers>=4.30.0, and torch>=1.7.0 to execute the segmentation scripts properly.

Can I automatically generate all object masks in an image without manual prompts?

Yes, you can automatically generate all object masks in an image without manual prompts. The Segment Anything Model supports automatic segmentation, producing high-quality masks trained on over a billion mask annotations.

What is the best way to deploy image segmentation models on edge devices and browsers?

The best way to deploy image segmentation models on edge devices and browsers is through ONNX export. The Segment Anything Model supports ONNX export, allowing you to run zero-shot segmentation in constrained environments.

Which model size should I choose for zero-shot image segmentation?

For zero-shot image segmentation, you can choose between ViT-B, ViT-L, and ViT-H models. ViT-B is the fastest for quick processing, while ViT-H offers the highest accuracy for demanding segmentation tasks.