-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PatchInferencer utility class #72
Conversation
@SerodioJ Could you describe how you plan for this to integrate with the rest of the pipeline? |
|
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.
LGTM
I think |
Code has been moved to |
Describe your changes
Utility classes to perform inference in patches using either weighted average or voting methods to combine results.
PatchInferencer
is a wrapper class that is initialized with aLightningModule
(e.g., trained UNet) andinput_size
.When called (forward method), it subdivides the input in patches of size
input_size
, performs inference using theLightningModule
and then reconstructs the output.It also supports the inference of additional patches so that certain regions have multiple inference results when reconstructing the output (combination can be done with averaging or voting).
Checklist before requesting a review