Skip to content

Latest commit

 

History

History

monaibundle

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MONAI Bundle Application

Per the original docs

Any MONAI Bundle used with MONAI Label must meet the following constraints:

  • It must comply with the MONAI Bundle Specification.
  • For inference, the bundle must define either an inference.json or inference.yaml file, and it must include the keys described in the bundle.py file located in the monailabel/tasks/infer/ directory.
  • For training, the bundle must define either a train.json or train.yaml file, and it must include the keys described in the bundle.py file located in the monailabel/tasks/train/ directory.
  • For multi-GPU training, the bundle must define either a multi_gpu_train.json or multi_gpu_train.yaml file.

These constraints ensure that any MONAI Bundle used with MONAI Label is compatible with the platform and can be seamlessly integrated into the workflow.

Table of Contents

The Main File

segmentationMonaiLabel/apps/monaibundle/main.py

A general main.py file is described best by the tutorial/overview here: https://github.com/Project-MONAI/tutorials/blob/main/monailabel/design_and_develop_MONAILabel_app_monaibundle_example.md

Our main.py only differs in 3 ways:

  1. Custom BundleInferTask, SegmentationBundleInferTask

Example Image

  1. Custom BundleTrainTask, SegmentationBundleTrainTask

Example Image

  1. Custom activelearning Strategy, last (random)

Example Image

Technically, we also get rid of some other unnecessary stuff that I believe is related to uncertainty but otherwise is the same.

Potential Future Changes

  1. Moving datastore to this folder, because having it in the root makes no sense. Would change the command to launch the server, but would allow for each app to maintain its own datastore, which would be better if we had a segmentation app, a classification app, on different types of images, etc.
  2. Rename the files SegmentaionBundleInferTask.py, SegmentationBundleTrainTask.py to segmentation_bundle_train_task.py, segmentation_bundle_train_task.py to be more Pythonic (check to see how they did it in radiology example, I probably just was tired and named those files poorly. Would need to update init.py's too)