Skip to content
cccskills
FreePublished on GitHub

segmentation-sam2

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

The English summary is being prepared. Showing the original description.

See how to install

Files included (5)

  • SKILL.md2.3 KB
  • deploy.bat6.0 KB
  • deploy.sh5.5 KB
  • requirements.txt138 B
  • scripts/segment.py16.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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)

{"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)

{"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.

./deploy.sh

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Dataset annotation management — COCO labels, sequences, export, and Kaggle upload

The English summary is being prepared. Showing the original description.

SharpAI/DeepCamera3.1KUpdated Sep 17, 2026

Eufy camera integration — local RTSP streaming and event clips

The English summary is being prepared. Showing the original description.

SharpAI/DeepCamera3.1KUpdated Sep 17, 2026

Reolink camera integration — RTSP and HTTP API

The English summary is being prepared. Showing the original description.

SharpAI/DeepCamera3.1KUpdated Sep 17, 2026

TP-Link Tapo camera integration — RTSP streaming and ONVIF

The English summary is being prepared. Showing the original description.

SharpAI/DeepCamera3.1KUpdated Sep 17, 2026

LINE messaging channel for Clawdbot agent

The English summary is being prepared. Showing the original description.

SharpAI/DeepCamera3.1KUpdated Sep 17, 2026

Matrix/Element messaging channel for Clawdbot agent

The English summary is being prepared. Showing the original description.

SharpAI/DeepCamera3.1KUpdated Sep 17, 2026

See all skills by SharpAI

Report a problem with this skill