sam-cell-seg

Convert SAM-based binary cell segmentation masks into polygon coordinates via CLI.

134|21|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/letta-ai/skills --skill sam-cell-seg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sam-cell-seg
Source: https://github.com/letta-ai/skills/tree/main/ai/benchmarks/letta/terminal-bench-2/trajectory-feedback/sam-cell-seg
Command: npx skills add https://github.com/letta-ai/skills --skill sam-cell-seg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill offers guidance for SAM (Segment Anything Model) based cell segmentation, mask processing, and polygon conversion, enabling automated analysis of microscopy images without manual delineation.

Core Features & Use Cases

  • SAM segmentation: Utilize MobileSAM or SAM models for initial cell segmentation.
  • Mask-to-polygon conversion: Convert binary masks into polygon coordinates suitable for downstream analysis.
  • CLI-driven pipelines: Build command-line tools to process CSV coordinate data and integrate with inference workflows.

Quick Start

Example: Run the sam-cell-seg workflow on input images to generate a JSON of polygon coordinates for each detected cell.

Frequently Asked Questions about sam-cell-seg

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

FAQPage Schema
How do I convert SAM segmentation masks to polygon coordinates for cell analysis?

Mask-to-polygon conversion transforms binary segmentation masks from SAM or MobileSAM models into polygon coordinates suitable for downstream analysis. This Skill automates that conversion and outputs coordinates in CSV format for integration into microscopy workflows.

Can I use MobileSAM for cell segmentation in a CLI pipeline?

Yes. This Skill provides CLI-driven pipelines that leverage MobileSAM or SAM models for automated cell segmentation in microscopy images, eliminating manual delineation and enabling batch processing of images through command-line interfaces.

What's the workflow for processing microscopy images into cell polygon data?

Run SAM-based segmentation on input microscopy images to generate binary masks, convert those masks to polygon coordinates, and export the results as CSV or JSON containing coordinate lists for each detected cell.

Does this Skill handle CSV coordinate data processing and export?

Yes. The Skill processes CSV coordinate data with data-type consistency and precise formatting, ensuring output coordinates align with downstream analysis tools and maintain compatibility across inference workflows.

When should I use mask-to-polygon conversion instead of working directly with masks?

Polygon coordinates are required when downstream analysis needs precise cell boundaries, integration with annotation tools, or format compatibility with geospatial or statistical analysis pipelines that consume coordinate lists rather than raster masks.