monai.deploy.exceptions.ItemNotExistsError: A predictor of the model is not set. for the custom model i created using monai label. #444
ArpanGyawali
started this conversation in
General
Replies: 1 comment 3 replies
-
The MONAI Deploy App SDK model network loader supports TorchScript, so the model needs to be traced/scripted to a TorchScript file. Better yet, if a MONAI Bundle is created (assuming just with pre_processing, post_processing, and infer), the built MONAI Bundle Inference operator can be to automate these steps in the app. The least preferred way is to write a custom inference operator which does the model loading from the well-known path, and handle the pre and post processing steps. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My task: Skull stripping
What I did:
Rewrote the config, infers, and trainers file of the segmentation-spleen model within radiology by changing labels, roi, and transforms as required and renamed it as segmentation-brain.
Then, I annotated my own dataset for skull stripping using 3D slicer. The only label used was "brain"
Then I trained the images and its label using the custom segmentation-brain model using monai label extension in 3d slicer and got a dice score of about 0.98 and I am happy with the result.
Now I am trying to deploy the model for inference using monai-deploy-app-sdk.
For that, I used the model.pt file saved inside the apps/radiology/models/segmentation brain directory in the command
python app.py -i input_dir -o output_dir -m model.pt
But I am getting the error: ItemNotExistsError: A predictor of the model is not set
How can I get the saved inference model file that can be used while deploying? Do we need a torchscript file of the model? If yes then how to get that?
Any help would be very appreciated.
Beta Was this translation helpful? Give feedback.
All reactions