Generalist cell instance segmentation on a microscopy Image with Cellpose-SAM. The sink resolves the projection: mask-plus-box pairs, masks, boxes, parallel arrays, a merged Mask, a UInt64 count, or a colourised label Image.
Typical backends
Count cells in a slide and emit the instance records as JSON.
Segment cells per video frame and overlay them for review.
Caveats
- I/O contractThe output arm is a single downstream-resolved choice fixed at deploy time; every arm reprojects the same detected instances, so masks, boxes and the colourised image stay consistent. Fan into separate instances for more than one arm.
- AccuracyMasks are class-agnostic, so every instance carries class id zero with a confidence of one; the model distinguishes cells from background but assigns no biological class.
- Parameter interactionA zero
diameter runs the built-in size estimator before segmentation; set it to the typical cell width in pixels to skip estimation and stabilise results when the scale is known.
- Parameter interactionThe flow-error threshold, the cell-probability threshold and the minimum mask size jointly control how aggressively borderline pixels and tiny masks are kept or discarded, trading recall against spurious fragments.
- CompatibilityThe default model downloads on first use, so a cold container needs outbound network before the first frame unless the weights are pre-seeded; a fine-tuned checkpoint can be selected through the model-kind setting instead.
- State lifetimeThe model and all configuration are captured once at startup; changing any setting requires a redeploy.