feat: enable encoder-only architecture for nnU-Net #6
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.
Hello, thanks for the great work.
I am exploring self-supervised pretraininig for nnU-Net. For that, I do encoder-only pretraining and then transfering the learned encoder weights to the final full U-Net architecture on the finetuning.
With this little adjustment, the workflow for that is quite simple.
plans.json
file for the pretraining configuration and change the network architecture to thePlainConvEncoder
. With the kwargs that I add with this PR, the additional decoder configuration used for the finetuning gets simply ignored, no more plans file editing.When finished, I plan to do a PR on nnU-Net for the self-supervised learning, if you are interested in that :)
With the nnU-Net and its plans files, everything is nice and configurable. The additional kwargs allow me to quickly only initialize the encoder in nnUNetTrainers allowing me the framework for self-supervised pretraining which is all about training the feature-extractor (encoder) with pseudo-supervised tasks.
Let me know what you think of this