Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.33 KB

File metadata and controls

41 lines (31 loc) · 1.33 KB

Execute Bundle

To execute a bundle, you'll need to include the following configs:

  • train.yaml: provides most configurations
  • <model>.yaml: specifies the model architecture to use. E.g. unet.yaml
  • <task>.yaml: specifies the task to execute, e.g. evaluate.yaml. Can be omitted for simple single GPU training.

Inference

python -m monai.bundle run inference \
  --meta_file configs/metadata.json \
  --config_file configs/inference.yaml \
  --logging_file configs/logging.conf

To run inference on a single file or a dicretory containing multiple image files use the --dataset_dir flag

Evaluation

python -m monai.bundle run evaluating \
  --meta_file configs/metadata.json \
  --config_file "['configs/train.yaml', 'configs/evaluate.yaml', 'configs/unet.yaml']" \
  --logging_file configs/logging.conf

To run inference on a single file or a dicretory containing multiple image files use the --datadir flag

Training

During training, this bundle saves both, the model weights AND the optmizer in model.pt. This can be an issue if deployed in MONAI Label. Use scripts/separate_model_optim.py to separate them.

Single GPU training

python -m monai.bundle run training \
  --meta_file configs/metadata.json \
  --config_file configs/train.yaml \
  --logging_file configs/logging.conf