LyNoS / LyNoS.py
dbouget's picture
Create LyNoS.py
d16c60e
raw
history blame
No virus
2.43 kB
"""LyNoS: Mediastinal lymph nodes segmentation using 3D convolutional neural network ensembles and anatomical priors guiding."""
import datasets
_DESCRIPTION = """\
LyNoS: Mediastinal lymph nodes segmentation using 3D convolutional neural network ensembles and anatomical priors guiding.
"""
_HOMEPAGE = "https://github.com/raidionics/LyNoS"
_LICENSE = "MIT"
_CITATION = """\
@article{bouget2023mediastinal,
title={Mediastinal lymph nodes segmentation using 3D convolutional neural network ensembles and anatomical priors guiding},
author={Bouget, David and Pedersen, Andr{\'e} and Vanel, Johanna and Leira, Haakon O and Lang{\o}, Thomas},
journal={Computer Methods in Biomechanics and Biomedical Engineering: Imaging \& Visualization},
volume={11},
number={1},
pages={44--58},
year={2023},
publisher={Taylor \& Francis}
}
"""
_URLS = [
{
"ct": f"data/Pat{i}/Pat{i}_data.nii.gz",
"azygos": f"data/Pat{i}/Pat{i}_labels_Azygos.nii.gz",
"brachiocephalicveins": f"data/Pat{i}/Pat{i}_labels_BrachiocephalicVeins.nii.gz",
"esophagus": f"data/Pat{i}/Pat{i}_labels_Esophagus.nii.gz",
"lymphnodes": f"data/Pat{i}/Pat{i}_labels_LymphNodes.nii.gz",
"subclaviancarotidarteries": f"data/Pat{i}/Pat{i}_labels_SubCarArt.nii.gz",
}
for i in range(1, 15)
]
class LyNoS(datasets.GeneratorBasedBuilder):
"""A segmentation benchmark dataset for enlarged lymph nodes in patients with primary lung cancer."""
VERSION = datasets.Version("1.0.0")
def _info(self):
features = datasets.Features(
{
"ct": datasets.Value("string"),
"lymphnodes": datasets.Value("string"),
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager):
data_dirs = dl_manager.download(_URLS)
return [
datasets.SplitGenerator(
name=datasets.Split.TEST,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"data_dirs": data_dirs,
},
),
]
def _generate_examples(self, data_dirs):
for key, patient in enumerate(data_dirs):
yield key, patient