Open Schneipi opened 1 year ago
Probably a problem with recent TensorFlow updates. We already migrated to 2.0, but not sure which was the last tested version.
Could you try replacing s[1]
with s[1] or -1
on line https://github.com/OCR-D/ocrd_anybaseocr/blob/94e503719f25b6c579b14b1e4b0574cd884929d4/ocrd_anybaseocr/mrcnn/model.py#L964 ?
Thanks for the quick suggestion. Doesn't seem to do the trick unfortunately:
TypeError: in user code:
File ".../venv/lib/python3.8/site-packages/ocrd_anybaseocr/mrcnn/model.py", line 823, in call *
detections_batch = utils.batch_slice(
File ".../venv/lib/python3.8/site-packages/ocrd_anybaseocr/mrcnn/utils.py", line 795, in batch_slice *
output_slice = graph_fn(*inputs_slice)
File ".../venv/lib/python3.8/site-packages/ocrd_anybaseocr/mrcnn/model.py", line 709, in refine_detections_graph *
probs = tf.where(tf.cast(K.tile(K.expand_dims(active_class_ids, 0), (probs.shape[0],1)), tf.bool),
File ".../venv/lib/python3.8/site-packages/keras/backend.py", line 3893, in tile
return tf.tile(x, n)
TypeError: Failed to convert elements of (Dimension(None), 1) to Tensor. Consider casting elements to a supported type. See https://www.tensorflow.org/api_docs/python/tf/dtypes for supported TF dtypes.
I installed ocrd_anybaseocr
according to the install instructions in https://github.com/OCR-D/ocrd_anybaseocr#installing.
The venv now contains Tensorflow 2.11.0
.
I receive a
ValueError
when runningocrd-anybaseocr-block-segmentation
on a single test image. I have tried different input groups (i.e. binarized/unbinarized) without success. The relatedblock_segmentation_weights.h5
model has been correctly downloaded. Is there a way to avoid this error? Thanks for the help!