Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianIsensee committed Jul 2, 2024
1 parent 2d999ea commit efab718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnunetv2/imageio/natural_image_reader_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit efab718

Please sign in to comment.