segment-anything-model

Segment objects in images using point, box, or mask prompts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires segment-anything, transformers, torch, opencv-python, pycocotools, matplotlib, onnxruntime, onnx, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables you to automatically segment any object in images, simplifying complex image processing tasks.

Core Features & Use Cases

  • Zero-shot Image Segmentation: Works on any image domain without fine-tuning.
  • Flexible Prompts: Use points, bounding boxes, or previous masks for segmentation.
  • Automatic Mask Generation: Generate all object masks automatically.
  • High Quality: Trained on 1.1 billion masks from 11 million images.
  • Multiple Model Sizes: Fastest, medium, and most accurate model sizes available.
  • ONNX Export: Deploy models in browsers and edge devices.
  • Use Cases: Ideal for interactive annotation tools, training data generation, object detection/segmentation pipelines, and medical/satellite imaging.

Quick Start

Install the skill with 'pip install segment-anything'. To use, load a model with 'model = sam_model_registry["vit_h"]' and generate masks with 'masks, scores, logits = predictor.predict(...)'.

Frequently Asked Questions about segment-anything-model

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

FAQPage Schema
How do I automatically generate object masks for image segmentation without fine-tuning?

Automatic mask generation works by applying zero-shot image segmentation to any image domain without fine-tuning, using advanced deep learning techniques trained on 1.1 billion masks.

Can I use bounding boxes and points as prompts for image segmentation?

Flexible prompts for image segmentation include points, bounding boxes, or previous masks, allowing interactive annotation and object detection pipelines across various image processing scenarios.

How do I export deep learning models for edge devices using ONNX?

ONNX export deploys deep learning models in browsers and edge devices using onnxruntime, converting trained image segmentation models for lightweight inference environments.

Does this image segmentation approach work for medical and satellite imaging?

Zero-shot image segmentation applies to medical and satellite imaging scenarios, processing these specialized image domains without requiring additional fine-tuning or domain-specific training.

What deep learning frameworks are needed for zero-shot image segmentation?

Zero-shot image segmentation requires deep learning frameworks including torch and transformers, alongside specific libraries like opencv-python and pycocotools for image processing.

What are the limitations of zero-shot image segmentation?

Zero-shot image segmentation relies on predefined model sizes for speed and accuracy trade-offs, requiring substantial computational resources for the most accurate model trained on 11 million images.