trocr-large-printed
by microsoft
Transformer-based OCR for printed text recognition
microsoft/trocr-large-printedmixpeek://image_extractor@v1/microsoft_trocr_large_v1Overview
TrOCR is an end-to-end text recognition model that uses a pre-trained image Transformer (DeiT) as the encoder and a pre-trained language model (RoBERTa) as the decoder. The large variant achieves state-of-the-art on printed text benchmarks.
On Mixpeek, TrOCR extracts readable text from images and video frames, making text-in-image content searchable through natural language queries.
Architecture
Encoder-decoder transformer: DeiT-Large (24 layers) as image encoder, RoBERTa-Large (24 layers) as text decoder. Pre-trained on large-scale synthetic printed text data, fine-tuned on SROIE and IAM datasets.
Mixpeek SDK Integration
// No extractor parameter takes a Hugging Face model id (checked against
// GET /v1/discovery/extractors, which returns 13), so trocr-large-printed runs
// on your side and the output is upserted through POST
// /v1/namespaces/{namespace_id}/documents/upsert. On Enterprise the other
// path is to upload the weights instead: POST /v1/namespaces/{id}/models
// accepts the huggingface format and a custom plugin loads them.
const res = await fetch(
"https://api.mixpeek.com/v1/namespaces/ns_your_namespace/documents/upsert",
{
method: "POST",
headers: {
Authorization: "Bearer API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
collection_id: "col_your_collection",
documents: [
{
document_id: "asset-00412",
// The model produces text, so it lands in payload. Give the
// collection a text vector index and embed that text to make it
// searchable rather than only filterable.
payload: { extracted_text: modelOutput, source_key: "archive/2026/asset-00412" },
vectors: { "text-embedding": embeddingOfModelOutput },
},
],
}),
},
);
// Managed alternative, if this exact model is not the requirement:
// universal_extractor@v1 runs google/gemini-embedding-2
// (3072-d) over a bucket, with no inference of your own.Capabilities
- High-accuracy printed text recognition
- End-to-end pipeline (no separate detection step)
- Multi-line text extraction
- Robust to noise, blur, and varying fonts
Use Cases on Mixpeek
Benchmarks
| Dataset | Metric | Score | Source |
|---|---|---|---|
| SROIE (text recognition) | Word Accuracy | 96.1% | Li et al., 2023: Table 3 |
| IAM Handwritten | CER | 3.4% | Li et al., 2023: Table 2 |
Performance
Common Pipeline Companions
Explore on Mixpeek
Compare alternatives in this category
Hand-picked tools & platforms compared
Deep-dive technical guide
See how Mixpeek runs models as extractors
Store & search embeddings at scale
Usage-based pricing for pipelines
Compare models, APIs & infrastructure
Specification
Research Paper
TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models
arxiv.orgBuild a pipeline with trocr-large-printed
Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.
Run it on your own data, free