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_categories:
|
| 4 |
+
- image-segmentation
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- medical
|
| 9 |
+
pretty_name: AeroPath
|
| 10 |
+
size_categories:
|
| 11 |
+
- 1B<n<10B
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
---
|
| 15 |
+
title: 'LyNoS: automatic lymph node segmentation using deep learning'
|
| 16 |
+
colorFrom: indigo
|
| 17 |
+
colorTo: indigo
|
| 18 |
+
sdk: docker
|
| 19 |
+
app_port: 7860
|
| 20 |
+
emoji: 🫁
|
| 21 |
+
pinned: false
|
| 22 |
+
license: mit
|
| 23 |
+
app_file: demo/app.py
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
<div align="center">
|
| 27 |
+
<h1 align="center">🫁 LyNoS 🤗</h1>
|
| 28 |
+
<h3 align="center">A multilabel lymph node segmentation dataset from contrast CT</h3>
|
| 29 |
+
|
| 30 |
+
[](https://github.com/raidionics/LyNoS/blob/main/LICENSE.md)
|
| 31 |
+
[](https://github.com/raidionics/LyNoS/actions/workflows/deploy.yml)
|
| 32 |
+
<a target="_blank" href="https://huggingface.co/spaces/andreped/LyNoS"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
|
| 33 |
+
<a href="https://colab.research.google.com/gist/andreped/274bf953771059fd9537877404369bed/lynos-load-dataset-example.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
|
| 34 |
+
[](https://doi.org/10.1080/21681163.2022.2043778)
|
| 35 |
+
|
| 36 |
+
**LyNoS** was developed by SINTEF Medical Image Analysis to accelerate medical AI research.
|
| 37 |
+
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
+
## [Brief intro](https://github.com/raidionics/LyNoS#brief-intro)
|
| 41 |
+
|
| 42 |
+
This repository contains the LyNoS dataset described in ["_Mediastinal lymph nodes segmentation using 3D convolutional neural network ensembles and anatomical priors guiding_"](https://doi.org/10.1080/21681163.2022.2043778).
|
| 43 |
+
The dataset has now also been uploaded to Zenodo and the Hugging Face Hub enabling users to more easily access the data through Python API.
|
| 44 |
+
|
| 45 |
+
We have also developed a web demo to enable others to easily test the pretrained model presented in the paper. The application was developed using [Gradio](https://www.gradio.app) for the frontend and the segmentation is performed using the [Raidionics](https://raidionics.github.io/) backend.
|
| 46 |
+
|
| 47 |
+
## [Dataset](https://github.com/raidionics/LyNoS#data) <a href="https://colab.research.google.com/gist/andreped/274bf953771059fd9537877404369bed/lynos-load-dataset-example.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
|
| 48 |
+
|
| 49 |
+
### [Accessing dataset](https://github.com/raidionics/LyNoS#accessing-dataset)
|
| 50 |
+
|
| 51 |
+
The dataset contains 15 CTs with corresponding lymph nodes, azygos, esophagus, and subclavian carotid arteries. The folder structure is described below.
|
| 52 |
+
|
| 53 |
+
The easiest way to access the data is through Python with Hugging Face's [datasets](https://pypi.org/project/datasets/) package:
|
| 54 |
+
```
|
| 55 |
+
from datasets import load_dataset
|
| 56 |
+
|
| 57 |
+
# downloads data from Zenodo through the Hugging Face hub
|
| 58 |
+
# - might take several minutes (~5 minutes in CoLab)
|
| 59 |
+
dataset = load_dataset("andreped/LyNoS")
|
| 60 |
+
print(dataset)
|
| 61 |
+
|
| 62 |
+
# list paths of all available patients and corresponding features (ct/lymphnodes/azygos/brachiocephalicveins/esophagus/subclaviancarotidarteries)
|
| 63 |
+
for d in dataset["test"]:
|
| 64 |
+
print(d)
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
A detailed interactive demo on how to load and work with the data can be seen on CoLab. Click the CoLab badge <a href="https://colab.research.google.com/gist/andreped/274bf953771059fd9537877404369bed/lynos-load-dataset-example.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> to see the notebook or alternatively click [here](https://github.com/raidionics/LyNoS/blob/main/notebooks/lynos-load-dataset-example.ipynb) to see it on GitHub.
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
### [Dataset structure](https://github.com/raidionics/LyNoS#dataset-structure)
|
| 71 |
+
|
| 72 |
+
```
|
| 73 |
+
└── LyNoS.zip
|
| 74 |
+
├── stations_sto.csv
|
| 75 |
+
└── LyNoS/
|
| 76 |
+
├── Pat1/
|
| 77 |
+
│ ├── pat1_data.nii.gz
|
| 78 |
+
│ ├── pat1_labels_Azygos.nii.gz
|
| 79 |
+
│ ├── pat1_labels_Esophagus.nii.gz
|
| 80 |
+
│ ├── pat1_labels_LymphNodes.nii.gz
|
| 81 |
+
│ └── pat1_labels_SubCarArt.nii.gz
|
| 82 |
+
├── [...]
|
| 83 |
+
└── Pat15/
|
| 84 |
+
├── pat15_data.nii.gz
|
| 85 |
+
├── pat15_labels_Azygos.nii.gz
|
| 86 |
+
├── pat15_labels_Esophagus.nii.gz
|
| 87 |
+
├── pat15_labels_LymphNodes.nii.gz
|
| 88 |
+
└── pat15_labels_SubCarArt.nii.gz
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
## [Demo](https://github.com/raidionics/LyNoS#demo) <a target="_blank" href="https://huggingface.co/spaces/andreped/LyNoS"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
|
| 92 |
+
|
| 93 |
+
To access the live demo, click on the `Hugging Face` badge above. Below is a snapshot of the current state of the demo app.
|
| 94 |
+
|
| 95 |
+
<img width="1400" alt="Screenshot 2023-11-09 at 20 53 29" src="https://github.com/raidionics/LyNoS/assets/29090665/ce661da0-d172-4481-b9b5-8b3e29a9fc1f">
|
| 96 |
+
|
| 97 |
+
## [Continuous integration](https://github.com/raidionics/LyNoS#continuous-integration)
|
| 98 |
+
|
| 99 |
+
| Build Type | Status |
|
| 100 |
+
| - | - |
|
| 101 |
+
| **HF Deploy** | [](https://github.com/raidionics/LyNoS/actions) |
|
| 102 |
+
| **File size check** | [](https://github.com/raidionics/LyNoS/actions) |
|
| 103 |
+
| **Formatting check** | [](https://github.com/raidionics/LyNoS/actions) |
|
| 104 |
+
|
| 105 |
+
## [Development](https://github.com/raidionics/LyNoS#development)
|
| 106 |
+
|
| 107 |
+
### [Docker](https://github.com/raidionics/LyNoS#docker)
|
| 108 |
+
|
| 109 |
+
Alternatively, you can deploy the software locally. Note that this is only relevant for development purposes. Simply dockerize the app and run it:
|
| 110 |
+
|
| 111 |
+
```
|
| 112 |
+
docker build -t LyNoS .
|
| 113 |
+
docker run -it -p 7860:7860 LyNoS
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
Then open `http://127.0.0.1:7860` in your favourite internet browser to view the demo.
|
| 117 |
+
|
| 118 |
+
### [Python](https://github.com/raidionics/LyNoS#python)
|
| 119 |
+
|
| 120 |
+
It is also possible to run the app locally without Docker. Just setup a virtual environment and run the app.
|
| 121 |
+
Note that the current working directory would need to be adjusted based on where `LyNoS` is located on disk.
|
| 122 |
+
|
| 123 |
+
```
|
| 124 |
+
git clone https://github.com/raidionics/LyNoS.git
|
| 125 |
+
cd LyNoS/
|
| 126 |
+
|
| 127 |
+
virtualenv -python3 venv --clear
|
| 128 |
+
source venv/bin/activate
|
| 129 |
+
pip install -r ./demo/requirements.txt
|
| 130 |
+
|
| 131 |
+
python demo/app.py --cwd ./
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
## [Citation](https://github.com/raidionics/LyNoS#citation)
|
| 135 |
+
|
| 136 |
+
If you found the dataset and/or web application relevant in your research, please cite the following reference:
|
| 137 |
+
```
|
| 138 |
+
@article{bouget2021mediastinal,
|
| 139 |
+
author = {David Bouget and André Pedersen and Johanna Vanel and Haakon O. Leira and Thomas Langø},
|
| 140 |
+
title = {Mediastinal lymph nodes segmentation using 3D convolutional neural network ensembles and anatomical priors guiding},
|
| 141 |
+
journal = {Computer Methods in Biomechanics and Biomedical Engineering: Imaging \& Visualization},
|
| 142 |
+
volume = {0},
|
| 143 |
+
number = {0},
|
| 144 |
+
pages = {1-15},
|
| 145 |
+
year = {2022},
|
| 146 |
+
publisher = {Taylor & Francis},
|
| 147 |
+
doi = {10.1080/21681163.2022.2043778},
|
| 148 |
+
URL = {https://doi.org/10.1080/21681163.2022.2043778},
|
| 149 |
+
eprint = {https://doi.org/10.1080/21681163.2022.2043778}
|
| 150 |
+
}
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
## [License](https://github.com/raidionics/LyNoS#license)
|
| 154 |
+
|
| 155 |
+
The code in this repository is released under [MIT license](https://github.com/raidionics/LyNoS/blob/main/LICENSE).
|