diff --git a/GANDLF/data/inference_dataloader_histopath.py b/GANDLF/data/inference_dataloader_histopath.py index d3285deea..1f34c9a74 100644 --- a/GANDLF/data/inference_dataloader_histopath.py +++ b/GANDLF/data/inference_dataloader_histopath.py @@ -136,7 +136,7 @@ def __getitem__(self, idx): self._selected_level, (self._patch_size[0], self._patch_size[1]), # as_array=True, openslide-python doesn't return a ndarray, return an image - ) + ).convert('RGB') patch = np.asarray(patch) # convert the image to ndarray # this is to ensure that channels come at the beginning