RandomAffine and RandomElasticDeformation on differently sized and oriented images
See original GitHub issue🚀 Feature
We have a full size image and then small FoV labels with a higher resolution.
Sadly the RandomAffine
and RandomElasticDeformation
augmentations do not run for this due to the size difference.
We can not upscale the labels since this would not fit the RAM.
We have to perform all augmentations on the individually sized images.
Motivation
For us this would be very helpful. We are mostly working with MONAI but frankly, the augmentations of torch.io are just better. The respective MONAI augmentations also do not support this. They do not throw an error like torch.io does (which in this case is better) but they output images which longer fit in terms of their affine (and probably also not in terms of the augmentation).
Would you need example files for that? Is this something to consider?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (7 by maintainers)
Top GitHub Comments
@romainVala After the data augmentations (and some other operations) we perform a crop on the T1 (and respectively on the labels) based on the bounding box of the labels. We then also upscale the T1 and merge all labels (which still have different box sizes and affines). So in the end we have a small FoV for the image and the labels with matching shapes. But the augmentations are performed globally. Performing the augmentations only on the FoV would give unrealistic results.
Example output (augmented): Same image, heavier augmentations:
Ok, I’ll open the PR and ping you.
I think we don’t need to. However, I really won’t be able to tackle the elastic one. Contributions are of course welcome!