I use python and keras ocr. I want keras to recognize only numbers, so in pipeline i do this.
recognizer = keras_ocr.recognition.Recognizer(alphabet="0123456789")
pipeline = keras_ocr.pipeline.Pipeline(recognizer=recognizer)
But instead of turning letters to digits and improving quality of recognition like tesseract whitelist it happens.
So the numbers are not recognized at all.
With default alphabet the result is better. But some digits are confused with letters. However change letters to digits like "replace("O", "0")" is quite a bad idea.
Function for recognizing is simple and copied :)
_image = keras_ocr.tools.read(_path)
plt.figure(figsize=(10, 20))
plt.imshow(_image)
prediction = pipeline.recognize([_image])[0]
fig, axs = plt.subplots(1, figsize=(10, 20))
keras_ocr.tools.drawAnnotations(image=_image, predictions=prediction, ax=axs)
plt.show()