Search
Close this search box.

OrgaSegment: deep-learning based organoid segmentation to quantify CFTR dependent fluid secretion – Communications Biology

Ethical approval for use of organoids

CF PDIOs with varying CFTR-causing mutations were used in this study (exact mutations are specified where used or in supplementary table 1). Organoids used were obtained from the HUB (Hubrecht Organoid Technology) Biobank (www.huborganoids.nl) under TC-Bio protocol number 14-008, or from the UMCU Darmbank under TC-Bio protocol number 19–831, and used according to informed consent.

Organoid culture

Organoid lines were cultured using standard protocol as described previously26. In short, organoids were maintained in 40% matrigel droplets in the presence of WNT-conditioned culturing medium. Medium was refreshed every 2 days and organoids were passaged weekly by manual disruption and reseeding. All organoid cultures were passaged at least 3 times before performing functional CFTR measurements and maintained for a maximum of 20 passages.

Forskolin induced swelling (FIS) measurements

FIS assays were performed according to standard protocol26 (supplementary fig. 3a). In short, one day prior to FIS measurements, 7-day-old organoid cultures were harvested and disrupted before seeding them in 96-well culture plates in 4 µL 40% matrigel droplets. Organoids were incubated overnight in 50 µL organoid culture medium, in the presence of correctors VX-661 or VX-445 and VX-661 for VX-661/VX-770 or VX-445/VX-661/VX-770 treated conditions, respectively. After 24 h, calcein green (at a final concentration of 0.84 µM) was added to the organoids before adding potentiator VX-770 (where required) and forskolin. All wells were normalized for DMSO and all CFTR modulator compounds were used at a final concentration of 3 µM. Organoid swelling was monitored using confocal microscopy by imaging every 10 min, over a total time period of 60 minutes, using a Zeiss LSM800 confocal microscope.

Relative lumen area quantification

Organoids were cultured and seeded as described before. One hour after organoid plating, organoids were imaged using a Leica Thunder widefield microscope (t = 0 hours). Organoids were treated with DMSO or VX-445 and VX-661 and incubated for 24 h. After 24 h, organoids were imaged again and treated with 0.128 µM forskolin and DMSO or VX-770 before imaging one hour later (for a schematic overview of the timeline see Supplementary fig. 3b).

Drug induced swelling (DIS) measurements

For DIS assays, organoids were cultured as described before. Assay plating was performed following similar protocol as organoid seeding for FIS assays. Organoids were incubated in 100 µL organoid culture medium, for 1–2 h, whereafter organoids were imaged using bright-field microscopy on a Leica Thunder widefield microscope and treated with all CFTR modulator compounds, including potentiators, and forskolin where required, before incubating overnight. The next day, 24 h after organoid treatment, organoids were imaged for the second time, using the same microscope setting as at t = 0 (for a schematic overview of the timeline see supplementary fig. 3c). All DIS measurements are performed in biological triplicates.

OrgaSegment dataset creation

For the development of the OrgaSegment model we created a dataset containing images of organoids with various degrees of residual CFTR function. Organoids were cultured as described, and after 1 day imaged at different conditions (with or without forskolin and CFTR modulators) with a Zeiss LSM800 confocal microscope using 5x objective and transmitted laser light (ESID) or with a Leica Thunder widefield microscope using 5x objective and bright-field. Images were converted to JPEG, randomized to exclude any experiment information that could influence objective labelling, and uploaded to Labelbox24 for object labelling. Individual organoids were labelled into a single category (organoid). Labelling was performed by a group of experts, with experience in intestinal organoid culturing. Each image was labelled once and all labels were independently reviewed as quality control, and marked for re-labelling when of insufficient quality. The labelled dataset contained a total of 231 images (15,515 individual organoids), which were randomly split into training, validation and evaluation datasets, yielding datasets of 184 (11,989 organoids), 35 (2552 organoids), and 12 (974 organoids) grayscale images for respectively training, validation, and evaluation.

OrgaSegment model training

A MASK R-CNN34 implementation (https://github.com/matterport/Mask_RCNN) was forked and adjusted to optimize parallel GPU usage (https://github.com/Living-Technologies/Mask_RCNN). The ResNet10135 network was used for feature extraction and the weights trained on the MS COCO dataset25 was used as a starting point (transferred learning). Training was performed in parallel on 4 Nvidia Quadro RTX6000 GPUs on a SLURM managed HPC-environment. We trained our model on 184 JPEG images for 100 epochs on only the head layers and for an additional 400 epochs on all layers with 50 steps per epoch, batch size of 4 (1 per GPU), and a stochastic gradient descent (SGD) optimizer with a learning rate of 0.001. The images were cropped to 512×512 pixels on-the-fly during training to reduce memory usage. However, the network input image size was not exclusively defined in order to facilitate various image sizes upon model usage. No further data augmentation was performed.

OrgaSegment model evaluation

In order to evaluate model performance, we predicted the organoid masks of the evaluation dataset and compared the results with the ground-truth (GT), namely the manually labelled organoids of the same dataset. We used the same Average Precision metric and corresponding code as described previously by the Cellpose method22. The predictions were matched against the GT at different Intersection over Union (IoU) thresholds ranging between 0.5 and 1.0. A positive match resulted in a true positive (TP), a prediction without any corresponding GT resulted in a false positive (FP), and a GT mask without a prediction resulted in a false negative (FN). For each image the Average Precision (AP) was calculated:

$${AP}=frac{{TP}}{{TP}+{FP}+{FN}}$$

The AP from each image in the evaluation dataset was averaged, resulting in a single mean Average Precision for every IoU threshold.

OrgaSegment application

For simple organoid segmentation using the OrgaSegment model we developed an easy-to-use application based on python and the Streamlit app framework. The application requires a Mask-RCNN .h5 model file, a configuration, and JPEG images as input. It will run on both Windows and Linux based systems, either CPU or GPU, with a Anaconda installation and the OrgaSegment anaconda environment.

Quantification of CFTR modulator response FIS assay

Relative increase in total organoid area (swelling) per well was calculated for the quantification of CFTR functionality, as described before26. In short, Zeiss Zen Blue imaging software was used to quantify total organoid area per well, at each time point. Finally, we calculated relative organoid swelling as area under the curve (AUC), normalized to time point 0, as measure of CFTR functionality.

Quantification of CFTR function using SLA

Total organoid size and luminal size were determined by manual annotation using ImageJ software. SLA was expressed as the percentage of luminal organoid area of the total organoid area:

$${SLA}=left(frac{{luminal},{organoid},{area}}{{total},{organoid},{area}}right)cdot 100 %$$

Quantification of CFTR modulator response DIS assay

Transmitted light microscopy images were exported as JPEG. Images were run on the OrgaSegment application (see OrgaSegment application). Size per organoid per image was calculated and similar organoids at the different timepoints were identified. Swelling per organoid was calculated as follows:

$${Swelling}=frac{{Size},{at},t=24{hours}}{{Size},{at},t=0{hours}}$$

Outliers were identified and excluded, before calculating mean swelling per experimental condition.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.