-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Describe the bug
TL,DR:
After a bit more investigation, it has been determined that the older MONAI segmentation models/bundles trained with flipped DICOM CT images from the Medical Decathlon dataset incorrectly re-orient image to "RAS", and this issue finally shows after the orientation transform is improved in monai v1.5.1 to recognize correctly the DICOM image orientation. Details are in the comment below.
A compatibility issue has been observed after monai v1.5.1 has been released and the said version is installed in the Python environment for running the example apps.
MD App SDK itself does not has a direct package dependency on monai, however monai is required for a majority of example apps. The update v1.5.1 was released on 09/22 to enhance the support of the latest NVIDIA GPUs and to support torch 2.7 and 2.8 as as such latest CUDA runtime 12.
With high hope that this monai update will allow App SDK to be compatible with the latest Holoscan SDK which requires CUDA runtime >=12.6, test revealed that example applications execute without errors, but the results, e.g. segmentation and the STL generated from it, are not correct.
Steps/Code to reproduce bug
- Clone this repo and CD to the repo root
- Pick an example app, e.g. examples/apps/ai_spleen_seg_app
- Create and activate venv
python3 -m venv .testenv && source .testenv/bin/activate
- Install monai-deploy-app-sdk (not using the dev mode)
pip install monai-deploy-app-sdk
- Install dependencies in the requirements.txt as is
pip install -r examples/apps/ai_spleen_seg_app/requirements.txt
- Note the monai version,
pip list | grep monai
- Stage the model and input DICOM files, and set env vars, e.g.
export HOLOSCAN_INPUT_PATH="inputs/spleen_ct_tcia"
export HOLOSCAN_MODEL_PATH="models/spleen_ct"
export HOLOSCAN_OUTPUT_PATH="output_spleen"
- Run the app
python /home/mqin/src/md-app-sdk/examples/apps/ai_spleen_seg_app
- Once the app completes successfully, look for the spleen.stl file in the
stl
folder
ls $HOLOSCAN_OUTPUT_PATH
- Render the stl and see the broken surface.
Expected behavior
The latest monai v1.5.1 also introduced some changes in image and meta tensor transforms, the App SDK's built-in opertors will need to be reviewed, updated, and tested to be working with the latest monai. Given the breaking changes, the App SDK will also need to pin monai>=1.5.1, but for now, <=1.5.0.
Environment details (please complete the following information)
- OS/Platform: Ubuntu 22.04 LTS x86_64
- Python Version: 3.10
- Method of MONAI Deploy App SDK install: pip
- SDK Version: 3.5.1
Additional context
Workaround is for the example apps to pin monai<=1.5.0
Metadata
Metadata
Assignees
Labels
Type
Projects
Status