arthurflor23/handwritten-text-recognition

Handwritten Text Recognition

What it solves

Handwritten text recognition (HTR) is the task of converting images of handwritten text into machine-readable characters. This project provides a complete, configurable workflow for building and using HTR models, covering everything from raw data preparation to training, testing, and real-time inference. It also addresses common challenges like limited training data by supporting handwriting synthesis and spelling correction.

How it works

The toolkit is built on TensorFlow and exposes a command-line interface with many parameters to control the entire pipeline. It can train separate models for recognition, synthesis, segmentation, writer identification, and spelling correction. The recognition model reads an image of handwritten text and outputs transcribed text, while the synthesis model generates artificial handwriting from text, which can then be used to augment training data. MLflow is integrated for tracking experiments, logging metrics, and storing model runs, making it easy to compare different configurations and reproduce results. Users can choose from a wide range of integrated datasets (IAM, RIMES, CVL, etc.) or even use font files as synthetic data sources. Data augmentation transforms (rotation, noise, elastic distortion, and more) are also available to improve model robustness.

Who it’s for

Researchers, students, and developers working on handwritten text recognition who need a flexible, reproducible framework. It is especially useful for those who want to experiment across multiple datasets, compare different model architectures, or need to train with limited real data by leveraging synthesis. The MLflow integration also appeals to teams that emphasize experiment tracking and model management.

Highlights

  • Supports a wide array of well-known HTR datasets (IAM, RIMES, CVL, etc.) out of the box.
  • Integrates MLflow for experiment tracking, run logging, and model reproducibility.
  • Includes both recognition and synthesis models, enabling data augmentation with synthetic handwriting.
  • Offers a rich set of data augmentation and preprocessing options (illumination compensation, binarization, and geometric transforms).
  • Provides command-line flags for training, testing, inference, and checkpoint operations, with easy combinations for custom workflows.

Related

  • Project
  • Project
  • Project
  • Project
  • Project