sct-pipeline / contrast-agnostic-softseg-spinalcord

Contrast-agnostic spinal cord segmentation project with softseg
MIT License
4 stars 3 forks source link

Port towards config file-based training #90

Closed naga-karthik closed 4 months ago

naga-karthik commented 7 months ago

This PR heavily improves the way we train the contrast-agnostic model. Earlier, a lot of important arguments were passed through the command line, making the arguments list ever increasing and messy. With this PR, all the important params (and hyperparams) are specified in .yaml file that could be used for training. This could help other segmentation projects looking to use monai-based models to improve upon or replace nnUNet model.

Usage is now as simple as:

python monai/main.py --model nnunet --config configs/train_soft_all.yaml

This improved training strategy is mainly motivated by #87 - a follow-up project looking at the model drift (using lifelong learning) when training the contrast-agnostic model by adding more datasets. This also makes the training easier for a foundational model for SC segmentation that we were discussing with @valosekj .