Skip to content

Speed of monai.deploy.core.Application #325

Answered by MMelQin
Leengit asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks @Leengit for the question and sorry for the belated reply.

The App SDK app initialization does take some time, and in my crude measurements, about 2 second for the Spleen and UNETR example app. On the application initialization, the execution context needs to be created, by first figuring out the graph, mapping the I/O in memory as well FS, and more importantly and costly, the loading of the TorchScript.

If the cost of initialization is a big concern, and you have a batch of discreet inputs to process, there are ways to reuse the already instantiated App object, by creating a new main function and call the run method multiple times. I wrote up an example and put it on the discussi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Leengit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants