You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to perform a Nucleus Instance Segmentation task using the mapde-conic model pre-trained on the CoNIC Dataset and tried generating patches. While the predictions work well, an error occurs during the post-processing step. Could you kindly advise on how to address this issue?
What I Did
[Execution Code]
img_file_name_lists = ["sample_tile.png"]
from tiatoolbox.models import IOSegmentorConfig
ioconfig = IOSegmentorConfig(
input_resolutions=[
{'units': 'mpp', 'resolution': 0.25}
],
output_resolutions=[
{'units': 'mpp', 'resolution': 0.25},
{'units': 'mpp', 'resolution': 0.25},
{'units': 'mpp', 'resolution': 0.25},
{'units': 'mpp', 'resolution': 0.25}
],
margin=26,
tile_shape=[1024, 1024],
patch_input_shape=(252, 252),
patch_output_shape=(150, 150),
stride_shape=(150, 150),
save_resolution={'units': 'mpp', 'resolution': 0.25}
)
# Tile prediction
inst_segmentor = NucleusInstanceSegmentor(
pretrained_model="mapde-conic",
num_loader_workers=2,
num_postproc_workers=2,
batch_size=4,
)
tile_output = inst_segmentor.predict(
img_file_name_lists,
save_dir="sample_tile_results/",
mode="tile",
on_gpu=False,
crash_on_exception=False,
ioconfig=ioconfig
)
"""
[Error Code]
"""
Traceback (most recent call last):
File "/home/ueda/.pyenv/versions/3.10.15/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/ueda/kobe/lib/python3.10/site-packages/tiatoolbox/models/engine/nucleus_instance_segmentor.py", line 281, in _process_tile_predictions
head_predictions = [v[idx][0] for v in predictions]
File "/home/ueda/kobe/lib/python3.10/site-packages/tiatoolbox/models/engine/nucleus_instance_segmentor.py", line 281, in <listcomp>
head_predictions = [v[idx][0] for v in predictions]
IndexError: tuple index out of range
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ueda/kobe/lib/python3.10/site-packages/tiatoolbox/models/engine/semantic_segmentor.py", line 1225, in _predict_wsi_handle_exception
self._predict_one_wsi(wsi_idx, ioconfig, str(wsi_save_path), mode)
File "/home/ueda/kobe/lib/python3.10/site-packages/tiatoolbox/models/engine/nucleus_instance_segmentor.py", line 753, in _predict_one_wsi
self._merge_post_process_results()
File "/home/ueda/kobe/lib/python3.10/site-packages/tiatoolbox/models/engine/nucleus_instance_segmentor.py", line 805, in _merge_post_process_results
raise future.exception() # noqa: RSE102
IndexError: tuple index out of range
The text was updated successfully, but these errors were encountered:
Description
I attempted to perform a Nucleus Instance Segmentation task using the mapde-conic model pre-trained on the CoNIC Dataset and tried generating patches. While the predictions work well, an error occurs during the post-processing step. Could you kindly advise on how to address this issue?
What I Did
[Execution Code]
The text was updated successfully, but these errors were encountered: