segment-anything-model

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

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/LynxLabVN/office-agent --skill segment-anything-model-lynxlabvn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-anything-model
Source: https://github.com/LynxLabVN/office-agent/tree/main/agent-core/skills/mlops/models/segment-anything
Command: npx skills add https://github.com/LynxLabVN/office-agent --skill segment-anything-model-lynxlabvn

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 solves the problem of segmenting any object in images without the need for task-specific training, allowing for zero-shot image segmentation.

Core Features & Use Cases

  • Zero-shot Segmentation: Automatically segment objects 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 to segment objects in an image by providing the image file 'example.jpg' and selecting the object you want to segment with a point or bounding box.

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 is achieved by using the Segment Anything Model (SAM) to automatically segment objects in images without fine-tuning. It supports point, bounding box, or mask prompts to isolate regions.

How does zero-shot image segmentation work with point and box prompts?

Zero-shot image segmentation uses point, bounding box, or previous mask prompts to identify target objects within an image. The Segment Anything Model (SAM) processes these prompts to generate accurate object masks without requiring task-specific training.

Can I use the Segment Anything Model for automatic object detection and mask generation?

Yes, the Segment Anything Model (SAM) supports automatic segmentation to generate all object masks within an image automatically. It applies to interactive annotation, data generation, and object detection pipelines without requiring manual prompts.

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

Yes, running the Segment Anything Model requires installing the segment-anything library alongside compatible Python libraries, specifically transformers>=4.30.0 and torch>=1.7.0, to execute the underlying deep learning operations.

Can I export the Segment Anything Model for deployment on edge devices?

Yes, the Segment Anything Model supports ONNX export, allowing you to deploy the zero-shot segmentation models in browsers and on edge devices. This enables flexible inference outside of standard Python environments.

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

Zero-shot segmentation offers three model sizes: ViT-B for the fastest processing, ViT-L for a balanced approach, and ViT-H for the highest accuracy. Choose based on your specific computational resources and precision requirements.