File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,11 @@ def automatic_instance_segmentation(
115115 image_data = util .load_image_data (input_path , key )
116116
117117 ndim = image_data .ndim if ndim is None else ndim
118+
119+ # We perform additional post-processing for AMG-only.
120+ # Otherwise, we ignore additional post-processing for AIS.
121+ if isinstance (segmenter , InstanceSegmentationWithDecoder ):
122+ generate_kwargs ["output_mode" ] = None
118123
119124 if ndim == 2 :
120125 if (image_data .ndim != 2 ) and (image_data .ndim != 3 and image_data .shape [- 1 ] != 3 ):
@@ -308,11 +313,6 @@ def _convert_argval(value):
308313 ** amg_kwargs ,
309314 )
310315
311- # We perform additional post-processing for AMG-only.
312- # Otherwise, we ignore additional post-processing for AIS.
313- if isinstance (segmenter , InstanceSegmentationWithDecoder ):
314- generate_kwargs ["output_mode" ] = None
315-
316316 automatic_instance_segmentation (
317317 predictor = predictor ,
318318 segmenter = segmenter ,
You can’t perform that action at this time.
0 commit comments