Skip to content

Conversation

@MMelQin
Copy link
Collaborator

@MMelQin MMelQin commented Oct 1, 2025

Pull Request Overview

This PR intends to remove pinning monai<=1.5.0, after having identified, analyzed and found resolutions to the issues in MONAI (more precisely errors in the older MONAI models' inference config for mixing up patient anatomical coordinate system, RAS vs LPS)

  • The PR #8473 to address the orientation issue is included in MONAI v1.5.1, and it enables the proper handling of image/Metatensor using LPS+ anatomical coordinate system, e.g. DICOM Radiology images. The App SDK had been setting this metadata space correctly, so no changes needed except for moving it to the DICOM series to volume operator.
  • The example apps fail to get good segmentation because the older MONAI models' configs have orientation transform to RAS in the pre-processing transforms. They can get correct seg result after correcting the model's pre-processing transforms. Detailed analysis in [BUG] Examples using older MONAI Bundles not compatible with MONAI v1.5.1 (which reveals errors in older MONAI bundles) #557.
  • MONAI v1.5.1 supports torch 2.8 which has embedded CUDA Runtime that is compatible with Holoscan SDK v3.6, so now technically MD App SDK is compatible with HSDK v3.6.0.
  • Tested example apps that could and did change inference config to target orientation LPS instead of RAS, and obtained correct inference results.

Note

  • Even though technically the App SDK works with MONAI 1.5.1 and Holoscan 3.6.0, documentation build fails if requiring Holoscan 3.6.0 because the former needs Python 3.9 while the latter requires min Python be 3.10. So, the SDK still pins Holoscan SDK <=3.5.0.
  • Example apps using MONAI Bundle (without means to alter its inference config for the pre-processing orientation to target LPS) would fail because the models in MONAI Model Zoo and Huggingface still have RAS orientation in their inference configs.

This is done after having analyzed and found resolutions to issues
in example apps with monai v1.5.1, and after testing the fix to the
monai model inference configs that mix up RAS with LPS

Signed-off-by: M Q <mingmelvinq@nvidia.com>
@MMelQin MMelQin requested a review from Copilot October 1, 2025 00:08
@MMelQin MMelQin changed the title Remove pinning highest versions of holoscan and monai. Remove pinning highest versions of monai. Oct 1, 2025
@MMelQin MMelQin requested a review from Copilot October 1, 2025 00:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MMelQin MMelQin requested a review from Copilot October 1, 2025 00:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: M Q <mingmelvinq@nvidia.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
@MMelQin MMelQin requested a review from Copilot October 1, 2025 01:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 1, 2025

@MMelQin
Copy link
Collaborator Author

MMelQin commented Oct 1, 2025

This is the result after running the example application for the MONAI Spleen Seg model with its pre-processing Orientation target changed from RAS to LPS on a production DICOM CT series from TCIA. In the display are both the volume and seg image in NIfTI, saved with MONAI pre-processing and post-processing transforms. Note the IJKtoRASDirections for the rendering image with anatomical LPS+ coordinate system.

DICOM_CT_to_MONAI_Vol_and_Seg_NIfTI_with_corrected_OrientationD_LPS_Screenshot 2025-09-30 202604

@MMelQin MMelQin merged commit d1e94f7 into main Oct 1, 2025
6 checks passed
@MMelQin MMelQin deleted the mq/unpin_dependencies branch November 5, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants