Skip to content

Commit 709813b

Browse files
committed
⏪ Revert changes to multi_task_segmentor.py and nucleus_instance_segmentor.py
1 parent a8d28c1 commit 709813b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tiatoolbox/models/engine/multi_task_segmentor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def _process_tile_predictions(
415415
tile_mode,
416416
tile_output,
417417
self._wsi_inst_info,
418-
self._get_model_attr("postproc_func"),
418+
self.model.postproc_func,
419419
self.merge_prediction,
420420
self.pretrained_model,
421421
]

tiatoolbox/models/engine/nucleus_instance_segmentor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,6 @@ def _infer_once(self: NucleusInstanceSegmentor) -> list:
635635
position=0,
636636
)
637637

638-
infer_batch = self._get_model_attr("infer_batch")
639638
cum_output = []
640639
for _, batch_data in enumerate(self._loader):
641640
sample_datas, sample_infos = batch_data
@@ -646,7 +645,7 @@ def _infer_once(self: NucleusInstanceSegmentor) -> list:
646645

647646
# assume to return a list of L output,
648647
# each of shape N x etc. (N=batch size)
649-
sample_outputs = infer_batch(
648+
sample_outputs = self.model.infer_batch(
650649
self._model,
651650
sample_datas,
652651
device=self._device,
@@ -775,7 +774,7 @@ def _process_tile_predictions(
775774
tile_mode,
776775
tile_output,
777776
self._wsi_inst_info,
778-
self._get_model_attr("postproc_func"),
777+
self.model.postproc_func,
779778
self.merge_prediction,
780779
]
781780
if self._postproc_workers is not None:

0 commit comments

Comments
 (0)