segment-anything-model

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

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/handsomelong922/my-codex-skills --skill segment-anything-model-handsomelong922
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: segment-anything-model
Source: https://github.com/handsomelong922/my-codex-skills/tree/main/skills/segment-anything
Command: npx skills add https://github.com/handsomelong922/my-codex-skills --skill segment-anything-model-handsomelong922

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Segment Anything Model (SAM) provides zero-shot image segmentation to identify and extract object masks without task-specific training, accelerating labeling, annotation workflows, and data preparation across diverse domains.

Core Features & Use Cases

  • Zero-shot segmentation for any object in an image, enabling flexible annotation workflows.
  • Flexible prompts: points, bounding boxes, or previous masks to iteratively refine results.
  • Automatic mask generation with multi-scale processing, quality metrics, and model variants (ViT-B/L/H) for various accuracy/speed needs.
  • Easy integration with downstream pipelines and deployment options, including ONNX exports.

Quick Start

Install Segment Anything, load a predictor, and provide prompts to generate masks.

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 extracts object masks without task-specific training by using flexible prompts like points or bounding boxes. This accelerates annotation workflows and data preparation across diverse domains like photography and medical imaging.

What types of prompts can I use to refine object masks in an image?

To refine object masks, you can use points, bounding boxes, or previous masks as interactive prompts. This allows iterative refinement of segmentation results to accurately extract target objects from images.

Can I automatically generate multiple object masks for scalable scene understanding?

Automatic mask generation supports scalable scene understanding by producing multi-scale masks with quality metrics. You can select from model variants like ViT-B, ViT-L, or ViT-H to balance accuracy and processing speed.

Does zero-shot segmentation work for preprocessing pipelines across different domains?

Zero-shot segmentation works for preprocessing pipelines across diverse domains such as satellite imagery and medical imaging. It integrates easily with downstream pipelines and supports deployment options including ONNX exports.

What is the best way to accelerate data labeling and annotation workflows?

The best way to accelerate data labeling is using zero-shot image segmentation to identify and extract object masks. It bypasses task-specific training, enabling flexible annotation workflows and rapid data preparation.

When should I not use zero-shot prompts for image segmentation?

You should not use zero-shot prompts for image segmentation when your task requires highly specialized, domain-specific accuracy that relies on extensive task-specific training rather than generalizable zero-shot mask extraction.