SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.00321 · 2025

OCRBench v2: An Improved Benchmark for Evaluating Large Multimodal Models on Visual Text Localization and Reasoning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2501.00321.json · badge: /api/ran/2501.00321.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
yuliang-liu/multimodalocr canonical (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_average Ran
ran on a synthesized input
yuliang-liu/multimodalocr/OCRBench_v2/eval_scripts/get_score.py
code served (permissive licence) · get_code("3242c8f10997c354")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a dict where keys are strings and values are lists of numbers
# It calculates the average of each list
scores_dict = {
    "accuracy": [0.8, 0.85, 0.9, 0.88],
    "precision": [0.75, 0.78, 0.82],
    "recall": [0.88, 0.91, 0.89, 0.92, 0.90],
    "f1_score": [0.81, 0.84, 0.86]
}

ARGS = {
    "scores_dict": scores_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_iou Ran
ran on a synthesized input
yuliang-liu/multimodalocr/OCRBench_v2/eval_scripts/IoUscore_metric.py
code served (permissive licence) · get_code("fea16b5a5b9ae980")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Call calculate_iou to understand what it needs
def calculate_iou(box1, box2):
    try:
        box1 = [int(coordinate) for coordinate in box1]
        box2 = [int(coordinate) for coordinate in box2]
    except:
        return 0
    x1_inter = max(box1[0], box2[0])
    y1_inter = max(box1[1], box2[1])
    x2_inter = min(box1[2], box2[2])
    y2_inter = min(box1[3], box2[3])
    inter_area = max(0, x2_inter - x1_inter) * max(0, y2_inter - y1_inter)
    box1_area = (box1[2] - box1[0]) * (box1[3] - box1[1])
    box2_area = (box2[2] - box2[0]) * (box2[3] - box2[1])
    union_area = box1_area + box2_area - inter_area
    iou = inter_area / union_area if union_area != 0 else 0
    return iou

# box1 and box2 are expected to be sequences of 4 coordinates (x1, y1, x2, y2)
# that can be converted to integers
box1 = [10, 20, 50, 80]
box2 = [30, 40, 60, 90]

ARGS = {
    "box1": box1,
    "box2": box2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_coordinates Ran
ran on a synthesized input
yuliang-liu/multimodalocr/OCRBench_v2/eval_scripts/IoUscore_metric.py
code served (permissive licence) · get_code("731510333d199449")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def extract_coordinates(text):
    pattern = '[\\(\\[]\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*[\\)\\]]'
    matches = list(re.finditer(pattern, text))
    coords_list = []
    coords_set = set()
    for match in matches:
        x1, y1, x2, y2 = map(int, match.groups())
        if all((0 <= n <= 1000 for n in [x1, y1, x2, y2])):
            coords = (x1, y1, x2, y2)
            if coords in coords_set:
                coords_list = [c for c in coords_list if c != coords]
            coords_list.append(coords)
            coords_set.add(coords)
    if coords_list:
        last_coords = coords_list[-1]
        return list(last_coords)
    else:
        return None

ARGS = {
    "text": "The bounding box is (100, 200, 300, 400) and another one [50, 75, 150, 225]."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_full_labels_results Ran
ran; our contract draft was wrong, not the code
yuliang-liu/multimodalocr/MDPBench/metrics/show_result.py
code served (permissive licence) · get_code("430917573735bb95")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from collections import defaultdict

# Construct valid samples for get_full_labels_results
samples = [
    {
        'gt_attribute': [
            {'color': 'red', 'size': 'large'},
            {'material': 'metal'}
        ],
        'metric': {
            'accuracy': 0.95,
            'precision': 0.92
        }
    },
    {
        'gt_attribute': [
            {'color': 'red', 'texture': 'smooth'},
        ],
        'metric': {
            'accuracy': 0.88,
            'precision': 0.85
        }
    },
    {
        'gt_attribute': [
            {'size': 'large', 'material': 'metal'},
        ],
        'metric': {
            'accuracy': 0.91,
            'precision': 0.89
        }
    },
    {
        'gt_attribute': [],
        'metric': {
            'accuracy': 0.90,
            'precision': 0.87
        }
    }
]

ARGS = {
    'samples': samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tabulate, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_page_split Ran
ran on a synthesized input
yuliang-liu/multimodalocr/MDPBench/metrics/show_result.py
code served (permissive licence) · get_code("98ce0f38dc778190")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
import pandas as pd
from collections import defaultdict

# Construct samples with required structure
samples = [
    {
        'img_id': 'document1.jpg',
        'metric': {
            'Edit_dist': 0.15,
            'Accuracy': 0.85
        },
        'gt': 'ground truth text sample',
        'pred': 'predicted text sample',
        'norm_gt': 'normalized ground truth',
        'norm_pred': 'normalized predicted'
    },
    {
        'img_id': 'document2_page1',
        'metric': {
            'Edit_dist': 0.08,
            'Accuracy': 0.92
        },
        'gt': 'another ground truth',
        'pred': 'another prediction',
        'norm_gt': 'norm gt 2',
        'norm_pred': 'norm pred 2'
    },
    {
        'img_id': 'document3.png',
        'metric': {
            'Edit_dist': 0.12,
            'Accuracy': 0.88,
            'Precision': 0.90
        },
        'gt': 'third sample ground truth text',
        'pred': 'third sample pred text',
    }
]

# Construct page_info with various attribute types
page_info = {
    'document1.jpg': {
        'page_number': 1,
        'quality': 'high',
        'special_issues': ['handwriting', 'noise']
    },
    'document2_page1': {
        'page_number': 2,
        'layout': 'multi_column',
        'issues': ['skew']
    },
    'document3.png': {
        'page_count': 5,
        'resolution': 300,
        'special_issues': ['blur', 'low_contrast', 'table']
    }
}

ARGS = {
    'samples': samples,
    'page_info': page_info
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, tabulate, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parallel_process Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yuliang-liu/multimodalocr/MDPBench/metrics/parallel.py
code served (permissive licence) · get_code("43053af6494bf204")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from tqdm import tqdm
from concurrent.futures import ProcessPoolExecutor, as_completed

def simple_function(x):
    """A simple function that works with non-kwargs mode"""
    if isinstance(x, dict):
        return x['value'] * 2
    return x * 2

def kwarg_function(**kwargs):
    """A function that works with kwargs mode"""
    return kwargs.get('value', 0) * 3

# Test with simple list of integers
simple_array = [1, 2, 3, 4, 5]

# Test with list of dicts for kwargs mode
dict_array = [
    {'value': 1},
    {'value': 2},
    {'value': 3},
    {'value': 4},
    {'value': 5}
]

ARGS = {
    'array': simple_array,
    'function': simple_function,
    'n_jobs': 2,
    'use_kwargs': False,
    'front_num': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
process_args Ran
ran on a synthesized input
yuliang-liu/multimodalocr/MDPBench/pdf_validation.py
code served (permissive licence) · get_code("2936938c6970406f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Namespace. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse

def process_args(args):
    parser = argparse.ArgumentParser(description='Render latex formulas for comparison.')
    parser.add_argument('--config', '-c', type=str, default='./configs/end2end.yaml')
    parser.add_argument('--slim', action='store_true', help='Enable slim mode for exact filename matching')
    parameters = parser.parse_args(args)
    return parameters


# The function takes a list of command-line arguments
ARGS = {
    'args': ['--config', './configs/end2end.yaml', '--slim']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sort_nested_dict Ran
ran; our contract draft was wrong, not the code
yuliang-liu/multimodalocr/MDPBench/metrics/show_result.py
code served (permissive licence) · get_code("9de0183bdb6b45d3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct a nested dictionary with various types of values
# The function recursively sorts dictionary keys and returns non-dict values as-is
test_dict = {
    "zebra": torch.tensor([1, 2, 3, 4]),
    "apple": {
        "nested_z": np.array([1, 2, 3]),
        "nested_a": 42,
        "nested_m": {
            "deep_z": "value",
            "deep_a": [1, 2, 3]
        }
    },
    "middle": {
        "x": 3.14,
        "a": torch.randn(2, 4)
    },
    "simple_value": 100
}

ARGS = {
    "d": test_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_list Ran
ran; our contract draft was wrong, not the code
yuliang-liu/multimodalocr/OCRBench/example.py
code served (permissive licence) · get_code("cb9eaee96a223830")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Simple list to split
test_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# Number of splits
n_splits = 3

ARGS = {
    "lst": test_list,
    "n": n_splits,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_groups Not yet run
unverified (harvested, no recorded run)
yuliang-liu/multimodalocr/MDPBench/metrics/cal_metric.py
code served (permissive licence) · get_code("3e418b81ad6bb2c4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 5 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
parallel_process 3 other papers
2 dated earlier, 1 later
2311.05565 (2023-11)
High-Performance Transformers for Table Structure Recognition Need Early Convolutions
2405.11862 (2024-05)
SEMv3: A Fast and Robust Approach to Table Separation Line Detection
2607.02956 (2026-07)
MORE: A Multilingual Document Parsing Benchmark and Evaluation
get_full_labels_results 1 other paper
1 later
2607.02956 (2026-07)
MORE: A Multilingual Document Parsing Benchmark and Evaluation
get_groups 1 other paper
1 later
2607.02956 (2026-07)
MORE: A Multilingual Document Parsing Benchmark and Evaluation
sort_nested_dict 1 other paper
1 later
2607.02956 (2026-07)
MORE: A Multilingual Document Parsing Benchmark and Evaluation
split_list 1 other paper
1 later
2608.04496 (2026-08)
DIVE: Dynamic Iterative Visual Evidence Construction for Efficient Vision-Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Scoring the Optical Character Recognition (OCR) capabilities of Large Multimodal Models (LMMs) has witnessed growing interest. Existing benchmarks have highlighted the impressive performance of LMMs in text recognition; however, their abilities in certain challenging tasks, such as text localization, handwritten content extraction, and logical reasoning, remain underexplored. To bridge this gap, we introduce OCRBench v2, a large-scale bilingual text-centric benchmark with currently the most comprehensive set of tasks (4x more tasks than the previous multi-scene benchmark OCRBench), the widest coverage of scenarios (31 diverse scenarios), and thorough evaluation metrics, with 10,000 human-verified question-answering pairs and a high proportion of difficult samples. Moreover, we construct a private test set with 1,500 manually annotated images. The consistent evaluation trends observed across both public and private test sets validate the OCRBench v2's reliability. After carefully benchmarking state-of-the-art LMMs, we find that most LMMs score below 50 (100 in total) and suffer from five-type limitations, including less frequently encountered text recognition, fine-grained perception, layout perception, complex element parsing, and logical reasoning. The project website is at: https://99franklin.github.io/ocrbench_v2/

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2501.00321")
get_code_for_paper("2501.00321")
have("2501.00321")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2501.00321.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2501.00321.svg)](https://syntology.ai/paper/2501.00321)

Connect an agent — have() is free.