AmbiHTMLBench / README.md
Jason-BoyuNiu's picture
Publish complete AmbiHTMLBench: 1115 pages and GT v5 annotations
028d4be verified
|
Raw History Blame
4.63 kB
---
pretty_name: AmbiHTMLBench
license: cc-by-4.0
language:
- en
- zh
task_categories:
- image-to-text
tags:
- document-understanding
- html
- benchmark
size_categories:
- 1K<n<10K
configs:
- config_name: pages
data_files:
- split: test
path: index/pages.jsonl
---
# AmbiHTMLBench
**Reconstruct document page images as executable HTML.**
[Code](https://github.com/theseus-labs-rsi/AmbiHTMLBench) | [Browse pages](https://ambihtmlbench.tech) | [Download ZIP](https://huggingface.co/datasets/Theseus-Lab/AmbiHTMLBench/resolve/main/archives/AmbiHTMLBench.zip?download=true)
AmbiHTMLBench evaluates content, structure, and visual fidelity in image-to-HTML
reconstruction. The benchmark covers institutional PDF documents, web-native
documentation, newspapers and magazines, and posters or design-heavy pages.
## What is included
| Material | This release |
|---|---:|
| Reference page images | 1,115 |
| Annotated blocks | 28,939 |
| Annotation version | GT v5 |
| Evaluation split | `test` |
Each page has an original image and a complete block-annotation JSON file.
Images retain their original bytes, resolution and format. The `test` split is
for evaluation; it is not a training split. This package contains reference
materials, not model predictions or judge records.
## Download and use
Download the [complete ZIP](https://huggingface.co/datasets/Theseus-Lab/AmbiHTMLBench/resolve/main/archives/AmbiHTMLBench.zip?download=true) and extract it, or fetch the repository:
```python
from huggingface_hub import snapshot_download
snapshot_download(repo_id="Theseus-Lab/AmbiHTMLBench", repo_type="dataset",
local_dir="AmbiHTMLBench", ignore_patterns=["archives/*"])
```
Read a page from the downloaded directory:
```python
import json
from pathlib import Path
from PIL import Image
root = Path("AmbiHTMLBench")
rows = [json.loads(line) for line in (root / "index/pages.jsonl").read_text(encoding="utf-8").splitlines()]
page = rows[0]
image = Image.open(root / page["image_path"])
annotation = json.loads((root / page["annotation_path"]).read_text(encoding="utf-8"))
```
For the lightweight index only:
```python
from datasets import load_dataset
pages = load_dataset("Theseus-Lab/AmbiHTMLBench", "pages", split="test")
```
The viewer contains **one metadata row per page**. Full images and annotations
are in the linked page directories; loading the index does not download them.
Use a fixed Hub commit revision when reproducing an experiment.
## Dataset structure
```text
README.md
release.json
manifest.json
SHA256SUMS
index/pages.jsonl
pages/0001/image.<original-format>
pages/0001/annotation.json
...
annotations/AmbiHTMLBench_GT_v5_1115.json
archives/AmbiHTMLBench.zip
```
Index rows contain `page_id`, `path`, `image_path`, `annotation_path`,
`image_width`, `image_height`, `block_count`, `annotation_version`, and `source_url`.
All file paths are relative to the dataset repository root.
Each `annotation.json` preserves the original page's `ID`, `imageUrl`, and
`contentList`. Blocks contain semantic labels in `name`, text/table/formula
content in `remark`, and pixel coordinates in `left`, `top`, `width`, `height`
where present. Optional fields and Unicode text are retained. The aggregate GT
file is an exact source copy for full releases and contains selected pages only
for previews. Original `imageUrl` values remain provenance; use `image_path` for
local images.
`SHA256SUMS` covers expanded files and the ZIP, excluding itself. `manifest.json`
records source and image identities and expanded-file digests, excluding itself
and the ZIP. The ZIP contains the expanded release and manifest, without the
outer ZIP or `SHA256SUMS`.
## Evaluation
Install and follow the [evaluation code](https://github.com/theseus-labs-rsi/AmbiHTMLBench).
Use the aggregate GT JSON and separately generated HTML predictions to measure
table, text and layout fidelity. For offline reference visualizations, resolve
each page's local image through the index. This GT v5 release is separate from
the frozen OLS5 subjective experiment's input snapshot.
## Materials and intended use
Reference pages include diverse layouts and multilingual text. Source URLs are
retained per page; the downloaded images remain usable if those URLs expire.
The public annotations are evaluation references and should not be supplied as
inputs to models being evaluated. Exposure or training contamination can affect
comparisons.
## Licensing and citation
Dataset content and presentation figures are CC BY 4.0. Executable code and environment/configuration files are Apache-2.0.