-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Describe the bug
The monai.transforms.LoadImage Transformer (independent of the reader used) erroneously returns a transpose of the image in MONAI 0.7.0, whereas it returned the correct image in previous versions.
To Reproduce
It is most obvious when the image is not square. I saw it when using images with shape (700, 1100).
With MONAI == 0.6.0:
from monai.transforms import LoadImage
loadImage = LoadImage()
out = loadImage("filename") // shape = (700, 1100)With MONAI == 0.7.0:
from monai.transforms import LoadImage
loadImage = LoadImage()
out = loadImage("filename") // shape = (1100, 700)Changing the reader does not change the behavior.
Expected behavior
The behavior of LoadImage in 0.7.0 should be the same as in previous versions and consistent both with other readers and with the Numpy logic of shape = (rows, columns).
Environment
MONAI 0.6.0:
MONAI version: 0.6.0
Numpy version: 1.21.2
Pytorch version: 1.9.1+cu102
MONAI flags: HAS_EXT = False, USE_COMPILED = False
MONAI rev id: 0ad9e73639e30f4f1af5a1f4a45da9cb09930179
Optional dependencies:
Pytorch Ignite version: 0.4.5
Nibabel version: 3.2.1
scikit-image version: 0.18.3
Pillow version: 8.4.0
Tensorboard version: 2.7.0
gdown version: 4.2.0
TorchVision version: 0.10.1+cu102
ITK version: 5.1.2
tqdm version: 4.62.3
lmdb version: 1.2.1
psutil version: 5.8.0
pandas version: 1.3.4
einops version: 0.3.2MONAI 0.7.0:
================================
Printing MONAI config...
================================
MONAI version: 0.7.0
Numpy version: 1.21.2
Pytorch version: 1.9.1+cu102
MONAI flags: HAS_EXT = False, USE_COMPILED = False
MONAI rev id: bfa054b9c3064628a21f4c35bbe3132964e91f43
Optional dependencies:
Pytorch Ignite version: 0.4.5
Nibabel version: 3.2.1
scikit-image version: 0.18.3
Pillow version: 8.4.0
Tensorboard version: 2.7.0
gdown version: 4.2.0
TorchVision version: 0.10.1+cu102
tqdm version: 4.62.3
lmdb version: 1.2.1
psutil version: 5.8.0
pandas version: 1.3.4
einops version: 0.3.2
transformers version: 4.11.3Metadata
Metadata
Assignees
Labels
No labels