einarolafsson/live-cell-segmentation-cpsam
Light-microscopy cell segmentation (Cellpose-SAM fine-tune, epoch 37)
Cellpose-SAM cpsam_v2 fine-tuned on transmitted-light microscopy -- phase contrast, brightfield, DIC and quantitative phase -- from 14 public datasets. Built for spaCR.
Read this first
It does not beat stock cpsam_v2 overall, and it missed the bar set before it was scored.
Both are true because of LIVECell: it is 1020 of the 2,199 test fields and the densest by far, so it dominates the pooled score -- and it is the one large dataset stock Cellpose-SAM was itself trained on (5% of its samples, per the Cellpose-SAM paper's Methods; see training/WHAT_STOCK_CPSAM_HAS_SEEN.md). Stock's LIVECell score is partly memorisation, and this model loses 0.053 there.
Use it for brightfield, DIC, quantitative phase, and phase contrast from instruments other than the Incucyte. Do not use it in place of stock on LIVECell-style Incucyte phase contrast, where stock is better.
The pre-registered bar, and the result
Fixed at 11:47 on 2026-09-21, before any test score existed (training/PROMOTION_BAR.md): overall F1 +0.02 over stock; no modality losing more than 0.02; no dataset losing more than 0.05. All three were missed -- overall -0.044, phase -0.046, LIVECell -0.053. Published anyway, as the bar said it would be.
Test set, by modality
Test set, by dataset
Revvity is not a real +0.80. Stock scores 0.000 on all 22 Revvity fields, which are the only RGB images in the set; stock almost certainly mishandles the three-channel input. Both models were given identical input, but that row should not be read as a finding.
Train, valid and test
The train figure is higher, but the samples differ in make-up -- valid and test are about half LIVECell, the train sample is spread evenly -- so the gap is not purely overfitting.
There is no per-epoch loss curve. The trainer writes losses when a run ends and neither run ended: the first was stopped at epoch 30 to free the GPU, the second was ended by a machine reboot. Epoch 37 is the last checkpoint written. This is stated rather than reconstructed.
Data
einarolafsson/live-cell-segmentation-dataset -- 11,007 fields, 6,778 train / 2,030 valid / 2,199 test, split by acquisition so no well, dish or time-lapse spans two sets.
Contents
weights/live_cell_v1-- epoch-37 weightstraining/-- splits, manifest, run records, the pre-registered bar and its addendaqc/-- per-field test scores for this model and stock, side-by-side by dataset and modality
Use with spaCR
from huggingface_hub import hf_hub_download
from spacr.core import preprocess_generate_masks
w = hf_hub_download("einarolafsson/live-cell-segmentation-cpsam", "weights/live_cell_v1")
preprocess_generate_masks({"src": "/path/to/plate", "custom_model": w})Recipe: base cpsam_v2, lr 1e-5, batch 4, bsize 256, mintrainmasks 1, weight decay 0.1, cellpose 4.2.1.1, RTX 3090. Non-commercial: LIVECell and Revvity-25 are CC BY-NC.
