Skip to content
Snippets Groups Projects
Commit 8e9081ce authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[models] Improve documentation of config files; Make ptbench config work again

parent 1e1e2dac
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
Showing
with 119 additions and 4 deletions
# Copyright © 2022 Idiap Research Institute <contact@idiap.ch> # Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and PadChest
datasets."""
from ..datamodule import ConcatDataModule from ..datamodule import ConcatDataModule
from ..indian.datamodule import RawDataLoader as IndianLoader from ..indian.datamodule import RawDataLoader as IndianLoader
...@@ -14,7 +16,8 @@ from ..shenzhen.datamodule import make_split as make_shenzhen_split ...@@ -14,7 +16,8 @@ from ..shenzhen.datamodule import make_split as make_shenzhen_split
class DataModule(ConcatDataModule): class DataModule(ConcatDataModule):
"""Aggregated datamodule composed of Montgomery and Shenzhen datasets.""" """Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and
PadChest datasets."""
def __init__(self, split_filename: str, padchest_split_filename: str): def __init__(self, split_filename: str, padchest_split_filename: str):
montgomery_loader = MontgomeryLoader() montgomery_loader = MontgomeryLoader()
......
# Copyright © 2022 Idiap Research Institute <contact@idiap.ch> # Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated dataset composed of Montgomery, Shenzhen, Indian and Padchest
datasets."""
from .datamodule import DataModule from .datamodule import DataModule
datamodule = DataModule("default.json", "tb-idiap.json") datamodule = DataModule("default.json", "tb-idiap.json")
"""Aggregated dataset composed of Montgomery, Shenzhen, Indian and Padchest
datasets."""
# Copyright © 2022 Idiap Research Institute <contact@idiap.ch> # Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets."""
from ..datamodule import ConcatDataModule from ..datamodule import ConcatDataModule
from ..indian.datamodule import RawDataLoader as IndianLoader from ..indian.datamodule import RawDataLoader as IndianLoader
...@@ -14,7 +16,8 @@ from ..tbx11k.datamodule import make_split as make_tbx11k_split ...@@ -14,7 +16,8 @@ from ..tbx11k.datamodule import make_split as make_tbx11k_split
class DataModule(ConcatDataModule): class DataModule(ConcatDataModule):
"""Aggregated datamodule composed of Montgomery and Shenzhen datasets.""" """Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and
TBX11k datasets."""
def __init__(self, split_filename: str, tbx11_split_filename: str): def __init__(self, split_filename: str, tbx11_split_filename: str):
montgomery_loader = MontgomeryLoader() montgomery_loader = MontgomeryLoader()
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 0).
This remix dataset combines ``fold-0`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-0`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 1).
This remix dataset combines ``fold-1`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-1`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 2).
This remix dataset combines ``fold-2`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-2`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 3).
This remix dataset combines ``fold-3`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-3`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 4).
This remix dataset combines ``fold-4`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-4`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 5).
This remix dataset combines ``fold-5`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-5`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 6).
This remix dataset combines ``fold-6`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-6`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 7).
This remix dataset combines ``fold-7`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-7`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 8).
This remix dataset combines ``fold-8`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-8`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 9).
This remix dataset combines ``fold-9`` from Montgomery, Shenzhen, and Indian
datasets with ``v1-fold-9`` of TBX11k (healthy vs. active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (v1-healthy-vs-atb).
This remix dataset combines the ``default`` split from Montgomery, Shenzhen,
and Indian datasets with ``v1-healthy-vs-atb`` split of TBX11k (healthy vs.
active TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 0).
This remix dataset combines ``fold-0`` from Montgomery, Shenzhen, and Indian
datasets with ``v2-fold-0`` of TBX11k (healthy, sick and latent TB vs. active
TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 1).
This remix dataset combines ``fold-1`` from Montgomery, Shenzhen, and Indian
datasets with ``v2-fold-1`` of TBX11k (healthy, sick and latent TB vs. active
TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 2).
This remix dataset combines ``fold-2`` from Montgomery, Shenzhen, and Indian
datasets with ``v2-fold-2`` of TBX11k (healthy, sick and latent TB vs. active
TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 3).
This remix dataset combines ``fold-3`` from Montgomery, Shenzhen, and Indian
datasets with ``v2-fold-3`` of TBX11k (healthy, sick and latent TB vs. active
TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 4).
This remix dataset combines ``fold-4`` from Montgomery, Shenzhen, and Indian
datasets with ``v2-fold-4`` of TBX11k (healthy, sick and latent TB vs. active
TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> # SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
"""Aggregated datamodule composed of Montgomery, Shenzhen, Indian, and TBX11k
datasets (cross-validation fold 5).
This remix dataset combines ``fold-5`` from Montgomery, Shenzhen, and Indian
datasets with ``v2-fold-5`` of TBX11k (healthy, sick and latent TB vs. active
TB samples).
"""
from .datamodule import DataModule from .datamodule import DataModule
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment