Keras OCR - Getting different results from Keras

31 Views Asked by At

ultralytics_crop_objects is a list with like 20 numpy.ndarray, which are representing pictures (59, 381, 3) e.g.:ultralytics_crop_objects[5].

I started passing a single picture out of the list to recognize.

pipeline.recognize([ultralytics_crop_objects[5]])
--> ji856931

The result is "ji856931". So not all characters where detected.

But when I pass the entire list of pictures and look at the result for the 6th picture, the result is different. See: [Different Results][1]

results = pipeline.recognize(ultralytics_crop_objects)
results[5] --> ji8569317076

I don't understand it at all. I would be super happy if someone could provide a hint. My only explanation would be that Keras OCR is using a different detection threshold for a single picture than for a list of more than one picture. Could that be the case? 3 out of 20 Pictures having a different result

I have checked multiple times to ensure that I did not accidentally use another pipeline or that the input pictures are different. However, they are the same. I have also done extensive research online.

Heres the complete Code:

import keras_ocr
pipeline = keras_ocr.pipeline.Pipeline()

results = pipeline.recognize([ultralytics_crop_objects[5]])
print(results)

results = pipeline.recognize(ultralytics_crop_objects)
print(results[5])
0

There are 0 best solutions below