Biomedical Imaging ยท Computer Vision

๐Ÿ”ฌ CellSight

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.

How it works

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.

1

Enhance

Correct uneven microscope illumination, boost local contrast with CLAHE, and remove sensor noise with Non-Local-Means denoising.

2

Segment

A custom marker-controlled watershed uses the distance transform to split even touching nuclei into separate instances โ€” not just a threshold mask.

3

Quantify

For every nucleus, extract area, perimeter, eccentricity, solidity, intensity and a total cell count โ€” the "featurization" step.

4

Evaluate

Benchmark against ground truth with Dice, IoU and instance mAP, and compare the classical pipeline to the Cellpose-SAM foundation model.

Live demo

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.

Benchmark: custom pipeline vs. foundation model

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.

MethodDiceIoUInstance mAPCell-count error
Cellpose-SAM (foundation model)0.8890.8040.4826.6
OpenCV watershed (custom, live here)0.780.640.2218.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.