Optical character recognition using Tensorflow.
- Install Python 3.6 or lower (Tensorflow does not support newer versions).
- Clone or download the repository.
- Install the requirements using
pip install -r requirements.txt
. - Download a pretrained model from the release page if you do not want to train the model yourself.
- Extract the archive and move the
model.json
andweights.h5
files into thedata
directory.
If you want to train a model yourself you need to download the IAM dataset. After that you need to convert the dataset and train the model using the commands from the section below.
Command | Action |
---|---|
python app.pyw |
Starts the GUI application. |
python main.py --analyse |
Analyses the IAM dataset. |
python main.py --convert |
Converts the IAM dataset into the desired format. |
python main.py --rotate |
Rotates the converted IAM dataset to create more training data. |
python main.py --train |
Trains the model using the converted IAM dataset. |
python main.py --test |
Tests the trained model. |