RuntimeError: "length_2D" must be smaller or equal to image dimensions after resampling.
See original GitHub issueHello,
So I get the following error when I am trying to process an image with version 4.0 of the code. This only occurs with the BF and SEM models.
File "/home/msavage/anaconda3/envs/axonDeepSegEnv1/lib/python3.8/site-
packages/ivadomed/loader/mri2d_segmentation_dataset.py", line 152, in prepare_indices
raise RuntimeError('"length_2D" must be smaller or equal to image dimensions after resampling.')
RuntimeError: "length_2D" must be smaller or equal to image dimensions after resampling.
The image in question is 2160 x 1440 pixels at a resolution of 0.0064 micron per pixel.
The system running this package is Ubuntu 20.04
Any help would be greatly appreciated.
Best,
Michael
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Images in subject have different sizes after resampling #354
Hi, I have an image and mask with these properties: Size: 512x512x75 Spacing: 0.703125x0.703125x5.000000 I am adding these to a subject ...
Read more >SimpleITK Images and Resampling
This quantity implicitly defines the image dimension. ... close do physical attributes (meta-data values) need to be in order to be considered equivalent?...
Read more >Images dimensions error in python - Stack Overflow
This give n an error: raise ValueError('Input images must have the same dimensions.') ValueError: Input images must have the same dimensions.
Read more >torchio.transforms.preprocessing.spatial.resample
[docs]class Resample(SpatialTransform): """Resample image to a different physical space. This is a powerful transform that can be used to change the image ......
Read more >Resampling to volume to smaller size and smaller voxel spacing
I want to downsample my CT images to match their corresponding PET Size, but I also want all my voxel spacing for both...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much for all your advice, the labelling is working much better now!
Thanks @GrimmSnark !
@mariehbourget and I played around a bit with some of the ADS settings on your dataset, and here are some reflections//results:
I think the consensus internally in our group is that if we were in your place, it would be better to use a resolution 0.0134 during the segmentation phase only in ADS (note that when creating morphology files, you should use your true resolution value to get accurate values), and then manually correct the segmentation of the large axons using the FSLeyes plugin we provide. Manually fixing/manually segmenting a few large axons is much less time consuming than fixing/manually segmenting many small axons, in our experience.
Hope some of this information is helpful!