faustomorales / keras-ocr

A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.
https://keras-ocr.readthedocs.io/
MIT License
1.38k stars 355 forks source link

provide information on invalid character in recognition data generator #133

Closed lambdaofgod closed 3 years ago

lambdaofgod commented 3 years ago

Problem

Recognition data generator doesn't provide information when data contains characters which weren't part of given alphabet.

This fix makes it explicit.

faustomorales commented 3 years ago

The CI failure here is due to the pin on TF 2.1.0, which is affected by this issue. I'll bump TensorFlow in another change.

faustomorales commented 3 years ago

Thank you so much for this PR to make the error message more helpful. I'm sure this will help a lot of people out.