Small project on developing a Handwritten Text Recognition (HTR) System over a Streamlit Web Application. Using pre-trained models implemented on TensorFlow and trained on the IAM off-line HTR dataset. These models take images of single words or text lines (multiple words) as input and output the recognized text.
The images are obtained by extracting it from a box (canvas) in which the user can draw or uploading a file with handwritten text on the Streamlit app.
- Clone this repo
git clone https://github.com/Josemvg/HandWriting-Recognition
- Install the required Python Libraries
pip install requirements.txt
- Download the pretrained models and extract them on the model folder, under line-word and model-word folders respectively:
- Next, to run the WebApp execute runner.py or the streamlit app (from the app folder) by using:
streamlit run webapp.py
-
Once you have the app running, you may now select the Model and Decoder or stick to the Default.
Note: For a tutorial on how to configure Word Beam Search Decoder, please visit the SimpleHTR Repository
You can start using the app either by writing on the canvas (bear in mind that you can change the stroke width of the pen as well):
Or by uploading an image from your own device:
-
Finally, press the Infer button to obtain the most accurate candidate according to the Model, and its probability.
Models used on this app pertain to the SimpleHTR Repository by Harald Scheidl.