Handwritten Text Recognition (HTR) system implemented using TensorFlow 2.0 and trained on the Bentham/IAM/Rimes/Saint Gall/Washington offline HTR datasets. This Neural Network model recognizes the text contained in the images of segmented texts lines.
Data partitioning (train, validation, test) was performed following the methodology of each dataset. The project implemented the HTRModel abstraction model (inspired by CTCModel) as a way to facilitate the development of HTR systems.
Notes:
- All references are commented in the code.
- This project doesn't offer post-processing, such as Statistical Language Model.
- Check out the presentation in the doc folder.
- For more information and demo run step by step, check out the tutorial on Google Colab/Drive.
a. Bentham
b. IAM
c. Rimes
d. Saint Gall
e. Washington
- Python 3.x
- OpenCV 4.x
- editdistance
- TensorFlow 2.0
--source
: dataset/model name (bentham, iam, rimes, saintgall, washington)--arch
: network to be used (puigcerver, bluche, flor)--transform
: transform dataset to the HDF5 file--cv2
: visualize sample from transformed dataset--train
: train model using the source argument--test
: evaluate and predict model using the source argument--image
: predict a single image with the source parameter--kaldi_assets
: save all assets for use with kaldi--epochs
: number of epochs--batch_size
: number of the size of each batch
A Jupyter Notebook is available to demo run, check out the tutorial on Google Colab/Drive.
Bentham sample with default parameters in the tutorial file.
- Preprocessed image (network input)
- TE_L: Ground Truth Text (label)
- TE_P: Predicted text (network output)