Getting error: Standard exception caught in Qt event handler invalid vector subscript and with another model of breast seg model I get FAST exception caught in Qt event handler input port 1 on process object Segmentation Network is missing its required connection #182
Replies: 2 comments
-
"input port 1 on process object Segmentation Network is missing its required connection" happens here because the unet_tumour_refinement_model_fix-opset9.onnx model is a refinement model which has 2 inputs. Also, this is not a patch-wise model. Not sure about the other error, but I can look into it. |
Beta Was this translation helpful? Give feedback.
-
The other error you have is because the patch wise breast cancer model "pw_tumour_mobilenetv2_model.onnx" is not a segmentation network it is a image classification network. Thus you have to run it through NeuralNetwork not SegmentationNetwork and then display the results using heatmap renderer. Here is an example, in which non-tumour areas are highlighted as green, and tumour areas are highlighted as red: import fast
image_path = 'path to your WSI'
model = fast.DataHub().download('breast-tumour-segmentation-model')
importer = fast.WholeSlideImageImporter.create(image_path)
tissueSegmentation = fast.TissueSegmentation.create()\
.connect(importer)
generator = fast.PatchGenerator.create(
256, 256,
magnification=10,
overlapPercent=0
).connect(importer)\
.connect(1, tissueSegmentation)
segmentation = fast.NeuralNetwork.create(
model.paths[0] + '/pw_tumour_mobilenetv2_model.onnx',
scaleFactor=1./255.,
).connect(generator)
stitcher = fast.PatchStitcher.create()\
.connect(segmentation)
renderer = fast.ImagePyramidRenderer.create()\
.connect(importer)
heatmapRenderer = fast.HeatmapRenderer.create(channelColors={0: fast.Color.Green(), 1: fast.Color.Red()})\
.connect(stitcher)
fast.SimpleWindow2D.create()\
.connect(renderer)\
.connect(heatmapRenderer)\
.run() |
Beta Was this translation helpful? Give feedback.
-
model = fast.DataHub().download('breast-tumour-segmentation-model')
importer = fast.WholeSlideImageImporter.create(
image_path)
tissueSegmentation = fast.TissueSegmentation.create()
.connect(importer)
generator = fast.PatchGenerator.create(
256, 256,
magnification=20,
overlapPercent=0
).connect(importer)
.connect(1, tissueSegmentation)
segmentation = fast.SegmentationNetwork.create(
model.paths[0] + '/unet_tumour_refinement_model_fix-opset9.onnx',#high_res_nuclei_unet.onnx',
scaleFactor=1./255.
).connect(generator)
stitcher = fast.PatchStitcher.create()
.connect(segmentation)
renderer = fast.ImagePyramidRenderer.create()
.connect(importer)
segmentationRenderer = fast.SegmentationRenderer.create()
.connect(stitcher)
fast.SimpleWindow2D.create()
.connect(renderer)
.connect(segmentationRenderer)
.run()
Beta Was this translation helpful? Give feedback.
All reactions