This repository reproduces the results published in the paper An AI-based segmentation and analysis pipeline for high-field MR monitoring of cerebral organoids [1]
Specifically, it especially implements three tasks:
- Organoid segmentation
- Global cysticity classification
- Local cyst segmentation
For the implementation of the 3D U-Net, the full credit goes to Adrian Wolny (https://github.com/wolny/pytorch-3dunet).
- Operating system: Windows or Linux (tested on Ubuntu 20.04)
- Install Anaconda
git clone https://github.com/deiluca/cerebral_organoid_quant_mri
Install conda environment
cd path/to/cerebral_organoid_quant_mri
conda env create -f environment.yml
Activate the conda environment:
conda activate co_quant_mri
Add this line to ~/.bashrc to permanently add the repository to PYTHONPATH
export PYTHONPATH="${PYTHONPATH}:path/to/cerebral_organoid_quant_mri"
-
Download the data from Zenodo and unpack it in data/data_zenodo.
-
Image extraction and data preparation
python scripts/extract_and_prepare_images.py
- Train and test 3D U-Net. (can be skipped: checkpoints from previous run are located here)
python scripts/train.py org_seg python scripts/test.py org_seg
- Extract and inspect results using scripts/data_analysis.ipynb
Model performance (Test Dice 0.92±0.06 [mean±SD])
Example of segmentation performance (org7_0530)
See scripts/data_analysis.ipynb
Performance of Compactness and examples of low- and high-quality organoids
DW-MRI: Higher diffusion of low-quality organoids
- Train and test 3D U-Net. (can be skipped: checkpoints from previous run are located here)
python scripts/train.py local_cyst_seg python scripts/test.py local_cyst_seg
- Extract and inspect results using scripts/data_analysis.ipynb
Model performance (Test Dice 0.63±0.15 [mean±SD])
Example of segmentation performance (org7_0530)
Is compactness a predictor of organoid cysticity?
Yes, high correlation. Extract and inspect results using scripts/data_analysis.ipynb
Please note that repeated 3D U-Net training runs might lead to slightly different results. This is caused by random initialization of 3D U-Net weights.
Cite
If you find this useful, please consider citing our work:
[1] Deininger, L., Jung-Klawitter, S., Mikut, R. et al. An AI-based segmentation and analysis pipeline for high-field MR monitoring of cerebral organoids. Sci Rep 13, 21231 (2023).
@article{Deininger2023,
title = {An AI-based segmentation and analysis pipeline for high-field MR monitoring of cerebral organoids},
volume = {13},
ISSN = {2045-2322},
url = {http://dx.doi.org/10.1038/s41598-023-48343-7},
DOI = {10.1038/s41598-023-48343-7},
number = {1},
journal = {Scientific Reports},
publisher = {Springer Science and Business Media LLC},
author = {Deininger, Luca and Jung-Klawitter, Sabine and Mikut, Ralf and Richter, Petra and Fischer, Manuel and Karimian-Jazi, Kianush and Breckwoldt, Michael O. and Bendszus, Martin and Heiland, Sabine and Kleesiek, Jens and Opladen, Thomas and H\"{u}bschmann, Oya Kuseyri and H\"{u}bschmann, Daniel and Schwarz, Daniel},
year = {2023},
month = dec
}