Created
October 14, 2021 16:04
-
-
Save fepegar/5d9e66d8302a110975efa932cd1ab2a0 to your computer and use it in GitHub Desktop.
TorchIO Resize demo
This is the standard resizing transform found in other frameworks for (2D) augmentation, like imgaug, TorchVision, etc. I added a usage example in the PR: TorchIO-project/torchio#642
I am planning to use it for augmentation of short video clips, because I don't mind that they look slightly distorted.
Maybe it was never a good idea to add it. I recently added a warning to the docs. Hopefully that will make things clear enough.
i may miss the point, but why not using resample, that will keep the ratio unchanged (even for a picture, it is better that having a deformed image ... no?
I have, say, 800x600 videos and I want them to be, say, 200x200. I could resample and crop or pad, or I could just resize, if I don't mind the distortion.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This resize transform is very confusing ... Actually I do not see when it may be usefull ?
have you an example where it should be used ?
For this example, I would also add alternative option with
tio.Resample
, that makes the job correctly, orCropOrPad
(although I would recomand resample, to be sure to have the same final field of view (and not just the same dimention)