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

[data.padchest] Fix normalizer

parent 4ae951f1
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
...@@ -57,7 +57,7 @@ class RawDataLoader(_BaseRawDataLoader): ...@@ -57,7 +57,7 @@ class RawDataLoader(_BaseRawDataLoader):
# N.B.: PadChest images are encoded as 16-bit grayscale images # N.B.: PadChest images are encoded as 16-bit grayscale images
image = PIL.Image.open(os.path.join(self.datadir, sample[0])) image = PIL.Image.open(os.path.join(self.datadir, sample[0]))
image = remove_black_borders(image) image = remove_black_borders(image)
array = numpy.array(image).astype(numpy.float32) / 65536 array = numpy.array(image).astype(numpy.float32) / 65535
tensor = to_tensor(array) tensor = to_tensor(array)
tensor = center_crop(tensor, min(*tensor.shape[1:])) tensor = center_crop(tensor, min(*tensor.shape[1:]))
......
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