From efab7180ea1214a8f8126eb203c3468bcdc0fc42 Mon Sep 17 00:00:00 2001 From: Fabian Isensee Date: Tue, 2 Jul 2024 09:05:32 +0200 Subject: [PATCH] fix comment --- nnunetv2/imageio/natural_image_reader_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnunetv2/imageio/natural_image_reader_writer.py b/nnunetv2/imageio/natural_image_reader_writer.py index 11946c3ca..73d353991 100644 --- a/nnunetv2/imageio/natural_image_reader_writer.py +++ b/nnunetv2/imageio/natural_image_reader_writer.py @@ -43,7 +43,7 @@ def read_images(self, image_fnames: Union[List[str], Tuple[str, ...]]) -> Tuple[ assert npy_img.shape[-1] == 3 or npy_img.shape[-1] == 4, "If image has three dimensions then the last " \ "dimension must have shape 3 or 4 " \ f"(RGB or RGBA). Image shape here is {npy_img.shape}" - # move RGB(A) to front, add additional dim so that we have shape (1, c, X, Y), where c is either 3 or 4 + # move RGB(A) to front, add additional dim so that we have shape (c, 1, X, Y), where c is either 3 or 4 images.append(npy_img.transpose((2, 0, 1))[:, None]) elif npy_img.ndim == 2: # grayscale image