Repository navigation
Add option to retain single channel for WNet3D in inference - #143
Merged
Merged
Conversation
- Disable channel choice for custom weights when number of classes is unknown (ONNX/pt) - Adjust tooltips to clarify channel choice availability
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Scope
Inference only, WNet3D only: an option to save, display and post-process a single output channel. Other models and training are unchanged.
Motivation
WNet3D outputs one channel per class. Inference saved and displayed every channel and ran instance segmentation on each, leaving users to identify and extract the foreground channel themselves.
Several utilities only support 2D or 3D inputs which made this missing post-processing step inconvenient.
Main changes
InferenceWorkerConfig.keep_channel(defaultNone, all channels kept)..pthweights (length ofencoder.out_b.module.8.bias); pretrained weights default to 2 classes with channel 1 selected (WNet_.default_channel).out_channels=model_info.num_classes; custom weights with 3 or more classes previously failed to load into the hard-coded 2-channel model.Notes
.onnx,.pt(TorchScript) and unreadable.pthfiles.