model-zoo icon indicating copy to clipboard operation
model-zoo copied to clipboard

ONNX model connector

Open diazandr3s opened this issue 3 years ago • 5 comments

Are we considering creating a ONNX connector for MONAI Bundle? This potentially boost MONAI and MONAI Label usability.

diazandr3s avatar Aug 17 '22 12:08 diazandr3s

Hi @diazandr3s ,

Thanks for raising it. Actually, ONNX and TorchScript are optional models in a bundle, you can check: https://docs.monai.io/en/latest/mb_specification.html#directory-structure

Thanks.

Nic-Ma avatar Aug 17 '22 15:08 Nic-Ma

Superb! Thanks, @Nic-Ma I missed this part Is there any tutorial that we can use as a reference? A MONAI Label user wants to export an ONNX model that also includes functions that are not in MONAI Maybe this should be part of a discussion rather than an issue? :)

diazandr3s avatar Aug 17 '22 16:08 diazandr3s

Hi @diazandr3s ,

@binliunls is developing some TorchScript -> ONNX script, will share it soon. And @ericspod may also have some examples.

Thanks.

Nic-Ma avatar Aug 17 '22 16:08 Nic-Ma

I had only briefly experimented with ONNX in the past when discussing Torchscript behaviour: https://gist.github.com/ericspod/65809935adf783c17bdcf19c5568f0fe

ericspod avatar Aug 18 '22 13:08 ericspod

Thanks, @ericspod

diazandr3s avatar Aug 18 '22 16:08 diazandr3s