sam-cell-seg

Segment cells in images using MobileSAM and SAM, then convert masks to polygons.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Zurybr/lefarma-skills --skill sam-cell-seg-zurybr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sam-cell-seg
Source: https://github.com/Zurybr/lefarma-skills/tree/main/letta/benchmarks/trajectory-only/sam-cell-seg
Command: npx skills add https://github.com/Zurybr/lefarma-skills --skill sam-cell-seg-zurybr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of segmenting cells in images using advanced AI models like SAM and MobileSAM, converting raw segmentation masks into usable polygon data.

Core Features & Use Cases

  • AI-powered Segmentation: Utilizes SAM/MobileSAM for precise cell or object segmentation.
  • Mask Refinement: Cleans and refines initial segmentation masks.
  • Polygon Extraction: Converts segmentation masks into vector polygon coordinates.
  • Use Case: Process microscopy images to automatically identify and outline individual cells, exporting their boundaries as polygons for further analysis in a GIS or CAD tool.

Quick Start

Use the sam-cell-seg skill to segment cells in the provided image file 'cell_sample.png' and output the results as polygons.

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 segmentation masks to polygons for cell images?

To convert segmentation masks to polygons for cell images, this skill provides guidance on extracting vector polygon coordinates from raw segmentation masks output by SAM or MobileSAM models.

Can I use MobileSAM to segment cells in microscopy images?

Yes, you can use MobileSAM to segment cells in microscopy images by integrating the deep learning segmentation model into your processing scripts to automatically identify and outline individual cells.

What is the best way to refine initial cell segmentation masks?

The best way to refine initial cell segmentation masks is to apply the mask refinement techniques provided by this skill, which cleans and processes raw SAM outputs into precise cell boundaries.

How do I process CSV-based coordinate data for SAM image segmentation?

You can process CSV-based coordinate data for SAM image segmentation by integrating the coordinate inputs into your SAM-based image segmentation pipeline to guide the mask generation and polygon extraction process.

Does this SAM segmentation pipeline output vector data for GIS or CAD tools?

Yes, the SAM segmentation pipeline outputs vector polygon coordinates representing cell boundaries, which can be exported and directly used for further spatial analysis in GIS or CAD tools.