Replies: 4 comments 9 replies
-
Hi @ZDYsszz , Thanks for your feedback. Thanks. |
Beta Was this translation helpful? Give feedback.
-
we'll have this feature in v0.9, please see #4363 |
Beta Was this translation helpful? Give feedback.
-
hi @wyli I have modified DynUNet to have two heads for segmentation and classification. Basically for a patch of image it should generate the segmentation and classify the patch as 0 (no lesion) or 1 (contain lesion). The training works fine, however during validation using sliding_window_inference, I get the following error: Traceback (most recent call last):
File "/home/svesal/TRUSDetection/src_ucil/scripts/train_decison_normalized.py", line 487, in <module>
val_outputs = sliding_window_inference(
File "/home/svesal/anaconda3/lib/python3.9/site-packages/monai/inferers/utils.py", line 241, in sliding_window_inference
zoomed_start = original_idx[axis].start * zoom_scale[axis - 2]
IndexError: list index out of range Here is a snippet of the evaluation part. Based on the MONAI documentation for multi-output the sliding window_inference should give a dictionary of outputs. Doesn't it mean that val_outputs[0] contain segmentation and val_outputs[1] the classification score for all patches? roi_size = args.image_shape
sw_batch_size = 1
val_outputs = sliding_window_inference(val_inputs, roi_size, sw_batch_size, model)
val_outputs = [post_pred(i) for i in decollate_batch(val_outputs[0])]
val_labels = [post_label(i) for i in decollate_batch(val_labels)] |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm using monai version 1.1.0 and I'm still getting this error when using the sliding window inferer for multiple outputs. Are there any updates on this feature? Thanks |
Beta Was this translation helpful? Give feedback.
-
if the model has two or more outputs, the sliding_window_inference doesn't work,emm...
Beta Was this translation helpful? Give feedback.
All reactions