SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.19128 · CVPR · 2024

OMNIPARSER: A Unified Framework for Text Spotting, Key Information Extraction and Table Recognition

Fei Huang, Xiang Bai, Yuliang Liu, Wenwen Yu, Sibo Song, Jianqiang Wan, Zhibo Yang, Cong Yao, Wenqing Cheng

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; 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/2403.19128.json · badge: /api/ran/2403.19128.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
alibabaresearch/advancedliteratemachinery marked official in Papers with Code
Papers with Code archive
3 ran · 1 no recorded run
FunctionStatusWhere it lives
FPN Ran
ran on a synthesized input
alibabaresearch/advancedliteratemachinery/OCR/OmniParser/model/omniparser.py
code served (permissive licence) · get_code("5584d38d3ea5e15e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch.nn as nn
import torch.nn.functional as F

def conv1x1(in_planes, out_planes, stride=1, has_bias=False):
    """1x1 convolution with padding"""
    return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, padding=0, bias=has_bias)

class FPN(nn.Module):

    def __init__(self):
        super().__init__()
        nin = [128, 256, 512, 1024]
        ndim = 256
        self.fpn_in = nn.ModuleList([conv1x1(nin[-1], ndim), conv1x1(nin[-2], ndim), conv1x1(nin[-3], ndim), conv1x1(nin[-4], ndim)])

    def forward(self, feature_list):
        c2, c3, c4, c5 = feature_list
        p5 = self.fpn_in[0](c5)
        p5_up = F.interpolate(p5, size=c4.size()[2:], mode='nearest')
        c4_ = self.fpn_in[1](c4)
        p4 = c4_ + p5_up
        p4_up = F.interpolate(p4, size=c3.size()[2:], mode='nearest')
        c3_ = self.fpn_in[2](c3)
        p3 = c3_ + p4_up
        p3_up = F.interpolate(p3, size=c2.size()[2:], mode='nearest')
        c2_ = self.fpn_in[3](c2)
        p2 = c2_ + p3_up
        tmp_size = c3.size()[2:]
        p2 = F.interpolate(p2, size=tmp_size, mode='bilinear')
        p4 = F.interpolate(p4, size=tmp_size, mode='bilinear')
        p5 = F.interpolate(p5, size=tmp_size, mode='bilinear')
        concat_feature = torch.cat((p2, p3, p4, p5), dim=1)
        return concat_feature

INIT_ARGS = {}

c2 = torch.randn(2, 128, 32, 32)
c3 = torch.randn(2, 256, 16, 16)
c4 = torch.randn(2, 512, 8, 8)
c5 = torch.randn(2, 1024, 4, 4)

ARGS = {
    'feature_list': [c2, c3, c4, c5]
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
NestedTensor Ran
ran on a synthesized input · constructed an object; no result was computed
alibabaresearch/advancedliteratemachinery/OCR/OmniParser/model/omniparser.py
code served (permissive licence) · get_code("884dfe13daaf09f7")
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 an instance of its own class, NestedTensor: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
from torch import Tensor
from typing import Optional

torch.manual_seed(0)

# Create small tensors for the NestedTensor
# tensors: batch of 2 tensors with shape (3, 4, 5) - (batch, height, width)
tensors = torch.randn(2, 3, 4, 5)

# mask: boolean mask with shape (2, 3, 4) - (batch, height, width)
# The mask is used in unpad_tensors to compute height/width by summing along dimensions
# Create a mask where some values are True (padded) and some are False (unpadded)
mask = torch.tensor([
    [[True, True, False, False],
     [True, True, False, False],
     [True, True, False, False]],
    [[True, True, True, False],
     [True, True, True, False],
     [True, True, True, False]]
], dtype=torch.bool)

ARGS = {
    "tensors": tensors,
    "mask": mask,
}
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 NestedTensor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a NestedTensor 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
alibabaresearch/advancedliteratemachinery/OCR/OmniParser/model/omniparser.py
code served (permissive licence) · get_code("17d602229c68a4c4")
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 Conv2d. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "has_bias": False,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
OmniParser Not yet run
unverified (harvested, no recorded run)
alibabaresearch/advancedliteratemachinery/OCR/OmniParser/model/omniparser.py
code served (permissive licence) · get_code("6f8e809a09cd8eb3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
conv1x1
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2407.19507 (2024-07)
WeCromCL: Weakly Supervised Cross-Modality Contrastive Learning for Transcription-only Supervised Text Spotting

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-22.

Repositories linked to this paper

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

Abstract

Recently, visually-situated text parsing (VsTP) has experienced notable advancements, driven by the increasing demand for automated document understanding and the emergence of Generative Large Language Models (LLMs) capable of processing document-based questions. Various methods have been proposed to address the challenging problem of VsTP. However, due to the diversified targets and heterogeneous schemas, previous works usually design task-specific architectures and objectives for individual tasks, which inadvertently leads to modal isolation and complex workflow. In this paper, we propose a unified paradigm for parsing visually-situated text across diverse scenarios. Specifically, we devise a universal model, called OmniParser, which can simultaneously handle three typical visually-situated text parsing tasks: text spotting, key information extraction, and table recognition. In OmniParser, all tasks share the unified encoder-decoder architecture, the unified objective: pointconditioned text generation, and the unified input&output representation: prompt & structured sequences. Extensive experiments demonstrate that the proposed OmniParser achieves state-of-the-art (SOTA) or highly competitive performances on 7 datasets for the three visually-situated text parsing tasks, despite its unified, concise design. The code is available at AdvancedLiterateMachinery.

For agents

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

get_harvested_code_for_paper("2403.19128")
get_code_for_paper("2403.19128")
have("2403.19128")

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

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

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

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

Connect an agent — have() is free.