microsoft_trocr-small-handwritten
microsoft · View on Hugging Face ↗
Model card
The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.
tags:
- trocr
- image-to-text widget:
- src: https://fki.tic.heia-fr.ch/static/img/a01-122-02.jpg example_title: Note 1
- src: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSoolxi9yWGAT5SLZShv8vVd0bz47UWRzQC19fDTeE8GmGv_Rn-PCF1pP1rrUx8kOjA4gg&usqp=CAU example_title: Note 2
- src: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRNYtTuSBpZPV_nkBYPMFwVVD9asZOPgHww4epu9EqWgDmXW--sE2o8og40ZfDGo87j5w&usqp=CAU example_title: Note 3
TrOCR (small-sized model, fine-tuned on IAM)
TrOCR model fine-tuned on the IAM dataset. It was introduced in the paper TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models by Li et al. and first released in this repository.
Model description
The TrOCR model is an encoder-decoder model, consisting of an image Transformer as encoder, and a text Transformer as decoder. The image encoder was initialized from the weights of DeiT, while the text decoder was initialized from the weights of UniLM.
Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder. Next, the Transformer text decoder autoregressively generates tokens.
Intended uses & limitations
You can use the raw model for optical character recognition (OCR) on single text-line images. See the model hub to look for fine-tuned versions on a task that interests you.
How to use
Here is how to use this model in PyTorch:
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
from PIL import Image
import requests
# load image from the IAM database
url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg'
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
processor = TrOCRProcessor.from_pretrained('microsoft/trocr-small-handwritten')
model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-small-handwritten')
pixel_values = processor(images=image, return_tensors="pt").pixel_values
generated_ids = model.generate(pixel_values)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
BibTeX entry and citation info
@misc{li2021trocr,
title={TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models},
author={Minghao Li and Tengchao Lv and Lei Cui and Yijuan Lu and Dinei Florencio and Cha Zhang and Zhoujun Li and Furu Wei},
year={2021},
eprint={2109.10282},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
Magnet link
Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:
magnet:?xt=urn:btih:c0dc278f26a1374b943be24dc6bb7fdc42257e71&dn=microsoft_trocr-small-handwrittenOpen magnet in torrent client · infohash c0dc278f26a1374b943be24dc6bb7fdc42257e71
Files & hashes
| Path | Size | sha1 | sha256 |
|---|---|---|---|
| README.md | 2.8 KB (2,832 B) | 3fb36eb516f0cdd19874ee0dde1bbb90f3a66a1f | 7e0f183a2697956065aea4e3ec9ca718967be1b7afe446cff4dcdbc8a64fa52b |
| config.json | 4.1 KB (4,211 B) | 1e12191191977ca7b70d39b8aa7ab10080c751d4 | 2b6e06edec319984eca99c932d940bfa1f308db3f74d6279440b906c373bf727 |
| generation_config.json | 190 B (190 B) | 209d1d39a6767d115b4ebff7ba46fe9c1739e90e | 41149cdcffec4d657f32dfcddd9b208037f01286c9e07945c724908c58ed0193 |
| preprocessor_config.json | 272 B (272 B) | 8acdb9d2d64bc6a881a04d3682f2a696bce75492 | eec0c686d2e2ea6d5887f87e1c6a34ef5bf1ba5b2ac98b8675e131da646fa1d2 |
| pytorch_model.bin | 234.5 MB (245,933,041 B) | 1cc3c3f63749b2a21e31eaaa488de3bb0fb411c2 | 1b83102cbc1520dee1c3937ac334da83da18cf4683d46ebd1bd4e93ebe584dd7 |
| sentencepiece.bpe.model | 1.3 MB (1,356,293 B) | 5ffdc4310e4bb07f64b297b2eba7b51e384eb34a | 6f5e2fefcf793761a76a6bfb8ad35489f9c203b25557673284b6d032f41043f4 |
| special_tokens_map.json | 238 B (238 B) | 9c1c545f1d1782ef68980dd2da0d08c4608ba7a6 | 58dc0a3d15e3bad4861bcf2dee770ea327344d185182d4c5d2bf253285e53a83 |
| tokenizer_config.json | 327 B (327 B) | 9fa50ec37ab9f93c5f9d90e65827d3af0d5d4043 | e098c98c6834fbcd3f3e75215e3e8b8868f0fe5bf07aef93d28e4f7196db293c |
Cite this release
- Canonical URL
- https://aiseedbank.org/models/microsoft_trocr-small-handwritten/
- Slug
- microsoft_trocr-small-handwritten
- Infohash
- c0dc278f26a1374b943be24dc6bb7fdc42257e71
- License
- no license recorded
- Signing key fingerprint
- 85a3b32c3712427b
Every file carries a locally computed sha256 — verify a download against the signed sums: microsoft_trocr-small-handwritten.SHA256SUMS (+ minisign signature).
Provenance
| Upstream repository | microsoft/trocr-small-handwritten |
|---|---|
| Revision (pinned) | b4648cfa171985a6745f37ddd637e98c0da958ac |
| Fetched at | 2026-09-04T02:46:46Z |
| License at fetch | no license recorded |
| Snapshot tool | huggingface · seedbank 0.1.0 |
Trackers
- udp://announce.aitorrent.org:6969/announce
- http://announce.aitorrent.org:7070/announce
- udp://announce2.aitorrent.org:6970/announce
- http://announce2.aitorrent.org:7071/announce
- udp://tracker.opentrackr.org:1337/announce
- udp://open.demonii.com:1337/announce
- udp://open.stealth.si:80/announce
- udp://exodus.desync.com:6969/announce
- udp://tracker.torrent.eu.org:451/announce
✓ verified · rehash-vs-hf-metadata at 2026-09-04T02:46:50Z
no license recorded235.8 MB (247,297,404 bytes)transformerspytorchvision-encoder-decoderimage-text-to-texttrocrimage-to-textendpoints_compatiblepaper: 2109.10282