Thulium
State-of-the-art multilingual handwriting text recognition.
Thulium is a production-ready Python library for offline handwritten text recognition (HTR) supporting 52+ languages across Latin, Cyrillic, Greek, Arabic, Hebrew, Devanagari, Chinese, Japanese, Korean, and Georgian scripts.
Features
- 52+ Languages — Comprehensive multilingual support with script-aware processing
- Production Ready — Optimized inference with ONNX export and mixed precision
- State-of-the-Art — CNN/ViT backbones with Transformer/LSTM sequence heads
- Explainable AI — Attention visualization, saliency maps, and confidence analysis
- Flexible Decoding — CTC beam search with n-gram and neural language models
Installation
pip install thulium
For GPU acceleration:
pip install thulium[gpu]
Quick Start
from thulium import recognize_image
# Single image recognition
result = recognize_image("document.png", language="en")
print(result.text)
# Batch recognition with confidence scores
from thulium import HTRPipeline
pipeline = HTRPipeline.from_pretrained("thulium-base-multilingual")
results = pipeline.recognize_batch(images, languages=["en", "de", "fr"])
for r in results:
print(f"{r.text} (confidence: {r.confidence:.2%})")
Supported Languages
52+ languages across 10 scripts (click to expand)
| Region | Languages |
|---|---|
| Western Europe | English, German, French, Spanish, Italian, Portuguese, Dutch |
| Scandinavia | Swedish, Norwegian, Danish, Finnish, Icelandic |
| Eastern Europe | Polish, Czech, Hungarian, Romanian, Bulgarian, Ukrainian, Russian |
| Baltic | Lithuanian, Latvian, Estonian |
| Caucasus | Georgian, Armenian, Azerbaijani |
| Middle East | Arabic, Hebrew, Persian, Turkish |
| South Asia | Hindi, Bengali, Tamil, Telugu, Urdu |
| East Asia | Chinese, Japanese, Korean |
Documentation
| Guide | Description |
|---|---|
| Getting Started | Installation and first steps |
| API Reference | Complete API documentation |
| Model Zoo | Pretrained model catalog |
| Training Guide | Train custom models |
| Architecture | System design overview |
Performance
Benchmarks on IAM Handwriting Database:
| Model | CER | WER | Latency |
|---|---|---|---|
| thulium-tiny | 5.2% | 14.1% | 12ms |
| thulium-base | 3.8% | 10.2% | 28ms |
| thulium-large | 2.9% | 7.8% | 65ms |
Measured on NVIDIA A100, batch size 1, PyTorch 2.0+
Citation
@software{thulium2025,
title={Thulium: Multilingual Handwriting Recognition},
author={Thulium Authors},
year={2025},
url={https://github.com/thulium-dev/thulium}
}
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
License
Apache 2.0 — see LICENSE for details.
Metadata
Release files for thulium-htr 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| thulium_htr-1.2.1.tar.gz | 180.9 kB | Without provenance | Details for thulium_htr-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| thulium_htr-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for thulium_htr-1.2.1-py3-none-any.whl |
Total release size: 356.2 kB
Release files / thulium_htr-1.2.1.tar.gz
| Download URL | thulium_htr-1.2.1.tar.gz |
|---|---|
| Size | 180.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7be1c631265861726b5223d3d34829ba939ce84c16c7bc619c5be15b42790eee
|
|
BLAKE2b-256 checksum How to use checksums |
bea203338822954f6c60e391a2d1e38fdac7661fb7af3e156325c82b27428dc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.1
|
Release files / thulium_htr-1.2.1-py3-none-any.whl
| Download URL | thulium_htr-1.2.1-py3-none-any.whl |
|---|---|
| Size | 175.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2326b9b317d0838d5535057f688f1a0e3403e74c24ad845dac241c710451079e
|
|
BLAKE2b-256 checksum How to use checksums |
a05fb28ee3a1394887cb7d7564991b81be6bc177d77ef5f7bbf0080678b5e37d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.1
|
Security for thulium-htr 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.