I'm trying to run steinbock segment deepcell --minmax and it's working fine for all my ROIs except one where I'm getting the following error:
ERROR steinbock.segmentation.deepcell - Error segmenting objects in img/IMC1 slide 94_008.tiff: in user code:
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1801, in predict_function *
return step_function(self, iterator)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1790, in step_function **
outputs = model.distribute_strategy.run(run_step, args=(data,))
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1783, in run_step **
outputs = model.predict_step(data)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1751, in predict_step
return self(x, training=False)
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.8/dist-packages/keras/engine/input_spec.py", line 264, in assert_input_compatibility
raise ValueError(f'Input {input_index} of layer "{layer_name}" is '
ValueError: Input 0 of layer "panopticnet" is incompatible with the layer: expected shape=(None, 256, 256, 2), found shape=(1, 2908, 256, 2)
Traceback (most recent call last):
File "/app/steinbock/steinbock/segmentation/deepcell.py", line 134, in try_segment_objects
mask = predict(img, **predict_kwargs)
File "/app/steinbock/steinbock/segmentation/deepcell.py", line 54, in predict
mask = app.predict(
File "/opt/steinbock-venv/lib/python3.8/site-packages/deepcell/applications/mesmer.py", line 306, in predict
return self._predict_segmentation(image,
File "/opt/steinbock-venv/lib/python3.8/site-packages/deepcell/applications/application.py", line 442, in _predict_segmentation
output_images = self._run_model(
File "/opt/steinbock-venv/lib/python3.8/site-packages/deepcell/applications/application.py", line 381, in _run_model
output_tiles = self._batch_predict(tiles=tiles, batch_size=batch_size)
File "/opt/steinbock-venv/lib/python3.8/site-packages/deepcell/applications/application.py", line 338, in _batch_predict
batch_outputs = self.model.predict(batch_inputs, batch_size=batch_size)
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/func_graph.py", line 1147, in autograph_handler
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1801, in predict_function *
return step_function(self, iterator)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1790, in step_function **
outputs = model.distribute_strategy.run(run_step, args=(data,))
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1783, in run_step **
outputs = model.predict_step(data)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1751, in predict_step
return self(x, training=False)
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.8/dist-packages/keras/engine/input_spec.py", line 264, in assert_input_compatibility
raise ValueError(f'Input {input_index} of layer "{layer_name}" is '
ValueError: Input 0 of layer "panopticnet" is incompatible with the layer: expected shape=(None, 256, 256, 2), found shape=(1, 2908, 256, 2)
I can't figure out why this is happening for just one ROI so any help would be really appreciated - thanks!
Hi there
I'm trying to run
steinbock segment deepcell --minmax
and it's working fine for all my ROIs except one where I'm getting the following error:I can't figure out why this is happening for just one ROI so any help would be really appreciated - thanks!