NVIDIA / monai-cloud-api

MONAI Cloud API developments for intelligent imaging and learning tools, fostering innovation in medical imaging and AI-driven services.
Apache License 2.0
24 stars 12 forks source link

Add realtime inference bundle requirements #85

Closed yiheng-wang-nv closed 6 months ago

zephyrie commented 6 months ago

@yiheng-wang-nv, I've used your base structure and information and re-written some of it. Please adjust and verify the information. Thanks!

How to Prepare a Custom Bundle for Real-Time Inference

This guide explains the requirements to prepare a custom bundle for real-time inference using MONAI.

Bundle Requirements

To ensure compatibility, your bundle must adhere to the following requirements:

  1. Follow the MONAI Bundle Specification: Your bundle should conform to the structure and components outlined in the MONAI Bundle Specification. This specification defines the necessary files, folders, and configurations required for a bundle to work seamlessly with MONAI's real-time inference pipeline.

  2. At a minimum, include these necessary files:

    • configs/metadata.json
    • configs/logging.conf
    • configs/inference.json (or using .yml, .yaml)

Required Components

Implement the following components in your bundle:

Version Compatibility

Ensure your bundle is compatible with monai==1.3.0 and torch==1.13.1.

Bundle Examples

To help you understand the structure and components of a MONAI bundle, you can refer to the following bundle examples:

Notebook Example

For a detailed, step-by-step walkthrough of using a custom MONAI bundle for real-time inference, refer to the notebook: Perform Real-time Inference with a Custom MONAI Bundle.ipynb.

In the "Configuring Experiment to Enable the Real-time Inference" section of the example notebook, you'll need to provide the URL to the location of your custom bundle in the bundle_url parameter when creating an experiment. Replace the URL used in the notebook with the URL pointing to your own bundle.

Nic-Ma commented 6 months ago

Hi @yiheng-wang-nv ,

I don't see the required keys of a bundle workflow to support the realtime inference.

Thanks.

Nic-Ma commented 6 months ago

Hi @yiheng-wang-nv ,

I think we need the bundle to provide output_dir key which is not in the required properties, right?

Thanks.

yiheng-wang-nv commented 6 months ago

Hi @zephyrie @Nic-Ma thanks for the comments, I updated the doc, could you help to recheck it? Thanks!

mingxin-zheng commented 6 months ago

Does it make more sense to merge it to @zephyrie 's branch, like this one? https://github.com/NVIDIA/monai-cloud-api/pull/82

yiheng-wang-nv commented 6 months ago

Hi @mingxin-zheng , sure, but may also need @zephyrie to update his branch, when I change the base branch, there are many notebook differences.

yiheng-wang-nv commented 6 months ago

let me close this PR and submit a new one which based on integrate_docs directly