Agent skill

Segmentation Sam2

by SharpAI in SharpAI/DeepCamera

Interactive click-to-segment using Segment Anything 2 — AI-assisted labeling for Annotation Studio

MITAuto-check passedAI & LLM Engineering

Install Segmentation Sam2

skills CLI
$ npx skills add SharpAI/DeepCamera --skill segmentation-sam2 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SharpAI/DeepCamera segmentation-sam2 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SharpAI/DeepCamera.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/segmentation/sam2-segmentation .claude/skills/segmentation-sam2 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
segmentation-sam2
GitHub stars
3.1k
Token cost
~594 tokens
SKILL.md length
97 words
Files
5 (incl. scripts)
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Interactive click-to-segment using Segment Anything 2 — AI-assisted labeling for Annotation Studio

  • Tasks that involve Computer vision
  • SKILL.md covers What You Get, Protocol and Installation
  • Runs Batch, Shell and Python scripts from its folder

What it does

Segmentation Sam2 is an agent skill from SharpAI/DeepCamera. Interactive click-to-segment using Segment Anything 2 — AI-assisted labeling for Annotation Studio

Its SKILL.md is about 590 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `deploy.sh` and `scripts/segment.py`).

It sits in AI & LLM Engineering, covering Computer vision. It works with Python. The repository describes itself as: Open-Source AI Camera Skills Platform, AI NVR & CCTV Surveillance. Local VLM video analysis with Qwen, DeepSeek, SmolVLM, LLaVA, YOLO26. LLM-powered agentic security camera agent… The licence is MIT.

When your agent uses it

  • Tasks that involve Computer vision

Example prompts

  • “/segmentation-sam2”

Requirements

  • Python 3
  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit 933dcc7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Batch, Shell and Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Segmentation Sam2 loads about 594 tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 97 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~594

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from SharpAI/DeepCamera at commit 933dcc7, republished under its MIT licence (© SharpAI). 97 words, ~594 tokens.

Download SKILL.mdSave it as .claude/skills/segmentation-sam2/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
segmentation-sam2
description
Interactive click-to-segment using Segment Anything 2 — AI-assisted labeling for Annotation Studio
version
1.0.0
entry
scripts/segment.py
deploy
deploy.sh

SAM2 Interactive Segmentation

Click anywhere on a video frame to segment objects using Meta's Segment Anything 2. Generates pixel-perfect masks for annotation, tracking, and dataset creation.

What You Get

  • Click-to-segment — click on any object to get its mask
  • Point & box prompts — positive/negative points and bounding box selection
  • Video tracking — segment in one frame, propagate across the clip
  • Annotation Studio — full integration with sidebar Annotation Studio

Protocol

Communicates via JSON lines over stdin/stdout.

Aegis → Skill (stdin)
jsonl
{"event": "frame", "frame_path": "/tmp/frame.jpg", "frame_id": "frame_1", "request_id": "req_001"}
{"command": "segment", "points": [{"x": 450, "y": 320, "label": 1}], "request_id": "req_002"}
{"command": "track", "frame_path": "/tmp/frame2.jpg", "frame_id": "frame_2", "request_id": "req_003"}
{"command": "stop"}
Skill → Aegis (stdout)
jsonl
{"event": "segmentation", "type": "ready", "request_id": "", "data": {"model": "sam2-small", "device": "mps"}}
{"event": "segmentation", "type": "encoded", "request_id": "req_001", "data": {"frame_id": "frame_1", "width": 1920, "height": 1080}}
{"event": "segmentation", "type": "segmented", "request_id": "req_002", "data": {"mask_path": "/tmp/mask.png", "mask_b64": "...", "score": 0.95, "bbox": [100, 50, 350, 420]}}
{"event": "segmentation", "type": "tracked", "request_id": "req_003", "data": {"frame_id": "frame_2", "mask_path": "/tmp/track.png", "score": 0.93}}

Installation

The deploy.sh bootstrapper handles everything — Python environment, GPU detection, dependency installation, and model download. No manual setup required.

bash
./deploy.sh

© SharpAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts) in skills/segmentation/sam2-segmentation of SharpAI/DeepCamera.

  • SKILL.md
  • deploy.bat
  • deploy.sh
  • requirements.txt
  • scripts/segment.py

Open the folder on GitHubat commit 933dcc7

Compare with similar skills

Segmentation Sam2 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Segmentation Sam2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Segmentation Sam2 this skillSharpAI/DeepCamera3.1k—~594Automated safety check: PassMIT
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k9 repos~3.3kAutomated safety check: PassMIT
CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs13k8 repos~1.7kAutomated safety check: PassMIT
LLaVA Vision-Language ModelOrchestra-Research/AI-Research-SKILLs13k7 repos~2kAutomated safety check: PassMIT
Hugging Face Vision Trainerhuggingface/skills11k1 repos~7.5kAutomated safety check: PassApache-2.0
Hugging Face Transformers Usagedavila7/claude-code-templates32k12 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 9 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 8 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • LLaVA Vision-Language Model

    Orchestra-Research/AI-Research-SKILLs

    Guide to LLaVA for image chat, visual question answering and captioning, with model sizes, CLI and Gradio usage and multi-turn conversation code.

    13k GitHub starsUsed in 7 repos~2k tokens
    AI & LLM EngineeringAuto-check passed
  • Hugging Face Vision Trainer

    huggingface/skills

    Official

    Trains and fine-tunes object detection, image classification and SAM or SAM2 segmentation models on Hugging Face Jobs cloud GPUs and saves the results to the Hub.

    11k GitHub starsUsed in 1 repo~7.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Hugging Face Transformers Usage

    davila7/claude-code-templates

    Loads pre-trained Hugging Face Transformers models for text, vision and audio tasks, runs inference with pipelines and fine-tunes on custom datasets.

    32k GitHub starsUsed in 12 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Inference And Results

    VectorSpaceLab/AREX-Skill

    Use this sub-skill for Ultralytics YOLO predict workflows, source handling, streaming and batching, Results extraction, saving/plotting/cropping, and thread-safe inference.

    328 GitHub stars~1.4k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from SharpAI/DeepCamera

All 15 skills in this repo
  • Dataset Annotation

    SharpAI/DeepCamera

    AI-assisted dataset annotation with COCO export — bbox, SAM2, DINOv3 methods

    3.1k GitHub stars~705 tokensUpdated 21 days ago
    Auto-check passed
  • Depth Estimation

    SharpAI/DeepCamera

    Real-time depth map privacy transforms using Depth Anything v2 (CoreML + PyTorch)

    3.1k GitHub stars~945 tokensUpdated 21 days ago
    Auto-check passed
  • Yolo Detection 2026

    SharpAI/DeepCamera

    YOLO 2026 — state-of-the-art real-time object detection. An agent skill from SharpAI/DeepCamera.

    3.1k GitHub stars~1.5k tokensUpdated 21 days ago
    Auto-check passed
  • Google Coral Edge TPU — real-time object detection natively (macOS / Linux)

    3.1k GitHub stars~1.2k tokensUpdated 21 days ago
    Auto-check passed
  • Google Coral Edge TPU — real-time object detection natively via Windows WSL

    3.1k GitHub stars~1.1k tokensUpdated 21 days ago
    Auto-check passed
  • OpenVINO — real-time object detection via Docker (NCS2, Intel GPU, CPU)

    3.1k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Works with

Questions about Segmentation Sam2

What does Segmentation Sam2 do?

Interactive click-to-segment using Segment Anything 2 — AI-assisted labeling for Annotation Studio. Segmentation Sam2 is an agent skill from SharpAI/DeepCamera.

When should I use Segmentation Sam2?

Segmentation Sam2 fits situations like: tasks that involve Computer vision.

How do I install Segmentation Sam2 in Claude Code?

Run `npx skills add SharpAI/DeepCamera --skill segmentation-sam2 -a claude-code`. Or copy the skill folder (skills/segmentation/sam2-segmentation in SharpAI/DeepCamera) into .claude/skills/segmentation-sam2 in your project. Claude Code loads it when a task matches its description.

How do I install Segmentation Sam2 in Codex?

Run `npx skills add SharpAI/DeepCamera --skill segmentation-sam2 -a codex`. Or copy the skill folder (skills/segmentation/sam2-segmentation in SharpAI/DeepCamera) into .agents/skills/segmentation-sam2 in your project. Codex loads it when a task matches its description.

Can I use Segmentation Sam2 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SharpAI/DeepCamera --skill segmentation-sam2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/segmentation-sam2, .gemini/skills/segmentation-sam2, .github/skills/segmentation-sam2 and .opencode/skills/segmentation-sam2 in your project.

What does Segmentation Sam2 need to run?

Going by SKILL.md and its folder, Segmentation Sam2 needs Windows cmd, a shell and Python for the scripts in its folder. Our summary lists: Python 3; A Bash shell.

Does Segmentation Sam2 access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Segmentation Sam2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Segmentation Sam2 use?

Segmentation Sam2 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Segmentation Sam2 use?

About 594 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Segmentation Sam2?

Skills that share tags, products or a category with Segmentation Sam2: Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars), CLIP Image-Text Matching (Orchestra-Research/AI-Research-SKILLs, 13k stars), LLaVA Vision-Language Model (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Hugging Face Vision Trainer (huggingface/skills, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Segmentation Sam2?

SharpAI (a GitHub organization) maintains it in SharpAI/DeepCamera, which has 3,089 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 17, 2026.

Source: SharpAI/DeepCamera on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.