segment-anything-model

Automate zero-shot image segmentation with the Segment Anything Model.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/vikrant-project/devil-agent-ai-platform --skill segment-anything-model-vikrant-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-anything-model
Source: https://github.com/vikrant-project/devil-agent-ai-platform/tree/main/agent_core/skills/mlops/models/segment-anything
Command: npx skills add https://github.com/vikrant-project/devil-agent-ai-platform --skill segment-anything-model-vikrant-project

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 manually segmenting objects in images, allowing users to programmatically generate masks for any object in images without specific training.

Core Features & Use Cases

  • Zero-shot Segmentation: Segment any object in images without task-specific training.
  • Flexible Prompts: Use points, bounding boxes, or previous masks as prompts.
  • Automatic Segmentation: Automatically generate all object masks.
  • High-Quality Results: Trained on 1.1 billion masks from 11 million images for accuracy.
  • Multiple Model Sizes: Choose between fast and accurate model sizes (ViT-B, ViT-L, ViT-H).
  • ONNX Export: Deploy in browsers and edge devices for flexibility.
  • Use Case: Quickly segment the main subjects in a photo for creative editing or data extraction.

Quick Start

Load the image 'sample.jpg' and generate masks using the point prompt at coordinates [100, 150].

Frequently Asked Questions about segment-anything-model

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

FAQPage Schema
How can I automatically segment objects in images without task-specific training?

Zero-shot segmentation automates object detection and segmentation in images without specific training. The Segment Anything Model generates high-quality masks for any object using point or box prompts, trained on 1.1 billion masks for accuracy.

How do I use point or box prompts to generate image masks with SAM?

To generate image masks with SAM, provide point coordinates or bounding boxes as prompts. Load your target image and pass the prompt coordinates to the model to instantly segment the specified object without manual masking.

Does the Segment Anything Model require PyTorch and Transformers libraries for inference?

Yes, SAM requires PyTorch (>=1.7.0) and Transformers (>=4.30.0) libraries for model inference. You also need the segment-anything package installed to execute the zero-shot segmentation workflows.

Can I export the Segment Anything Model to ONNX for edge device deployment?

Yes, SAM supports ONNX export for edge device deployment. This allows you to deploy the trained image segmentation models in browsers and edge devices for flexible zero-shot inference environments.

What model sizes are available for the Segment Anything Model?

SAM offers three model sizes: ViT-B, ViT-L, and ViT-H. You can choose between fast and accurate model sizes based on your image segmentation requirements and available computational resources.

What is the best way to automatically generate all object masks in a photo?

Automatic segmentation generates all object masks in an image without requiring prompts. Use the Segment Anything Model to automatically detect and segment every object, suitable for image processing workflows and data extraction.