diff --git a/src/ptbench/data/padchest/datamodule.py b/src/ptbench/data/padchest/datamodule.py index 5db738887196b60ea953c107f7de2603e7a24f02..5057d86f86c7714cd94f2d472e271ff66344ac21 100644 --- a/src/ptbench/data/padchest/datamodule.py +++ b/src/ptbench/data/padchest/datamodule.py @@ -36,7 +36,7 @@ class RawDataLoader(_BaseRawDataLoader): rc = load_rc() self.datadir = rc.get("datadir.padchest", os.path.realpath(os.curdir)) - def sample(self, sample: tuple[str, list[int]]) -> Sample: + def sample(self, sample: tuple[str, int | list[int]]) -> Sample: """Loads a single image sample from the disk. Parameters @@ -68,7 +68,7 @@ class RawDataLoader(_BaseRawDataLoader): return tensor, dict(label=sample[1], name=sample[0]) # type: ignore[arg-type] - def label(self, sample: tuple[str, list[int]]) -> list[int]: + def label(self, sample: tuple[str, int | list[int]]) -> int | list[int]: """Loads a single image sample label from the disk. Parameters diff --git a/src/ptbench/data/padchest/no_tb_idiap.py b/src/ptbench/data/padchest/no_tb_idiap.py index 62e4b56bee3046c63d13ea7f8cf7bbf848616a96..68f3e83b9ca11dcc6e3805d2f764e66fd617109a 100644 --- a/src/ptbench/data/padchest/no_tb_idiap.py +++ b/src/ptbench/data/padchest/no_tb_idiap.py @@ -13,7 +13,7 @@ datamodule = DataModule("no-tb-idiap.json.bz2") * Images path adapted to Idiap infrastructure -* Labels (in order): +* Labels (in order), match those of NIH CXR-14: * cardiomegaly * emphysema