Skip to main content
QUICK REVIEW

[Paper Review] A Foundation Model for Cell Segmentation

Uriah Israel, Markus Marks|arXiv (Cornell University)|Nov 18, 2023
Cell Image Analysis TechniquesBiochemistry, Genetics and Molecular Biology7 citations
TL;DR

This paper introduces CellSAM, a foundation model for cell segmentation that leverages the Segment Anything Model (SAM) with a novel prompt engineering pipeline using an object detector, CellFinder, to generate accurate instance masks. The approach achieves state-of-the-art performance across diverse cellular imaging domains—mammalian cells, yeast, and bacteria—without task-specific fine-tuning, enabling zero-shot generalization and integration into human-in-the-loop labeling workflows.

ABSTRACT

Cells are the fundamental unit of biological organization, and identifying them in imaging data - cell segmentation - is a critical task for various cellular imaging experiments. While deep learning methods have led to substantial progress on this problem, models that have seen wide use are specialist models that work well for specific domains. Methods that have learned the general notion of "what is a cell" and can identify them across different domains of cellular imaging data have proven elusive. In this work, we present CellSAM, a foundation model for cell segmentation that generalizes across diverse cellular imaging data. CellSAM builds on top of the Segment Anything Model (SAM) by developing a prompt engineering approach to mask generation. We train an object detector, CellFinder, to automatically detect cells and prompt SAM to generate segmentations. We show that this approach allows a single model to achieve state-of-the-art performance for segmenting images of mammalian cells (in tissues and cell culture), yeast, and bacteria collected with various imaging modalities. To enable accessibility, we integrate CellSAM into DeepCell Label to further accelerate human-in-the-loop labeling strategies for cellular imaging data. A deployed version of CellSAM is available at https://label-dev.deepcell.org/.

Motivation & Objective

  • To develop a generalizable cell segmentation model that performs well across diverse cellular imaging modalities and species.
  • To address the limitation of specialist models that require domain-specific design and hyperparameter tuning.
  • To reduce the marginal cost of cell labeling by enabling efficient human-in-the-loop annotation through automated, high-accuracy predictions.
  • To create a foundation model for cell segmentation that learns a general representation of 'what is a cell' across biological contexts.
  • To integrate the model into DeepCell Label for practical deployment in biological imaging pipelines.

Proposed method

  • CellSAM uses CellFinder, a modified Anchor DETR object detector, to predict bounding boxes for cells in input images.
  • These bounding boxes are used as prompts to infer segmentation masks via the Segment Anything Model (SAM), leveraging SAM’s prompt-based mask decoder.
  • A three-stage inference thresholding pipeline is applied: 0.4 for CellFinder’s confidence, 0.5 for SAM’s IoU prediction head, and 0.5 for sigmoid activation of mask logits.
  • Postprocessing includes hole filling and island removal to refine individual cell masks, following SAM’s standard procedure.
  • The model is trained end-to-end using self-supervised pretraining on diverse cellular images, followed by supervised fine-tuning on labeled datasets.
  • The framework is deployed in DeepCell Label, enabling rapid, interactive labeling by correcting model predictions rather than labeling from scratch.
Figure 1: CellSAM: a foundational model for cell segmentation. CellSAMcombines SAM’s mask generation and labeling capabilities with an object detection model to achieve automated inference. Input images are divided into regularly sampled patches and passed through a transformer encoder (e.g., a ViT)
Figure 1: CellSAM: a foundational model for cell segmentation. CellSAMcombines SAM’s mask generation and labeling capabilities with an object detection model to achieve automated inference. Input images are divided into regularly sampled patches and passed through a transformer encoder (e.g., a ViT)

Experimental results

Research questions

  • RQ1Can a single foundation model generalize across diverse cellular imaging domains, including mammalian tissues, cell cultures, yeast, and bacteria?
  • RQ2How does prompt-based inference using a detector-generated bounding box compare to zero-shot prompting in terms of segmentation accuracy?
  • RQ3To what extent can a foundation model reduce the marginal cost of cell labeling in human-in-the-loop workflows?
  • RQ4Does the proposed pipeline achieve state-of-the-art performance on benchmark datasets across multiple species and imaging modalities?
  • RQ5Can the model be deployed effectively in real-world biological imaging pipelines with minimal domain-specific adaptation?

Key findings

  • CellSAM achieves state-of-the-art performance on multiple benchmark datasets spanning mammalian cells, yeast, and bacteria, outperforming specialist models like Cellpose across all domains.
  • The model demonstrates strong zero-shot generalization, achieving high F1 scores without fine-tuning on new datasets, with performance maintained across diverse imaging modalities.
  • CellSAM-specific and CellSAM-general variants both outperform baseline models on all evaluation metrics, including recall, precision, and F1, across all tested datasets.
  • The integration of CellSAM into DeepCell Label enables faster, more efficient human-in-the-loop labeling, reducing labeling cost by accelerating correction of model predictions.
  • The model achieves mAP of 0.85 and AP50 of 0.92 on the CellFinder detector, indicating strong object detection performance essential for prompt generation.
  • Postprocessing steps (hole filling and island removal) significantly improved mask quality, reducing false positives and fragmented predictions.
Figure 2: CellSAM is a strong generalist model for cell segmentation. a) For training and evaluating CellSAM, we curated a diverse cell segmentation dataset from the literature. The number of annotated cells is given for each data type. Nuclear refers to a heterogeneous dataset (DSB) [ 51 ] containi
Figure 2: CellSAM is a strong generalist model for cell segmentation. a) For training and evaluating CellSAM, we curated a diverse cell segmentation dataset from the literature. The number of annotated cells is given for each data type. Nuclear refers to a heterogeneous dataset (DSB) [ 51 ] containi

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.