Paper · 2023-05-13 · cs.CV, cs.CL
OCRBench: On the Hidden Mystery of OCR in Large Multimodal Models
OCRBench is a 1000-question test of OCR skills in large multimodal models: text recognition, scene-text and document VQA, key information extraction and handwritten maths. A reply passes when a ground-truth string appears in it. Author-reported final scores (out of 1000): Gemini 659, GPT4V 645, Monkey 514.
Multimodal language modelLLM evaluationBenchmark validityOptical character recognitionocrbenchmarklarge-multimodal-modelsscene-textdocument-vqakey-information-extractionhandwritten-math
arXivPDFCodeMarkdown11 min read
AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Large multimodal models read pictures and answer in text. Many can describe a scene, but reading the words inside a photo, a document or a receipt is a separate skill, and the older tests for it were slow to run or were not built for free-form answers. This paper builds a small, checked test called OCRBench: 1000 questions across five jobs. The jobs are reading text, answering questions about text in photos, answering questions about documents and charts, pulling out fields such as a receipt total, and reading handwritten maths.
The scoring is deliberately simple. A model answers in its own words, and the answer counts as correct if the right string appears somewhere in that answer. Run on 14 models, the two strongest, Gemini and GPT4V, still struggle with handwritten maths, blurry images and text that does not form real words. The numbers come from the authors' own runs, so treat them as a snapshot.
TL;DR
OCRBench is a 1000-item benchmark that tests OCR-style reading in large multimodal models across five tasks. Each item is scored 1 if a ground-truth string appears in the model's reply, and 0 otherwise, and the final score is the sum out of 1000. The paper reports zero-shot results for 14 models, with Gemini (659) and GPT4V (645) highest. Every number is author-reported.
Problem
Large multimodal models (LMMs) were reported to read text in images without training on OCR data §1. Existing OCR evaluations did not fit this use well. Exact-match and ANLS scoring are unsuitable when a model writes explanatory text around the answer §3.1. True/False and multiple-choice questions cannot test whether a model recognises each word §2.2. Running many datasets takes a long time, and some of their annotations are inaccurate §3.3. The paper assumes zero-shot evaluation with free-text replies §3.1.
Method
Benchmark composition. OCRBench has 1000 question-answer pairs over five tasks §3.3. Text Recognition has 300 items, 50 each from six sets: regular, irregular, artistic, handwriting, digit strings and non-semantic text app. A tab. 5. Scene Text-centric VQA has 200 items, 50 each from STVQA, TextVQA, ESTVQA (English) and OCRVQA app. A tab. 5. Document-oriented VQA has 200 items, 50 each from DocVQA, ChartQA (augmented), ChartQA (human) and InfoVQA app. A tab. 5. Key Information Extraction has 200 items: 67 SROIE, 66 FUNSD and 67 POIE app. A tab. 5. Handwritten maths has 100 items from HME100k app. A tab. 5. The paper does not say how the 1000 items were chosen from the source sets.
Filtering and checking. Answers with fewer than four symbols are removed from every dataset to reduce false positives §3.1. The authors then checked all 1000 answers by hand and corrected wrong ones. Where more than one answer is correct, they added the alternatives §3.3.
Prompts. Each item stores its own question text. English words use "What is written in the image", Chinese words "What are the Chinese characters in the image", and digit strings "What is the number in the image?" §3.1. Handwritten maths asks for LaTeX output §3.1. For key information extraction, the question is followed by "Answer this question using the text in the image directly." so the answer format is restricted §3.3.
Evaluation. Each model gets one image and one question and returns free text. The same rule scores every dataset: the ground truth must appear in the reply §3.1. The released code adds two details the paper does not state, a case-insensitive match and a space-free match for HME100k. The pseudocode below follows the released scorer.
# Normalise text before matching [code: OCRBench/example.py#L128-L151]
# Input: text (string), dataset_name (string)
# Output: normalised string
def normalise(text, dataset_name):
# Strip the ends and turn newlines into spaces [code: example.py#L143]
text = text.strip().replace("\n", " ")
if dataset_name == "HME100k":
# HME100k: also drop every space [code: example.py#L131-L132]
return text.replace(" ", "")
# Other datasets: compare case-insensitively [code: example.py#L143-L144]
return text.lower()# Score one record, 1 if an accepted answer occurs in the reply
# [code: OCRBench/example.py#L124-L151]
# Input: answers (string or list), predict (string or None)
# Output: 1 (correct) or 0 (wrong)
def score_record(answers, predict, dataset_name):
# A record without a reply is never scored and adds 0
# [code: OCRBench/example.py#L124-L125]
if predict is None:
return 0
# Accept a single string or a list of alternative answers
# [code: OCRBench/example.py#L129]
accepted = answers if isinstance(answers, list) else [answers]
reply = normalise(predict, dataset_name)
for answer in accepted:
# Substring match: extra words in the reply still count
# [code: OCRBench/example.py#L141-L151]
if normalise(answer, dataset_name) in reply:
return 1
return 0# Final Score: the sum of the 1000 binary results
# [code: OCRBench/example.py#L153-L159]
# Input: records (the 1000 scored items)
# Output: final_score (0 to 1000)
def final_score(records):
# Add each record's result to the total
# [code: OCRBench/example.py#L157]
total = 0
for record in records:
total += score_record(
record["answers"],
record.get("predict"),
record["dataset_name"],
)
return totalSemantic-reliance probe. To test whether LMMs read letters or guess words, the authors built a semantic set (ST, 3000 images of IIIT5K dictionary words) and a non-semantic set (NST, the same words with characters shuffled) §3.1. The OCRBench file holds 50 NST items, not the 3000-image set [code: OCRBench/OCRBench/OCRBench.json].
Scoring total. The Final Score is the sum of the 1000 results, so its maximum is 1000 §3.3 tab. 3.
Supervised references. For each dataset the paper names a supervised state-of-the-art system for comparison, such as PARSeq trained on the ST and MJ synthetic sets and tested on the real datasets app. C.
Hyperparameters
The paper gives few numeric settings. The rows below combine what it states with what the released scripts use, and say which is which.
| Setting | Value | Where | Notes |
|---|---|---|---|
| Benchmark size | 1000 question-answer pairs | §3.3 tab. 5 | 300 / 200 / 200 / 200 / 100 per task |
| Answer filter | drop answers under 4 symbols | §3.1 README.md | all datasets |
| Manual check | all 1000 answers checked and corrected | §3.3 | number changed: not stated |
| KIE suffix | "Answer this question using the text in the image directly." | §3.3 OCRBench.json | appended to KIE questions |
| HMER prompt | asks for the formula as LaTeX; the stored question text is in the file | §3.1 OCRBench.json | |
| Decoding, Monkey | greedy: do_sample False, num_beams 1, max_new_tokens 100 | monkey.py | paper: not stated |
| Token cap, GPT4V | max_tokens 500 | GPT4V.py | paper: not stated |
| Token cap, other scripts | 100 (qwenvl.py#L71), 128 (LLaVA1_5.py#L96), 200 (llavar.py#L200), 512 (intervl.py#L73) | differ by script; paper: not stated | |
| GPT4V model id | gpt-4-vision-preview | tab. 6 GPT4V.py | |
| Gemini model id | gemini-pro-vision | tab. 6 Genimi.py | |
| Input resolution | 224 (BLIP2, mPLUG-Owl, InstructBLIP, BLIVA, MiniGPT4V2), 336 (LLaVAR, LLaVA1.5-7B, LLaVA1.5-13B, UniDoc), 448 (mPLUG-Owl2), 896 (Monkey), 2560 (DocPedia) | tab. 6 | Monkey text says 1344×896 §3.2 |
| Semantic set size | ST 3000 images | §3.1 | NST size: not stated |
| Final score maximum | 1000 | §3.3 | 300 recognition + 200 + 200 + 200 + 100 |
Results
Author-reported. Setup: zero-shot, 14 LMMs in total, 1000-item OCRBench for Table 3 and the wider test sets for Tables 1 and 2 §3.2 §3.3. The paper gives no supervised baseline for Table 3; the supervised references are for Tables 1 and 2 only app. C.
Headline (OCRBench, Final Score out of 1000) tab. 3. Gemini 659, GPT4V 645, Monkey 514, and MiniGPT4V2 157 lowest of the twelve rows. GPT4V refused to answer 84 images on safety grounds §3.3; the scorer counts those as wrong.
| Method | Recog. | VQA^S | VQA^D | KIE | HMER | Final Score |
|---|---|---|---|---|---|---|
| Gemini | 215 | 174 | 128 | 134 | 8 | 659 |
| GPT4V | 167 | 163 | 146 | 160 | 9 | 645 |
| Monkey | 174 | 161 | 91 | 88 | 0 | 514 |
| mPLUG-Owl2 | 153 | 153 | 41 | 19 | 0 | 366 |
| LLaVAR | 186 | 122 | 25 | 13 | 0 | 346 |
| LLaVA1.5-13B | 176 | 129 | 19 | 7 | 0 | 331 |
| LLaVA1.5-7B | 160 | 117 | 15 | 5 | 0 | 297 |
| mPLUG-Owl | 172 | 104 | 18 | 3 | 0 | 297 |
| BLIVA | 165 | 103 | 22 | 1 | 0 | 291 |
| InstructBLIP | 168 | 93 | 14 | 1 | 0 | 276 |
| BLIP2 | 154 | 71 | 10 | 0 | 0 | 235 |
| MiniGPT4V2 | 124 | 29 | 4 | 0 | 0 | 157 |
Source: tab. 3. Recog. = text recognition (out of 300); VQA^S = scene text-centric VQA (out of 200); VQA^D = document-oriented VQA (out of 200); KIE (out of 200); HMER (out of 100).
Text recognition, accuracy in % tab. 1. Supervised SOTA row is the reference from app. C. Bold and blue highlights are dropped here.
| Method | IIIT5K | SVT | IC13 | IC15 | SVTP | CT80 | COCO | CTW | TT | HOST | WOST | WordArt | IAM | ReCTS | ORAND | NST | ST |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BLIP2-6.7B | 79.1 | 86.7 | 83.4 | 71.2 | 78.8 | 76.5 | 51.4 | 62.4 | 68.7 | 59.8 | 69.4 | 68.4 | 32.9 | 0 | 1.2 | 13.0 | 82.6 |
| mPLUG-Owl | 81.1 | 84.3 | 85.9 | 67.5 | 73.9 | 81.4 | 52.3 | 69.2 | 74.4 | 49.7 | 62.7 | 72.1 | 34.8 | 0 | 13.5 | 44.7 | 92.3 |
| InstructBLIP | 86.3 | 92.0 | 86.8 | 80.9 | 85.6 | 86.3 | 62.6 | 70.8 | 77.9 | 67.8 | 78.8 | 73.7 | 42.6 | 0 | 18.4 | 25.3 | 89.7 |
| LLaVAR | 84.0 | 87.6 | 87.7 | 79.4 | 84.0 | 84.5 | 61.9 | 69.5 | 75.6 | 61.1 | 71.9 | 67.1 | 49.4 | 0 | 9.8 | 36.2 | 86.5 |
| BLIVA | 86.5 | 90.6 | 87.3 | 80.9 | 87.7 | 86.7 | 64.8 | 71.2 | 78.1 | 67.7 | 77.6 | 73.7 | 45.1 | 0 | 13.8 | 20.4 | 89.4 |
| mPLUG-Owl2 | 80.9 | 69.6 | 79.8 | 53.9 | 53.5 | 74.8 | 52 | 59.1 | 60.9 | 32.5 | 50.6 | 60.6 | 23.8 | 0 | 9.9 | 48.2 | 93.9 |
| LLaVA1.5-7B | 84.2 | 85.7 | 86.4 | 71.9 | 79.8 | 82.7 | 55.6 | 66.8 | 73.2 | 61.4 | 70.6 | 68.7 | 55.4 | 0 | 10.4 | 15.2 | 85.3 |
| UniDoc | 91.9 | 89.2 | 90.9 | 78 | 80.3 | 88.2 | 64.1 | 75.3 | 78.2 | 52.4 | 68.5 | - | - | - | - | - | - |
| Monkey | 83.7 | 75.1 | 85.4 | 53.4 | 58.4 | 73.9 | 43.5 | 64.5 | 64.6 | 43.3 | 54.9 | 67.7 | 30.3 | 13.1 | 29.1 | 56.5 | 95.5 |
| Supervised-SOTA | 96.6 | 93.0 | 96.7 | 85.7 | 89.3 | 89.9 | 64.4 | 78.6 | 80.1 | 73.1 | 81.6 | 72.5 | 91.2 | 94.8 | 95.5 | 95.4 | 100.0 |
Source: tab. 1. Columns: IIIT5K, SVT, IC13, IC15, SVTP, CT80, COCO-Text, CTW, TT, HOST and WOST (occluded), WordArt, IAM, ReCTS, ORAND, NST and ST.
Scene text, document, KIE and HMER, accuracy in % tab. 2. Results are author-reported.
| Method | STVQA | TextVQA | OCRVQA | ESTVQA(EN) | ESTVQA(CN) | DocVQA | InfoVQA | ChartQA | FUNSD | SROIE | POIE | HME100K |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BLIP2-6.7B | 20.9 | 23.5 | 9.7 | 40.7 | 0 | 3.2 | 11.3 | 3.4 | 0.2 | 0.1 | 0.3 | 0 |
| mPLUG-Owl | 30.5 | 34 | 21.1 | 52.7 | 0 | 7.4 | 20 | 7.9 | 0.5 | 1.7 | 2.5 | 0.1 |
| InstructBLIP | 27.4 | 29.1 | 41.3 | 48.6 | 0.1 | 4.5 | 16.4 | 5.3 | 0.2 | 0.6 | 1 | 0 |
| LLaVAR | 39.2 | 41.8 | 24 | 58.2 | 0 | 12.3 | 16.5 | 12.2 | 0.5 | 5.2 | 5.9 | 0 |
| BLIVA | 32.1 | 33.3 | 50.7 | 51.2 | 0.2 | 5.8 | 23.6 | 8.7 | 0.2 | 0.7 | 2.1 | 0.1 |
| mPLUG-Owl2 | 49.8 | 53.9 | 58.7 | 68.6 | 4.9 | 17.9 | 18.9 | 19.4 | 1.4 | 3.2 | 9.9 | 0 |
| LLaVA1.5-7B | 38.1 | 38.7 | 58.1 | 52.3 | 0 | 8.5 | 14.7 | 9.3 | 0.2 | 1.7 | 2.5 | 0 |
| UniDoc | 35.2 | 46.2 | 36.8 | - | - | 7.7 | 14.7 | 10.9 | 1 | 2.9 | 5.1 | 0.4 |
| DocPedia | 45.5 | 60.2 | 57.2 | - | - | 47.1 | 15.2 | 46.9 | 29.9 | 21.4 | 39.9 | - |
| Monkey | 54.7 | 64.3 | 64.4 | 71 | 42.6 | 50.1 | 25.8 | 54.0 | 24.1 | 41.9 | 19.9 | 0.2 |
| Supervised-SOTA | 69.6 | 73.7 | 68.1 | 43.3 | 43.3 | 90.16 | 36.8 | 70.5 | 93.1 | 98.7 | 79.5 | 64.3 |
Source: tab. 2. The Supervised-SOTA ESTVQA cells show 43.3, but the caption says the reference average is 42.3 (see Pitfalls).
Paper vs code
Repository: Yuliang-Liu/MultimodalOCR, MIT licence, commit
4e363b3f499811b43d792ef0bb33932ef05eca27. The owner is the first author, and
the abstract links the repository. The code is for OCRBench v1 only, under
OCRBench/. The repo also has OCRBench_v2/ and MDPBench/, which this card
does not cover.
- Matching rule. The paper states only "the ground truth is present in the output" §3.1. The scorer also lowercases non-HME text and removes every space from HME100k text before matching example.py. Those details change which replies pass.
- Missing replies. The scorer skips records with no
predictfield, so they add 0 and are not reported [code: OCRBench/example.py#L124-L125, L155-L156]. The Gemini script prints the failure and moves on [code: OCRBench/scripts/Genimi.py#L56-L57]. The paper says nothing about this case. - GPT4V refusals. The paper reports 84 refused images §3.3. The scorer has no refusal handling, so a refusal scores 0 [inferred from code].
- Prompt wording. The paper quotes "What is written in the image" §3.1. The stored question is "what is written in the image?", lowercase with a question mark OCRBench.json.
- Dataset counts. Per-task counts match the paper: 50 per recognition set, 200 each for the VQA and KIE tasks, 100 for HMER tab. 5. The KIE per-dataset counts also match (SROIE 67, FUNSD 66, POIE 67). No discrepancy.
- Dataset count. The abstract says 29 datasets [code: OCRBench/README.md#L4]. The 1000-item file lists 25 distinct dataset names OCRBench.json. The paper does not explain the gap.
- Monkey resolution. The text says 1344×896 §3.2; the table says 896
tab. 6. The script does not set a resolution [grep: no
resolutionsetting inOCRBench/scripts/monkey.py]. The paper is inconsistent. - Results files. The Table 3 numbers come from result files that the README links on Google Drive README.md. They are not in the repository, so the table cannot be re-derived from it.
- Example script.
OCRBench/example.pyhas its model call commented out, and line 84 assigns an undefinedresponseexample.py. Run a per-model script instead, such asOCRBench/scripts/GPT4V.py.
Pitfalls
- Substring scoring. A reply passes if the answer appears anywhere in it, so a long answer that contains the right string, or a negated one, counts as correct [inferred from code: OCRBench/example.py#L141-L151]. The four-symbol filter §3.1 reduces false positives, but it does not remove this effect.
- Format mismatches score as wrong. The paper reports that Gemini reads "02/02/2018" as "2 February 2018" even when told to copy the text §3.3. The rule has no date normalisation, so this counts as an error.
- Token caps can cut answers. A long reply, such as a HMER LaTeX answer, can
be cut off at the script's
max_new_tokensormax_tokens. These caps differ between scripts [code: OCRBench/scripts/monkey.py#L70, OCRBench/scripts/GPT4V.py#L82]. The paper does not state them. Compare models only when the caps match. - Decoding is not uniform. Most scripts decode greedily, but the BLIP2
Vicuna variant uses 5 beams blip2_vicuna_instruct.py.
The mPLUG-DocOwl15 script sets
temperature=1.0whiledo_sample=False. In commongenerate()implementations the temperature then has no effect [code: OCRBench/scripts/mPLUG-DocOwl15.py#L185-L187] [general knowledge; not checked against this repo's pinned library version]. - Time-bound API models. The GPT4V and Gemini entries name
gpt-4-vision-previewandgemini-pro-visiontab. 6. Those snapshots may no longer be served, so a rerun may not reproduce Table 3 [inferred]. - Two different model sets. The paper evaluates 14 LMMs §1. Table 3 covers 12 of them and omits UniDoc and DocPedia; Tables 1 and 2 omit Gemini, GPT4V, LLaVA1.5-13B and MiniGPT4V2 tab. 1 tab. 2 tab. 3. No table compares all 14.
- Reference inconsistency. Table 2's caption gives the ESTVQA supervised reference as 42.3, but the cells show 43.3 for both EN and CN tab. 2.
- Supervised references differ in protocol. Supervised systems are trained on each dataset's training data or on synthetic sets app. C. LMMs are zero-shot. The gap is not a like-for-like comparison.
- Authors' explanation is open. The paper's account of why LMMs read text is labelled as not conclusive §3.3. Do not treat it as established.
- Author-reported. Every number is the authors' run under their prompts and caps. Nothing here has been independently reproduced.
Lineage
- Builds on: the public OCR datasets it draws from, such as IIIT5K, SVT, TextVQA and DocVQA §3.1. It does not describe a new model.
- Compared against: the 14 LMMs in its tables, including LLaVA, BLIP2, InstructBLIP, mPLUG-Owl, Monkey and Gemini and GPT4V §3.2 tab. 3. It also cites VLMEvalKit and lmms-eval as other evaluation systems §2.2. The supervised reference per dataset is in app. C.
- Superseded by: not stated in this card's sources. The repository's
OCRBench_v2/folder is a separate release that this card does not cover.
Source and license
Adapted from “OCRBench: On the Hidden Mystery of OCR in Large Multimodal Models” by Yuliang Liu, Zhang Li, Mingxin Huang, Biao Yang, Wenwen Yu, Chunyuan Li, Xucheng Yin, Cheng-lin Liu, Lianwen Jin, Xiang Bai (arXiv:2305.07895), used under CC BY-SA 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. This page is licensed under CC BY-SA 4.0. Code citations refer to https://github.com/Yuliang-Liu/MultimodalOCR at commit 4e363b3f4998 (MIT). Any quoted code is shown under that license.