-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Is your feature request related to a problem? Please describe.
It would be useful to have a way to apply to the network output "reverse" transformations of those initially used as pre-processing on the inputs. For instance, if the inputs are resized or cropped with the relevant Monai transforms, it would be useful to be able to resize or pad the network output back to the original image size.
Describe the solution you'd like
Perhaps a way to keep track of the original image size and the coordinates of the cropping could be sufficient to "revert" those transforms on the output and restore the original image size?
Additional context
In my case, I have images with slightly different sizes which are all mapped to (96, 96) at training. At inference, I could not use the Resize Transform at generating the Monai dataset, as I would lose the original size information and would not be able to generate segmentation outputs with the correct size. I overcame the issue by applying the resize operation on the tensors within the evaluation loop instead of using the Monai transform.