This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
Pad model outputs if they are smaller than the inputs #681
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fepegar
changed the title
Pad patches if they are smaller than input to aggregator
Pad model outputs if they are smaller than the inputs
Mar 3, 2022
Update CHANGELOG Fix linting errors Ignore mypy error Fix linting error
fepegar
force-pushed
the
677-pad-patches-if-small
branch
from
March 3, 2022 15:27
d750bf6
to
71ffa9d
Compare
ant0nsc
approved these changes
Mar 7, 2022
ant0nsc
previously approved these changes
Mar 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good - but when are we running into that problem? If it's easily doable, can there be a test for that?
When the output of a model is smaller than the input. For example, when padding is not used in a U-Net (as in the original implementation):
I think there's already one (with a typo in the name): InnerEye-DeepLearning/Tests/ML/pipelines/test_inference.py Lines 39 to 43 in 5336a67
I don't know why the test is passing on Azure pipelines... It fails on the main branch on my machine. |
ant0nsc
approved these changes
Mar 9, 2022
javier-alvarez
approved these changes
Mar 9, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When patches are sampled from a volume, the bounding box of the patch is saved so the inferred results can be aggregated into the original position. This requires that the sampled patch and the one that will be aggregated be of the same size.
After this pull request is merged, the model outputs will be padded so they have the same shape as the sampled patches. If we merge this into #677, the CI errors should be fixed.