TrOCR Small Handwritten
microsoft/trocr-small-handwritten
published Mar 2022 · updated May 2024
TrOCR Small Handwritten is an image-to-text model for optical character recognition (OCR) of handwritten text, using a Transformer encoder-decoder architecture.
specs
| Task | Image-to-Text (Optical Character Recognition) |
| Architecture | Transformer encoder-decoder (DeiT encoder, UniLM decoder) |
| Parameters | 62M |
| Finetuned On | IAM Handwriting Database |
about this model
Benchmark performance
| Benchmark | Metric | TrOCR-Small | TrOCR-Base (334M) | TrOCR-Large (558M) |
|---|---|---|---|---|
| IAM (handwritten) | Cased CER | 4.22 | 3.42 | 2.89 |
| SROIE (printed) | F1 | 95.86 | 96.34 | 96.60 |
Scene text recognition word accuracy (TrOCR-Base)
| Dataset | Accuracy |
|---|---|
| IIIT5K-3000 | 93.4 |
| SVT-647 | 95.2 |
| ICDAR2013-857 | 98.4 |
| ICDAR2015-1811 | 86.9 |
| SVTP-645 | 92.1 |
| CT80-288 | 90.6 |
best for
- ·Transcribing handwritten notes and letters from scanned images
- ·Automating form processing with handwritten fields
- ·Digitizing historical manuscripts
FAQ
The model expects a single text-line image, typically preprocessed to 384x384 resolution, sent as a base64-encoded image or image URL via the gigarouter API.
It returns a plain text string of the recognized handwritten text.
It has 62 million parameters, making it smaller and faster than TrOCR-Base (334M) or TrOCR-Large (558M).
On the IAM test set, it achieves a cased character error rate (CER) of 4.22%.
Use the OpenAI-compatible endpoint with your API key, sending a request with an image URL or base64 image data, and receive the transcription in the response.
We're benchmarking and onboarding TrOCR Small Handwritten as a hosted, OpenAI-compatible API. Sign in for free credit and be ready when it lands, or tell us you want it and we'll prioritize it.