whatisgithub

What is omnidoc-tokenbench?

alibaba/omnidoc-tokenbench — explained in plain English

Analysis updated 2026-05-18

43PythonAudience · researcherComplexity · 3/5Setup · moderate

In one sentence

A benchmark and toolkit that measures whether AI image compression models keep document text readable after compression and reconstruction.

Mindmap

mindmap
  root((OmniDoc TokenBench))
    What it does
      Benchmarks compression
      Checks text readability
      Uses OCR based scoring
    Tech stack
      Python
    Use cases
      Evaluate VAE models
      Compare reconstructions
    Audience
      Researchers
        Multimodal AI

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Evaluate whether a compression model preserves readable text in document images

USE CASE 2

Compare image reconstruction quality using OCR based text accuracy instead of pixel similarity

USE CASE 3

Benchmark VAE based image compression models on multilingual document datasets

What is it built with?

Python

How does it compare?

alibaba/omnidoc-tokenbencharccalc/dwmfixbkerler/ida_rpc
Stars434343
LanguagePythonPythonPython
Setup difficultymoderateeasyhard
Complexity3/52/54/5
Audienceresearchergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires running OCR and preparing paired original and reconstructed image folders.

So what is it?

OmniDoc-TokenBench is a benchmark dataset and evaluation toolkit designed to test how well AI image compression and reconstruction models handle text-heavy document images. The core problem it addresses is that traditional image quality metrics, like measuring pixel differences or visual similarity, do not capture whether readable text has been preserved accurately after an image is compressed and rebuilt. A document image might look visually fine but have garbled letters that make it unreadable. The repository contains roughly 3,000 sample images drawn from nine document categories, books, slides, textbooks, exam papers, academic papers, magazines, financial reports, newspapers, and handwritten notes, in both English and Chinese. Each sample is a small 256x256 pixel crop of text from a document. The key evaluation metric it introduces is NED (Normalized Edit Distance), which works by running optical character recognition on both the original and reconstructed images, then measuring how different the extracted text strings are. This directly catches cases where compression scrambles characters even when the image looks visually acceptable to the human eye. Researchers would use this repository when building or comparing AI models that compress images into compact representations (called VAEs, variational autoencoders) and need to verify that text documents survive the compression faithfully. The evaluation script accepts any pair of original and reconstructed image folders and outputs scores across all supported metrics. The project is written in Python and was developed by Alibaba Group's Qwen Team.

Copy-paste prompts

Prompt 1
Help me run OmniDoc-TokenBench to evaluate my image compression model's OCR accuracy
Prompt 2
Show me how to compute the NED metric on a folder of reconstructed document images
Prompt 3
Explain how NED differs from standard image quality metrics for this benchmark

Frequently asked questions

What is omnidoc-tokenbench?

A benchmark and toolkit that measures whether AI image compression models keep document text readable after compression and reconstruction.

What language is omnidoc-tokenbench written in?

Mainly Python. The stack also includes Python.

How hard is omnidoc-tokenbench to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is omnidoc-tokenbench for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.