--- license: mit task_categories: - image-segmentation language: - en tags: - medical pretty_name: AeroPath size_categories: - 1B

🫁 LyNoS πŸ€—

A multilabel lymph node segmentation dataset from contrast CT

**LyNoS** was developed by SINTEF Medical Image Analysis to accelerate medical AI research. ## [Brief intro](https://github.com/raidionics/LyNoS#brief-intro) 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). 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. 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. ## [Dataset](https://github.com/raidionics/LyNoS#data) Open In Colab ### [Accessing dataset](https://github.com/raidionics/LyNoS#accessing-dataset) The dataset contains 15 CTs with corresponding lymph nodes, azygos, esophagus, and subclavian carotid arteries. The folder structure is described below. The easiest way to access the data is through Python with Hugging Face's [datasets](https://pypi.org/project/datasets/) package: ``` from datasets import load_dataset # downloads data from Zenodo through the Hugging Face hub # - might take several minutes (~5 minutes in CoLab) dataset = load_dataset("andreped/LyNoS") print(dataset) # list paths of all available patients and corresponding features (ct/lymphnodes/azygos/brachiocephalicveins/esophagus/subclaviancarotidarteries) for d in dataset["test"]: print(d) ``` A detailed interactive demo on how to load and work with the data can be seen on CoLab. Click the CoLab badge Open In Colab 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. ### [Dataset structure](https://github.com/raidionics/LyNoS#dataset-structure) ``` └── LyNoS.zip β”œβ”€β”€ stations_sto.csv └── LyNoS/ β”œβ”€β”€ Pat1/ β”‚ β”œβ”€β”€ pat1_data.nii.gz β”‚ β”œβ”€β”€ pat1_labels_Azygos.nii.gz β”‚ β”œβ”€β”€ pat1_labels_Esophagus.nii.gz β”‚ β”œβ”€β”€ pat1_labels_LymphNodes.nii.gz β”‚ └── pat1_labels_SubCarArt.nii.gz β”œβ”€β”€ [...] └── Pat15/ β”œβ”€β”€ pat15_data.nii.gz β”œβ”€β”€ pat15_labels_Azygos.nii.gz β”œβ”€β”€ pat15_labels_Esophagus.nii.gz β”œβ”€β”€ pat15_labels_LymphNodes.nii.gz └── pat15_labels_SubCarArt.nii.gz ``` ### [NIH Dataset Completion](https://github.com/raidionics/LyNoS#nih-dataset-completion) A larger dataset made of 90 patients featuring enlarged lymph nodes has also been made available by the National Institutes of Health, and is available for download on the official [web-page](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=19726546). As a supplement to this dataset, lymph nodes segmentation masks have been refined for all patients and stations have been manually assigned to each, available [here](https://drive.google.com/uc?id=1iVCnZc1GHwtx9scyAXdANqz2HdQArTHn). ## [Demo](https://github.com/raidionics/LyNoS#demo) To access the live demo, click on the `Hugging Face` badge above. Below is a snapshot of the current state of the demo app. Screenshot 2023-11-09 at 20 53 29 ## [Development](https://github.com/raidionics/LyNoS#development) ### [Docker](https://github.com/raidionics/LyNoS#docker) Alternatively, you can deploy the software locally. Note that this is only relevant for development purposes. Simply dockerize the app and run it: ``` docker build -t LyNoS . docker run -it -p 7860:7860 LyNoS ``` Then open `http://127.0.0.1:7860` in your favourite internet browser to view the demo. ### [Python](https://github.com/raidionics/LyNoS#python) It is also possible to run the app locally without Docker. Just setup a virtual environment and run the app. Note that the current working directory would need to be adjusted based on where `LyNoS` is located on disk. ``` git clone https://github.com/raidionics/LyNoS.git cd LyNoS/ virtualenv -python3 venv --clear source venv/bin/activate pip install -r ./demo/requirements.txt python demo/app.py --cwd ./ ``` ## [Citation](https://github.com/raidionics/LyNoS#citation) If you found the dataset and/or web application relevant in your research, please cite the following reference: ``` @article{bouget2021mediastinal, author = {David Bouget and AndrΓ© Pedersen and Johanna Vanel and Haakon O. Leira and Thomas LangΓΈ}, title = {Mediastinal lymph nodes segmentation using 3D convolutional neural network ensembles and anatomical priors guiding}, journal = {Computer Methods in Biomechanics and Biomedical Engineering: Imaging \& Visualization}, volume = {0}, number = {0}, pages = {1-15}, year = {2022}, publisher = {Taylor & Francis}, doi = {10.1080/21681163.2022.2043778}, URL = {https://doi.org/10.1080/21681163.2022.2043778}, eprint = {https://doi.org/10.1080/21681163.2022.2043778} } ``` ## [License](https://github.com/raidionics/LyNoS#license) The code in this repository is released under [MIT license](https://github.com/raidionics/LyNoS/blob/main/LICENSE).