Description
SimpleHTR is a handwritten text recognition system built with TensorFlow and trained on the IAM off-line handwriting dataset. It takes an image of a single word or a line of text and outputs the recognized text. The author reports that about three quarters of the validation-set words are recognized correctly, with a character error rate of around 10 percent. The repository includes two pretrained models that you download and place in the model folder. One is trained on word images and gives better results on the IAM word dataset. The other is trained on text-line images and can read several words in one picture. To run the demo, you change into the src folder and run python main.py for a word image, or pass --img_file for a line image. Command-line options select train, validate or infer mode, choose a CTC decoder among best path, beam search and word beam search, set the batch size and dataset folder, load images faster with LMDB, and dump the network output to CSV. Word beam search, which limits words to a dictionary while still allowing numbers and punctuation, needs an extra compiled package from the CTCWordBeamSearch repository. The README also mentions a 2023 web demo and a related HTRPipeline package for reading full pages.…
Highlights
- Reads single words or full text lines from images
- Pretrained word and line models
- Best path, beam search and word beam search decoders
- Training and validation on the IAM dataset
- Web demo and HTRPipeline package for full pages
Ratings & Reviews
No ratings yet
Be the first to rate SimpleHTR.
People also visit
ASRT_SpeechRecognition
A Deep-Learning-Based Chinese Speech Recognition System 基于深度学习的中文语音识别系统
SimpleHTR FAQ
What does SimpleHTR do?
It recognizes handwritten words or text lines in an image and outputs the text.
Does it come with a trained model?
Yes. The README links two pretrained models, one for words and one for text lines, to download.
How do I run it?
Put the model files in the model folder, go to src, and run python main.py for a word image or main.py with --img_file for a line image.
How accurate is it?
The author reports about three quarters of the validation-set words correct and a character error rate of around 10 percent.
Can it use a dictionary?
Yes, with the word beam search decoder, which needs an extra package from the CTCWordBeamSearch repository.
Is there a demo I can try in a browser?
The README mentions a web demo added in 2023.
What are the best SimpleHTR alternatives?
Popular alternatives to SimpleHTR include ASRT_SpeechRecognition, Texo and MixTeX-Latex-OCR. See all SimpleHTR alternatives

