Skip to content

Commit

Permalink
Starting updates to docs (#7116)
Browse files Browse the repository at this point in the history
### Description

This updates the docs with a minor fix to the bundle metadata example
and adds diagrams to help explain MONAI, and bundles vs. MAPs.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
  • Loading branch information
ericspod authored Oct 27, 2023
1 parent fa15eec commit 487f98b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 2 deletions.
Binary file added docs/images/MONAI_arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/MONAI_bundle_cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/MONAI_clouds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/MONAI_map_cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions docs/source/bundle_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Bundle
======

MONAI Bundles are a specification and file structure based way of distributing trained MONAI models with associated
metadata, code, documentation, and other resources. These are meant to make it easier for you to distribute your model
in a format that explains what the model is for, how to use it, how to reproduce the science you've done with it, and
use it in other applications such as Label and Deploy.

.. toctree::
:maxdepth: 1

Expand All @@ -13,3 +18,26 @@ Bundle
Detailed bundle examples and get started tutorial: https://github.com/Project-MONAI/tutorials/tree/main/bundle

A collection of medical imaging models in the MONAI Bundle format: https://github.com/Project-MONAI/model-zoo


Bundle vs. MAPs
---------------

Bundles differ from MONAI Application Packages (MAPs) in that they focus on description, code definition, application,
usage. MAPs focus on deployment, containerisation, integration into existing clinical systems, and other application
areas relating to putting models into use.

.. image:: ../images/MONAI_clouds.png
:alt: Bundle and MAP Concepts
:align: center

As a user, bundles are networks and "programs" you would use directly for training, inference, reproducing results,
and other tasks. Bundles can be integrated into MONAI Label apps to perform segmentation tasks through user interfaces,
or into MAPs for deployment. They can be integrated into other container environments but this isn't their focus. A
bundle in general is a more lightweight concept with less infrastructure

For all applications relating to containerisation, portability, and deployment, MAPs are what you're looking for. A MAP
is the contained environment for running an inference application directly or within an orchestration system. A bundle
alone doesn't have the structure suitable for this use, a MAP must be provided which uses a bundle as the inference object.
MAPs are also meant for inference only unlike bundles which should include training scripts. DICOM access is emphasised in
MAPs since they are meant for clinical deployment and so must interface with clinical databases.
4 changes: 4 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Its ambitions are:
- creating state-of-the-art, end-to-end training workflows for healthcare imaging;
- providing researchers with an optimized and standardized way to create and evaluate deep learning models.

.. image:: ../images/MONAI_arch.png
:alt: MONAI Architecture
:align: center

Features
--------

Expand Down
4 changes: 2 additions & 2 deletions docs/source/mb_specification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ An example JSON metadata file:
"dtype": "float32",
"value_range": [0, 1],
"is_patch_data": false,
"channel_def": {0: "image"}
"channel_def": {"0": "image"}
}
},
"outputs":{
Expand All @@ -165,7 +165,7 @@ An example JSON metadata file:
"dtype": "float32",
"value_range": [],
"is_patch_data": false,
"channel_def": {0: "background", 1: "spleen"}
"channel_def": {"0": "background", "1": "spleen"}
}
}
}
Expand Down

0 comments on commit 487f98b

Please sign in to comment.