Segmentation mask not showing after inference when using monai label in OHIF #1552
-
Hello, I have trained a model to segment blood vessels using a monai UNetR model on brain MRI. I have done so in jupyter notebook separately from monai. How did I do so far: My problem: This is why i am calling for help here, thank you for reading. Here is my code, I can provide more information if needed. ` Infers file for my unetrfrom typing import Callable, Sequence, Union import torch import lib.monai_inferers from monai.apps.deepedit.transforms import ( from monailabel.interfaces.tasks.infer_v2 import InferType class SegmentationUnetrCorticalVessels(BasicInferTask):
` Custom Infererimport os import matplotlib.pyplot as plt from monai.inferers import Inferer, Splitter, SlidingWindowSplitter, AvgMerger class unetrInferer(Inferer):
Here is one slice of the segmentation mask: ` Model and Settings
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @JackTheSturgeon, Thanks for the detailed discussion. Let us know |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
I resolved the problem. It was about the shape and values of my inference output tensor.
The output of the inference from the model has to be of shape:
My precise thought process to get to the solution:
When i did inference with the custom model on OHIF, t…