Cellpose tutorial: 3D organoid segmentation in Python
Learn to segment organoid cells and nuclei with Cellpose, filter masks, and export 27 features per cell from 109-slice microscopy stacks.
Player not loading? Watch on YouTube
This Python tutorial follows a 3D organoid workflow from fluorescence TIFF stacks to a CSV feature table. The example uses PDAC nuclei and cell channels, each with 109 slices of 512 × 512 pixels. The presenter runs the notebook in Google Colab with a Tesla T4 GPU; this is not a demonstration of an offline deployment.
The pipeline normalizes intensities using the first and 99th percentiles, then tests Cellpose parameters on 2D slices before processing the full volume. It uses the nuclei model and cyto3 for cells, with both image channels supplying context for cell segmentation. Pixel spacing is 0.345 microns in XY and 1 micron in Z, giving an anisotropy ratio of about 2.9. The presenter reports roughly 20 to 30 minutes for each full 3D segmentation run.
Quality control matches nuclei to cells by overlap and keeps the largest nucleus when several overlap. The example applies minimum volumes of 500 cubic microns for cells and 100 for nuclei, a nucleus-to-cell volume ratio limit of 0.9, and a requirement that cells contain a nucleus. These are workflow settings, not universal biological rules.
Feature extraction uses the original image intensities rather than normalized values and exports 27 measurements per cell. An optional nucleus-to-border calculation is skipped because the presenter reports about 10 seconds per cell. ZEISS arivis provides the separate interactive 3D visualization shown alongside the notebook.