Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreped/nocodeseg
đŹ Code-free deep segmentation for computational pathology
https://github.com/andreped/nocodeseg
annotation convolutional-neural-networks cpp deep-learning deepmib digital-pathology fastpathology java matlab medical-imaging multi-class open-annotations open-datasets qupath semantic-segmentation u-net
Last synced: 4 days ago
JSON representation
đŹ Code-free deep segmentation for computational pathology
- Host: GitHub
- URL: https://github.com/andreped/nocodeseg
- Owner: andreped
- License: mit
- Created: 2021-09-30T12:13:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T23:02:21.000Z (6 months ago)
- Last Synced: 2024-12-09T11:38:04.880Z (13 days ago)
- Topics: annotation, convolutional-neural-networks, cpp, deep-learning, deepmib, digital-pathology, fastpathology, java, matlab, medical-imaging, multi-class, open-annotations, open-datasets, qupath, semantic-segmentation, u-net
- Language: Jupyter Notebook
- Homepage:
- Size: 11.2 MB
- Stars: 52
- Watchers: 5
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Paper](https://zenodo.org/badge/DOI/10.1038/s41598-017-17204-5.svg)](https://www.frontiersin.org/articles/10.3389/fmed.2021.816281/full)
[![video](https://img.shields.io/badge/Video-Presentation-F9D371)]([https://youtu.be/WEgB4lAZyKM](https://www.youtube.com/watch?v=9dTfUwnL6zY))
[![Downloads](https://github.com/andreped/NoCodeSeg/releases/download/download-badge/badge.png)](https://doi.org/10.18710/TLA01U)
# NoCodeSeg: Deep segmentation made easy!
â ď¸***Latest: Generic multiclass support has been added to the pipeline!***
This is the official repository for the manuscript [*"Code-free development and deployment of deep segmentation models for digital pathology"*](https://www.frontiersin.org/articles/10.3389/fmed.2021.816281/full), **published** open access in Frontiers in Medicine.
The repository contains trained deep models for epithelium segmentation of HE and CD3 immunostained WSIs, as well as source code relevant for importing/exporting annotations/predictions in [QuPath](https://qupath.github.io/), both from [DeepMIB](http://mib.helsinki.fi/downloads.html) and [FastPathology](https://github.com/AICAN-Research/FAST-Pathology).
All relevant scripts for working with our pipeline can be found in the [source directory](https://github.com/andreped/NoCodeSeg/tree/main/source).
See [here](https://github.com/andreped/NoCodeSeg#models) for how to access the trained models.
See [here](https://github.com/andreped/NoCodeSeg#data) for how to download the 251 annotated WSIs.
## [Getting started](https://github.com/andreped/NoCodeSeg#getting-started)
[![Watch the video](figures/youtube-thumbnail.jpg)](https://youtu.be/9dTfUwnL6zY).
A video tutorial of the proposed pipeline was published on [YouTube](https://www.youtube.com/watch?v=9dTfUwnL6zY&ab_channel=HenrikSahlinPettersen).
It demonstrates the steps for:
* Downloading and installing the software
* QuPath
* Create a project, then export annotations as patches with label files
* Export patches from unannotated images for prediction in DeepMIB
* (later) Import predictions for MIB and FastPathology as annotations
* MIB
* Use the annotated patches/labels exported from QuPath
* Configuring and training deep segmentation models (i.e. U-Net/SegNet)
* Use the trained U-Net to predict unannotated patches exported from QuPath
* Export trained models into the ONNX format for use in FastPathology
* FastPathology
* Importing and creating a configuration file for the DeepMIB exported ONNX model
* Create a project and load WSIs into a project
* Use the U-Net ONNX model to render predictions on top of the WSI in real time
* Export full sized WSI tiffs for import into QuPathNote that the version of FastPathology used in the demonstration was v0.2.0 (this exact version can be downloaded from [here](https://github.com/AICAN-Research/FAST-Pathology/releases/tag/v0.2.0)). The software is continuously in development, and features presented in the video are therefore prone to changes in the near future. To get information regarding changes and new releases, please, visit the [FastPathology repository](https://github.com/AICAN-Research/FAST-Pathology).
## [Data](https://github.com/andreped/NoCodeSeg#data)
The 251 annotated WSIs are made openly available for anyone on [DataverseNO](https://doi.org/10.18710/TLA01U). Alternatively, the data can be downloaded directly from Google Drive (click [here](https://drive.google.com/drive/folders/1eUVs1DA1UYayUYjr8_aY3O5xDgV1uLvH?usp=sharing) to access the dataset). Information on how to cite the IBDColEpi dataset can be found on [DataverseNO](https://doi.org/10.18710/TLA01U).### [Reading annotations](https://github.com/andreped/NoCodeSeg#reading-annotations)
The annotations are stored as tiled, pyramidal TIFFs, which makes it easy to generate patches from the data without the need for any preprocessing. Reading these files and working with them to generate training data, is already described in the [tutorial video](https://github.com/andreped/NoCodeSeg#getting-started) above.
_TL;DR:_ Load TIFF as annotations in QuPath using provided [groovy script](https://github.com/andreped/NoCodeSeg/blob/main/source/importPyramidalTIFF.groovy) and [exporting](https://github.com/andreped/NoCodeSeg/blob/main/source/exportTiles.groovy) these as labelled tiles.
### [Reading annotation in Python](https://github.com/andreped/NoCodeSeg#reading-annotation-in-python)
If you wish to use Python, the annotations can be read exactly the same way as regular WSIs (for instance using [pyFAST](https://github.com/smistad/FAST)).
I have made a Jupyter Notebook demonstrating how to do this [here](https://github.com/andreped/NoCodeSeg/blob/main/notebooks/IBDColEpi-load-dataset-example.ipynb).
Alternatively, click the CoLab button to access the notebook:
### [Models](https://github.com/andreped/NoCodeSeg#models)
Note that the trained models can only be used for academic purposes due to MIB's license. Trained model files (.mibDeep for MIB and .onnx for FastPathology) are made openly available on [Google Drive](https://drive.google.com/drive/folders/1eUVs1DA1UYayUYjr8_aY3O5xDgV1uLvH). Simply download the file "trained-models.zip" and uncompress to get access the respective files.
## [Applications of pipeline](https://github.com/andreped/NoCodeSeg#applications-of-pipeline)
* Chiou et al., An immunohistochemical atlas of necroptotic pathway expression (2024), EMBO Molecular Medicine, https://doi.org/10.1038/s44321-024-00074-6
* Alharbi et al., A Deep LearningâBased Approach to Estimate Paneth Cell Granule Area in Celiac Disease (2023), Arch Pathol Lab Med, https://doi.org/10.5858/arpa.2023-0074-OA
* MallĂŠn et al., Sex Differences in Glomerular Lesions, in Atherosclerosis Progression, and in the Response to Angiotensin-Converting Enzyme Inhibitors in the ApoEâ/â Mice Model (2023), International Journal of Molecular Science, https://doi.org/10.3390/ijms241713442
* Røyset et al., Deep learning-based image analysis reveals significant differences in the number and distribution of mucosal CD3 and γδ T cells between Crohn's disease and ulcerative colitis, The Journal of Pathology, https://doi.org/10.1002/cjp2.301
* Pettersen et al., Code-free development and deployment of deep segmentation models for digital pathology (2022), Frontiers in Medicine, https://doi.org/10.3389/fmed.2021.816281## [How to cite](https://github.com/andreped/NoCodeSeg#how-to-cite)
Please, consider citing our paper, if you find the work useful:
@article{pettersen2022codefree,
title={{Code-Free Development and Deployment of Deep Segmentation Models for Digital Pathology}},
author={Pettersen, Henrik Sahlin and Belevich, Ilya and Røyset, Elin Synnøve and Smistad, Erik and Simpson, Melanie Rae and Jokitalo, Eija and Reinertsen, Ingerid and Bakke, Ingunn and Pedersen, AndrÊ},
journal={Frontiers in Medicine},
volume={8},
year={2022},
url={https://www.frontiersin.org/article/10.3389/fmed.2021.816281},
doi={10.3389/fmed.2021.816281},
issn={2296-858X}
}In addition, if you used the data set in your work, please, cite the following:
@data{pettersen2021ibdcolepi,
title = {{140 HE and 111 CD3-stained colon biopsies of active and inactivate inflammatory bowel disease with epithelium annotated: the IBDColEpi dataset}},
author = {Pettersen, Henrik Sahlin and Belevich, Ilya and Røyset, Elin Synnøve and Smistad, Erik and Jokitalo, Eija and Reinertsen, Ingerid and Bakke, Ingunn and Pedersen, AndrÊ},
publisher = {DataverseNO},
year = {2021},
version = {V2},
doi = {10.18710/TLA01U},
url = {https://doi.org/10.18710/TLA01U}
}## [Acknowledgements](https://github.com/andreped/NoCodeSeg#acknowledgements)
We wish to give our praise to [Peter Bankhead](https://www.ed.ac.uk/pathology/people/staff-students/peter-bankhead) and the [QuPath](https://github.com/qupath/qupath) team for their continuous support and assistance with QuPath and for assisting us in developing the scripts related to this study.