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.36k stars 347 forks source link

Keras_ocr library not detecting specific texts from the image #221

Closed Immanuel-Codoid closed 1 year ago

Immanuel-Codoid commented 1 year ago

I'm currently using keras_ocr library to detect and extract text data from control diagrams, it detects almost all of the text in the control diagrams but missing out some and I don't know why.

I tried with the code example from the keras_ocr document

import matplotlib.pyplot as plt
import keras_ocr
pipeline = keras_ocr.pipeline.Pipeline()
images = [
    keras_ocr.tools.read(img) for img in ['./function_diagram.PNG',
                                          './multi_function_diagram.PNG'
    ]
]
prediction_groups = pipeline.recognize(images)
fig, axs = plt.subplots(nrows=len(images), figsize=(20, 20))
for ax, image, predictions in zip(axs, images, prediction_groups):
    keras_ocr.tools.drawAnnotations(image=image, predictions=predictions, ax=ax)

test

Note: You can see in the detection image that it is not detecting text "110" from the image, how to solve this so that it detects all the text in the image.

Help is much appreciated in advance