113 add 3d segmentation template - #114
Open
mikaelsimard5 wants to merge 33 commits into
Open
Conversation
Also udpated nomenclature for xnat 0.8
Mostly based on previous autoseg code; I've largely refactored setup() to use more modern pandas methods (apply(), map() and split in clear steps.
Final organisation of repo - split in smaller functions, nnunet CLI calls are defined inside commands.py but ran through a runner class defined in runtime.py
…ion of what's what in overview
There were many sources of logging (subprocess.log, and just general log from logger.*). I uniformised so that everything gets dumped into logger.* and gets sent to a final unique log file containing both the logger data and the nnunet subprocesses.
…s into class Also uniformised some variable names throughout scripts.
Includes duplicate label names in regions.json file, and nifti can work with a single contour (not necessarily more than one) if you want to learn only for one organ.
Otherwise runtime contained all nnunet related functions which was clumsy and hard to navigate.
used to be a bunch of functions loosely interacting; now the schema is populated via _from_config.
… reinventing the wheel.
No functionality changed.
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.
Linked Issue(s)
Summary of changes
Massive amount of code reorganisation from the existing autoseg codebases. Everything stems from train.py - start with that. Documentation has been added, all logging (including from the nnunet subprocess) is sent to a single file. Code was uniformed as much as possible with the 2d classifier, although it does have significant differences due to the need to call nnunetv2 via subprocesses.
Config file has been slightly simplified by removing some useless parameters. All nnunetv2 subprocesses are called from the command.py file, which includes a massive amount of docstrings to help users understand how each nnunet command works and what it does.
The MLflow artifact logging folder has been slightly revamped to be more intuitive in how things are sorted.
Overall there has been no change in what is actually computed compared to autoseg repos - the code is just more general and has been optimised where possible.
Reason for changes
As of now there was no 3d seg task in the project template.
It is also required as we keep building new autoseg apps with different datasets, each coming with their different repo and variations. In the future there should be a single autoseg repo (copied from this one) which just requires different config files for the different models.