SimpleHTR recognizes handwriting in scanned word or line images using a TensorFlow neural network trained on IAM-style data.
Overview
SimpleHTR is an offline handwritten text recognition (HTR) system built with TensorFlow. It reads grayscale images of single words or full text lines and outputs the recognized characters as digital text, matching the kind of workflow used to transcribe ink from scanned documents.
The recognition stack uses convolutional layers for image features, LSTM recurrent layers to propagate context along the line, and Connectionist Temporal Classification for training and decoding. You can run inference on your own images with pretrained weights, train on the IAM dataset, or validate accuracy against held-out data.
Decoding options include best-path, beam search, and an optional word beam search decoder that constrains words to a dictionary while still allowing numbers and punctuation. A line-level mode handles multiple words in one image; a word-level model targets single words per image.
A public web demo is offered for trying recognition without a local setup. On Windows, the word beam search decoder is supported alongside the other decoders.
Key features
- Single-word and text-line image input
- CTC training and multiple decoders
- Optional word beam search decoding
- Pretrained IAM models for inference
- IAM dataset training pipeline
- LMDB fast image loading for training
- TensorFlow 2 compatible codebase
- Command-line train, validate, and infer modes
Use cases
- Transcribing scanned handwritten words
- Recognizing text lines in document images
- Research and training on IAM-style HTR data
- Trying HTR via the hosted web demo
- Comparing CTC decoder strategies on difficult samples