2D Tensor Support
See original GitHub issueThe transforms in your package are incredibly useful and unique, but for my project I need to apply them on 2D images.
I can likely develop a work-around using the 3D transforms, however I saw on issue #22 and issue #53 that you have previously discussed implementing 2D image support and have since closed these issues. Despite these issues being marked resolved, when using the transforms with the tensor support method (as outlined in #139 ), I get the following error:
RuntimeError: The input tensor must have 4 dimensions (channels, i, j, k), but has 3: torch.Size([1, 120, 384])
This was from trying to feed a tensor with shape (channels, i, j). This error makes it seem like the transforms are still only for 3D inputs? I have tried this with a variety of the transforms and get the same results.
Is there a method I’m missing for applying your transforms with 2D images? Thanks so much in advance for any help you can offer.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (9 by maintainers)
Top GitHub Comments
These all work perfectly for me! Thank you so much!
I don’t need any more transforms for 2D, but thank you though. This helps a lot, I really appreciate your work!
Sorry , I will refresh to browse the coomment https://github.com/fepegar/torchio/discussions/643#discussioncomment-1270113. Thank you for reminding me!