An end-to-end pipeline that enhances a microscopy image, segments individual cell nuclei, and quantifies their morphology โ a custom OpenCV algorithm benchmarked against the Cellpose-SAM foundation model.
CellSight turns a raw microscopy tile into per-cell measurements in four stages. The live demo below runs the custom OpenCV pipeline in real time.
Correct uneven microscope illumination, boost local contrast with CLAHE, and remove sensor noise with Non-Local-Means denoising.
A custom marker-controlled watershed uses the distance transform to split even touching nuclei into separate instances โ not just a threshold mask.
For every nucleus, extract area, perimeter, eccentricity, solidity, intensity and a total cell count โ the "featurization" step.
Benchmark against ground truth with Dice, IoU and instance mAP, and compare the classical pipeline to the Cellpose-SAM foundation model.
Upload a microscopy nuclei tile (e.g. a DSB-2018 / BBBC038 image). Runs the custom OpenCV pipeline on a serverless function.
No image handy? Click Try a sample image to load a real fluorescence nuclei tile. Large images are auto-resized.
Measured on 5 real DSB-2018 tiles vs. ground truth. Cellpose-SAM (a SAM/ViT foundation model) was run offline on a free Kaggle kernel โ it needs ~2โ3 GB RAM, too heavy for a free live host, so it is reported here rather than run in the browser.
| Method | Dice | IoU | Instance mAP | Cell-count error |
|---|---|---|---|---|
| Cellpose-SAM (foundation model) | 0.889 | 0.804 | 0.482 | 6.6 |
| OpenCV watershed (custom, live here) | 0.78 | 0.64 | 0.22 | 18.6 |
Insight: the custom pipeline is competitive on sparse tiles but under-segments dense clusters (e.g. finds 35 of 70 nuclei); Cellpose-SAM closes that gap โ more than 2ร the instance mAP and ~3ร lower cell-count error. Practical takeaway: a hybrid โ cheap classical enhancement plus a foundation model where cell density is high.