Machine learning OCR with Convolutional Recurrent Neural Network (CRNN). The input shape is (32, 400), so if your dataset has different shapes, you need to resize the inputs or modify the architecture.
python3 generate_dateset.py
There're many ways to train the model, you can just run python3 crnn-ctc.py
on your machine,
but it probably has poor performance if you do not have a high-performance GPU (or TPU) and CUDA support.
Or you can train your model in the cloud (e.g. AWS), but it's absolutely not free.
The way I recommend is Colab, it provides you great
GPUs (and TPUs) and is totally free.
You can take a look at ocr.ipynb.
Download best_model.hdf5
and put it into the current directory.
A pre-trained model here: best_model.hdf5
python3 generate_dataset.py 1 | xargs python3 predict.py