diff --git a/src/mednet/config/data/hivtb/datamodule.py b/src/mednet/config/data/hivtb/datamodule.py index 2185b14d3789dc65ac634726fd77f3a58537bcf6..3ad4dc63cd31f94546d792b6f20c1dce6f98857b 100644 --- a/src/mednet/config/data/hivtb/datamodule.py +++ b/src/mednet/config/data/hivtb/datamodule.py @@ -51,7 +51,6 @@ class RawDataLoader(_BaseRawDataLoader): Returns ------- - Sample The sample representation. """ image = PIL.Image.open(os.path.join(self.datadir, sample[0])).convert( diff --git a/src/mednet/config/data/montgomery/datamodule.py b/src/mednet/config/data/montgomery/datamodule.py index c7aac4c821aca5b9a45cf11fff9e630c80e5e974..edb2cd7137631c9de70c559c863f3d87a3cfc2ec 100644 --- a/src/mednet/config/data/montgomery/datamodule.py +++ b/src/mednet/config/data/montgomery/datamodule.py @@ -51,7 +51,6 @@ class RawDataLoader(_BaseRawDataLoader): Returns ------- - Sample The sample representation. """ # N.B.: Montgomery images are encoded as grayscale PNGs, so no need to diff --git a/src/mednet/config/data/nih_cxr14/datamodule.py b/src/mednet/config/data/nih_cxr14/datamodule.py index 7c3edcef9850b1f79a8449ca06715e68a827d500..50fc6056e43b7f5a96ff70e4e4f843970396e64d 100644 --- a/src/mednet/config/data/nih_cxr14/datamodule.py +++ b/src/mednet/config/data/nih_cxr14/datamodule.py @@ -74,7 +74,6 @@ class RawDataLoader(_BaseRawDataLoader): Returns ------- - Sample The sample representation. """ file_path = sample[0] # default diff --git a/src/mednet/config/data/padchest/datamodule.py b/src/mednet/config/data/padchest/datamodule.py index 3abf944d3e5d0e1830422c7fe4a873691a4238ad..b40a9e13508dcccfd5008385fa036777e53efbe5 100644 --- a/src/mednet/config/data/padchest/datamodule.py +++ b/src/mednet/config/data/padchest/datamodule.py @@ -52,7 +52,6 @@ class RawDataLoader(_BaseRawDataLoader): Returns ------- - Sample The sample representation. """ # N.B.: PadChest images are encoded as 16-bit grayscale images diff --git a/src/mednet/config/data/shenzhen/datamodule.py b/src/mednet/config/data/shenzhen/datamodule.py index 1510220275a61cc407aa4f342de403f3e950d85d..c9ab8a64e571354a532231202cf2bcfa42b18c64 100644 --- a/src/mednet/config/data/shenzhen/datamodule.py +++ b/src/mednet/config/data/shenzhen/datamodule.py @@ -52,7 +52,6 @@ class RawDataLoader(_BaseRawDataLoader): Returns ------- - Sample The sample representation. """ # N.B.: Image.convert("L") is required to normalize grayscale back to diff --git a/src/mednet/config/data/tbpoc/datamodule.py b/src/mednet/config/data/tbpoc/datamodule.py index a7870e13faeb0f4cf2805993b6943167da16bf78..05a2cfad2aeb07257c0cd027766429ca7ed4a76e 100644 --- a/src/mednet/config/data/tbpoc/datamodule.py +++ b/src/mednet/config/data/tbpoc/datamodule.py @@ -46,7 +46,6 @@ class RawDataLoader(_BaseRawDataLoader): Returns ------- - Sample The sample representation. """ # images from TBPOC are encoded as grayscale JPEGs, no need to diff --git a/src/mednet/config/data/tbx11k/datamodule.py b/src/mednet/config/data/tbx11k/datamodule.py index 5baa60ffad11e4beedc2575b2d3750f9b307dc62..dc7218865f2f4d84248230e4df04740da8093bc5 100644 --- a/src/mednet/config/data/tbx11k/datamodule.py +++ b/src/mednet/config/data/tbx11k/datamodule.py @@ -161,7 +161,6 @@ class RawDataLoader(_BaseRawDataLoader): Returns ------- - Sample The sample representation. """ image = PIL.Image.open(os.path.join(self.datadir, sample[0])) diff --git a/src/mednet/engine/device.py b/src/mednet/engine/device.py index 8d5574e7c9c036461718f39f15b8dfa71401e1e1..d751fae574ef76b049f6601a760ba03c359ea29c 100644 --- a/src/mednet/engine/device.py +++ b/src/mednet/engine/device.py @@ -122,7 +122,7 @@ class DeviceManager: Returns ------- - device + torch.device The **first** torch device (if a list of ids is set). """ diff --git a/src/mednet/models/separate.py b/src/mednet/models/separate.py index 244d386bd99c51205339ecb3ff16aeb6804aab2d..6238dff0a17cafd8558b1291937b719f5aebf9ed 100644 --- a/src/mednet/models/separate.py +++ b/src/mednet/models/separate.py @@ -49,7 +49,6 @@ def separate(batch: Sample) -> list[BinaryPrediction | MultiClassPrediction]: Returns ------- - list[BinaryPrediction | MultiClassPrediction] A list of predictions that contains the predictions and associated metadata for each processed sample. """ diff --git a/src/mednet/models/transforms.py b/src/mednet/models/transforms.py index f67d1f66c150e4a25c5d27f92b300a9c8c5ceedc..14c7205acf206158446bd0e8a19335611c4944fb 100644 --- a/src/mednet/models/transforms.py +++ b/src/mednet/models/transforms.py @@ -71,7 +71,7 @@ def rgb_to_grayscale(img: torch.Tensor) -> torch.Tensor: Returns ------- - torch + torch.Tensor Transformed tensor with a single (grayscale) color channel. """ if img.ndim < 3: