segment-anything-model

Segment images from points, boxes, or masks with Meta AI's SAM.

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

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 allows for zero-shot image segmentation, meaning it can segment any object in images without the need for task-specific training.

Core Features & Use Cases

  • Zero-shot Segmentation: Automatically segment any object in images without fine-tuning.
  • Flexible Prompts: Supports point, bounding box, or previous mask prompts for segmentation.
  • Automatic Segmentation: Generate all object masks automatically from the image.
  • High Quality Models: Trained on 1.1 billion masks from 11 million images.
  • Model Variants: Multiple model sizes for varying performance and speed requirements.
  • ONNX Export: Export the model for deployment in browsers and edge devices.
  • Use Cases: Ideal for interactive annotation tools, training data generation for vision models, and object detection/segmentation pipelines.

Quick Start

Download the required checkpoint, install dependencies, and run the SamPredictor to predict object masks for your image.

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 segmenting any object in images without fine-tuning. By using Meta AI's Segment Anything Model, you can generate object masks directly from points, bounding boxes, or previous masks without needing specific annotations.

What do I need to run image segmentation with points and bounding boxes?

To run image segmentation with points and bounding boxes, you need PyTorch, NumPy, transformers version 4.30.0 or higher, and torch version 1.7.0 or higher. After installing these dependencies, download the required checkpoint and use SamPredictor to predict object masks.

How to generate multiple object masks automatically from an image?

To generate multiple object masks automatically from an image, use the automatic segmentation feature of the Segment Anything Model. This functionality processes the entire image to produce all available object masks without requiring manual point or bounding box prompts.

Can I export the image segmentation model for edge devices and browsers?

Yes, you can export the image segmentation model for edge devices and browsers. The Segment Anything Model supports ONNX export, allowing you to deploy the trained model directly in browser environments and on edge hardware.

When should I use point prompts versus automatic segmentation for image processing?

Use point prompts or bounding boxes for targeted image segmentation of specific objects, and use automatic segmentation to generate all object masks from an image at once. Point prompts offer interactive control, while automatic mode processes the entire scene without manual input.

What are the limitations of zero-shot image segmentation?

Limitations of zero-shot image segmentation include dependency on large model sizes for varying performance and speed requirements. While it eliminates task-specific training, users must still manage substantial computational overhead and download large checkpoints trained on 1.1 billion masks.