Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Update TorchIO version #677

Merged
merged 3 commits into from
Mar 14, 2022
Merged

Update TorchIO version #677

merged 3 commits into from
Mar 14, 2022

Conversation

fepegar
Copy link
Contributor

@fepegar fepegar commented Mar 1, 2022

Resolves #672.

The new version of TorchIO fixes a small bug discovered recently which affects patch-based inference:

@fepegar fepegar self-assigned this Mar 1, 2022
javier-alvarez
javier-alvarez previously approved these changes Mar 2, 2022
Copy link
Contributor

@javier-alvarez javier-alvarez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clean the description of the PR?

@fepegar
Copy link
Contributor Author

fepegar commented Mar 2, 2022

Done. Is that better?

@fepegar fepegar marked this pull request as draft March 3, 2022 07:49
@fepegar
Copy link
Contributor Author

fepegar commented Mar 3, 2022

This happens because InnerEye is asking TorchIO to place a patch in a location where a larger patch is meant to be, i.e., the input size to the aggregator is smaller than the sampled patch. This happens when the model output is smaller than the input.

I have modified TorchIO so the error message when this happens is more informative.

I will submit a PR here to pad the model outputs when this situation occurs. When the model outputs are expected to be smaller than the input, a large overlap is typically specified anyway, so the patches will be cropped inside the aggregator later on, so it doesn't matter much how they are padded initially.

Hopefully, all that made some sense.

ant0nsc
ant0nsc previously approved these changes Mar 9, 2022
@fepegar fepegar dismissed stale reviews from ant0nsc and javier-alvarez via 9fd67a7 March 11, 2022 13:45
@fepegar fepegar marked this pull request as ready for review March 11, 2022 13:45
@fepegar fepegar merged commit 63fb868 into main Mar 14, 2022
@fepegar fepegar deleted the 672-update-torchio branch March 14, 2022 16:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TorchIO version should be updated
3 participants