Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.4.0 #312

Merged
merged 3 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.0
current_version = 0.4.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>a|b|rc)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}{release}{build}
Expand Down
69 changes: 69 additions & 0 deletions docs/source/getting_started/tutorials/06_monai_bundle_app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 6) Creating a Segmentation app consuming a MONAI Bundle

## Setup

```bash
# Create a virtual environment with Python 3.7.
# Skip if you are already in a virtual environment.
# (JupyterLab dropped its support for Python 3.6 since 2021-12-23.
# See https://github.com/jupyterlab/jupyterlab/pull/11740)
conda create -n monai python=3.7 pytorch torchvision jupyterlab cudatoolkit=11.1 -c pytorch -c conda-forge
conda activate monai

# Launch JupyterLab if you want to work on Jupyter Notebook
jupyter-lab
```

## Executing from Jupyter Notebook

```{toctree}
:maxdepth: 4

../../notebooks/tutorials/06_monai_bundle_app.ipynb
```

```{raw} html
<p style="text-align: center;">
<a class="sphinx-bs btn text-wrap btn-outline-primary col-md-6 reference external" href="../../_static/notebooks/tutorials/06_monai_bundle_app.ipynb">
<span>Download 06_monai_bundle_app.ipynb</span>
</a>
</p>
```

## Executing from Shell

```bash
# Clone the github project (the latest version of main branch only)
git clone --branch main --depth 1 https://github.com/Project-MONAI/monai-deploy-app-sdk.git

cd monai-deploy-app-sdk

# Install monai-deploy-app-sdk package
pip install monai-deploy-app-sdk

# Download/Extract ai_spleen_bundle_data zip file from https://drive.google.com/file/d/1cJq0iQh_yzYIxVElSlVa141aEmHZADJh/view?usp=sharing

# Download ai_spleen_bundle_data.zip
pip install gdown
gdown https://drive.google.com/uc?id=1cJq0iQh_yzYIxVElSlVa141aEmHZADJh

# After downloading ai_spleen_bundle_data.zip from the web browser or using gdown,
unzip -o ai_spleen_bundle_data.zip

# Install necessary packages from the app; note that numpy-stl and trimesh are only
# needed if the application uses the STL Conversion Operator
pip install monai pydicom SimpleITK Pillow nibabel scikit-image numpy-stl trimesh

# Local execution of the app directly or using MONAI Deploy CLI
python examples/apps/ai_spleen_seg_app/app.py -i dcm/ -o output -m model.ts
# or alternatively,
monai-deploy exec ../examples/apps/ai_spleen_seg_app/app.py -i dcm/ -o output -m model.ts

# Package app (creating MAP docker image) using `-l DEBUG` option to see progress.
# This assumes that nvidia docker is installed in the local machine.
# Please see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker to install nvidia-docker2.
monai-deploy package examples/apps/ai_spleen_seg_app --tag seg_app:latest --model model.ts -l DEBUG

# Run the app with docker image and input file locally
monai-deploy run seg_app:latest dcm/ output
```
7 changes: 7 additions & 0 deletions docs/source/release_notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
:hidden:
:maxdepth: 2

```
## Version 0.4

```{toctree}
:maxdepth: 1

v0.4.0
```
## Version 0.3

Expand Down
34 changes: 34 additions & 0 deletions docs/source/release_notes/v0.4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Version 0.4.0



## What's new in 0.4.0
- New operator to automate inference with the newly introduced [MONAI Bundle](https://docs.monai.io/en/stable/whatsnew_0_9.html)

### MONAI Bundle Inference Operator

The new operator, `MONAI Bundle Inference Operator`, is intended to automate the inference with a MONAI Bundle in TorchScript with the following functionalities:
- Parse the model metadata and extra configuration data in the TorchScript file
- Instanciate MONAI transforms and inferer objects per bundle configuration data
- Convert input/output of the operator to and from model network input
- Support named model and can be used in a multi-model application

The example [spleen segmentation application](https://github.com/Project-MONAI/monai-deploy-app-sdk/tree/main/examples/apps/ai_spleen_seg_app) was accordingly updated to demonstrate the use of this new operator with the newly published [Spleen CT Segmentation Bundle](https://github.com/Project-MONAI/model-zoo/tree/dev/models/spleen_ct_segmentation).

More details are in the [tutorial](https://github.com/Project-MONAI/monai-deploy-app-sdk/blob/main/notebooks/tutorials/06_monai_bundle_app.ipynb).

## What's fixed/updated

- [[FEA] A generic operator to automate inference execution with a MONAI Bundle](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/286)
- [[FEA] Integrating Model Zoo and MMAR](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/213)
- [[FEA] Multi-model support in an application built with MONAI Deploy App SDK](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/244)
- [[DOC] Missing python dependencies for the segmentation app](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/299) and the [duplicate](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/305)
- [mednist_app:latest -- No module named 'nibabel'](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/302)
- [[DOC] Series Selector dictionary](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/300)

## Additional information
Please visit [GETTING STARTED](/getting_started/index) guide and follow the tutorials.

You can learn more about SDK usage through [DEVELOPING WITH SDK](/developing_with_sdk/index).

Please let us know how you like it and what could be improved by [submitting an issue](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/new/choose) or [asking questions](https://github.com/Project-MONAI/monai-deploy-app-sdk/discussions)