Segment Anything for Cell Tracking

Zhu Chen, Mert Edgü, Er Jin, Johannes Stegmaier

Introduction

Cell tracking in time-lapse microscopy is a fundamental task for understanding biological phenomena, ranging from embryonic development to the progression of complex diseases. Despite its importance, the field faces significant computational hurdles. Microscopy images often suffer from low signal-to-noise ratios, high cell density, and the biological complexity of mitosis (cell division), which creates "splitting" events in tracking lineages.

While deep learning has advanced the state-of-the-art, most current high-performance methods are supervised. These models require extensive, manually annotated datasets that are difficult to produce. Furthermore, microscopy data is highly heterogeneous; a model trained on fluorescence imaging rarely generalizes to phase-contrast or differential interference contrast (DIC) microscopy. This research introduces a zero-shot framework that leverages the Segment Anything 2 (SAM2) foundation model to provide a generalizable, unsupervised solution for cell tracking that works "out of the box."

Methodology

The proposed framework addresses the varying computational demands of microscopy through two distinct pipelines tailored to data dimensionality.

1. 2D and Small-scale 3D Datasets (Linking-only)

For 2D sequences, the authors utilize a backward-propagation strategy. The algorithm begins at the final frame and moves toward the initial frame. This approach leverages the relative stability of end-state cell detections to reconstruct lineages. For each cell, the system crops a local patch and employs SAM2 to predict the mask in the preceding frame ($t-1$). To ensure precision, the model uses a multi-prompt strategy combining a bounding box with both positive (on-target) and negative (background) point prompts. Mitosis is detected when two distinct masks in frame $t$ are linked to a single mask in frame $t-1$.

2. Large-scale 3D+t Datasets (Simultaneous Tracking & Segmentation)

To handle the massive data volume of 3D time-lapse sequences (which can contain thousands of cells per frame), the authors developed a forward-propagating pipeline. This method integrates SAM-Med3D, a foundation model specialized for medical volumetric data.

Initial "rough" masks are generated using traditional methods like watershed segmentation, which are then refined by SAM-Med3D. For tracking, the framework utilizes the SAM2 memory encoder to extract high-level visual features. Rather than relying solely on spatial overlap, the system calculates the cosine similarity between the feature vectors of a cell in frame $t$ and potential candidates in $t+1$. The candidate with the highest similarity score is assigned the link, allowing for robust tracking even in dense environments.

Experimental Results

The framework was evaluated on 13 blind test datasets from the Cell Tracking Challenge (CTC), spanning various imaging modalities including Brightfield, DIC, and Fluorescence.

Performance and Generalization

The zero-shot approach achieved a top-3 ranking in Linking Accuracy (LNK) on average across all 13 datasets. Notably, on the large-scale 3D dataset Fluo-N3DL-TRIF, the method achieved a Tracking Accuracy (TRA) of 0.921, outperforming several fully supervised models specifically trained for that task. This demonstrates that the internal "memory features" of SAM2—originally trained on natural videos—are sufficiently robust to distinguish between visually similar biological cells.

Efficiency

Computational efficiency is a key advantage of this local-processing approach. Tracking a sequence of 200 frames with approximately 100 cells per frame requires roughly one hour on a single consumer-grade GPU (NVIDIA RTX 4090). By parallelizing the processing of individual lineages and avoiding global optimization bottlenecks, the method scales effectively to gigabyte-scale 3D data.

Discussion and Limitations

While the framework shows remarkable zero-shot capabilities, certain challenges remain. The pipeline is sensitive to temporal resolution; if cells move significantly between frames or if the imaging interval is too large, the tracking may fail. The authors suggest that integrating motion prediction models could mitigate this.

Furthermore, because the method processes lineages locally to maintain memory efficiency, it lacks the "global view" provided by methods like Integer Linear Programming (ILP). This can result in lower Biological Accuracy (BIO) scores, as the model is more susceptible to identity switches or trajectory breakpoints over very long sequences. Future work will focus on incorporating "life cycle prediction" to better model cell behavior beyond simple spatial movement and division.

Summary updated

BibTeX
@inproceedings{chen2025segment,
  author = {Zhu Chen and Mert Edgü and Er Jin and Johannes Stegmaier},
  title = {{Segment Anything for Cell Tracking}},
  booktitle = {MedAGI},
  year = {2025},
  doi = {10.1007/978-3-032-07845-2\_2},
}
Figure