FLming / CRNN.tf2

Convolutional Recurrent Neural Network(CRNN) for End-to-End Text Recognition - TensorFlow 2
MIT License
152 stars 56 forks source link

the problem of Tibetan text recognition #8

Closed xc-Cyuan closed 3 years ago

xc-Cyuan commented 3 years ago

Hi, dear, it seems that you use 'chars = tf.strings.unicode_split(labels, 'UTF-8')' to split label strings in the project, now I want using the graphemes function to split charactors of Tibetan(Tibetan characters are variable length unicode), but I get the error 'OperatorNotAllowedInGraphError: iterating over tf.Tensor is not allowed: AutoGraph did not convert this function. Try decorating it directly with @tf.function.' . What should I do? Or do you have any good suggestions?

FLming commented 3 years ago

About my first idea, maybe you can add some splittable char(, or #) to you label, then use tf.string.split to split it.

xc-Cyuan commented 3 years ago

About my first idea, maybe you can add some splittable char(, or #) to you label, then use tf.string.split to split it.

Ok, thank you very much! I think I know what to do, and I will rebuild the style of labels for my dataset.