Error in tio.RandomAffine: 'Transform' object has no attribute 'AddTransform'
See original GitHub issue🐛Bug Missing ‘AddTransform’ attribute in ‘Transform’ object from tio.RandomAffine.
To reproduce
I used your Colab Tutorial for Data Preprocessing and Data Augmentation, and in the example in section Spatial Transforms > Random Affine with the code.
random_affine = tio.RandomAffine(seed=0)
slice_affine = random_affine(slice_grid)
to_pil(slice_affine)
i get this error in the second line of code.
AttributeError: 'Transform' object has no attribute 'AddTransform'
Expected behavior
Random Affine transformation of the example grid
Actual behavior
Error
TorchIO version
0.17.25
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Transform object has no attribute GetInverseTransform
The error message indicates that SimpleITK Transform object does not have a "GetInverseTransform" method. The proper method to call is just ...
Read more >torchio.transforms.augmentation.spatial.random_affine
transformed = transform(image) .. plot:: import torchio as tio subject = tio.datasets.Slicer('CTChest') ct = subject.CT_chest transform = tio.RandomAffine() ...
Read more >Transforms — MONAI 1.1.0 Documentation
R calls happen here so that we have a better chance to identify errors of sync the random state. This method can generate...
Read more >TorchIO: A Python library for efficient loading, preprocessing ...
for deep learning with medical images. Keywords: Medical image computing, deep learning, data augmentation, preprocessing. 1. Introduction.
Read more >How to perform random affine transformation of an image?
transforms module. RandomAffine() transformation accepts both PIL and tensor images. A tensor image is a PyTorch tensor with shape [C, H, W], ...
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
Hi, Fernando.
The example is on your public tutorial on section Spatial Transforms > Random Affine.
I tried the latest version and it works now! i think the problem is in your setup code of the tutorial
Probably that version causes the problem in RandomAffine.
Thanks for your quick reply!
Hi, @Binztech. Can you please upgrade TorchIO and try again? And if it still does not work, can you open a new issue and share a minimal working example?