Datasets:
|
Download README.md from Theseus-Lab/AmbiHTMLBench: direct link, hf CLI and curl.
- Browser
- Download file 4.96 kB
-
https://huggingface.co/datasets/Theseus-Lab/AmbiHTMLBench/resolve/main/README.md
- Command line
-
hf download hf://datasets/Theseus-Lab/AmbiHTMLBench/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Theseus-Lab/AmbiHTMLBench/resolve/main/README.md
4.96 kB
| pretty_name: AmbiHTMLBench | |
| license: mit | |
| 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_id = "0001" | |
| page = next(row for row in rows if row["page_id"] == page_id) | |
| image = Image.open(root / page["image_path"]) | |
| annotation = json.loads((root / page["annotation_path"]).read_text(encoding="utf-8")) | |
| assert annotation["ID"] == int(page_id) | |
| ``` | |
| 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 | |
| LICENSE | |
| 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`, and `annotation_version`. | |
| All file paths are relative to the dataset repository root. | |
| Page IDs are four-digit strings (`0001` through `1115` in the full release). | |
| Each ID links the image and ground truth in `pages/<page_id>/`; the index | |
| provides their exact local paths. The numeric `ID` in each annotation and in | |
| the aggregate ground truth identifies the same page. | |
| Each `annotation.json` contains `ID` and the complete original `contentList`. | |
| Blocks contain semantic labels in `name`, text/table/formula | |
| content in `remark`, and pixel coordinates in `left`, `top`, `width`, `height` | |
| where present. Optional block fields and Unicode text are retained. The aggregate | |
| GT file contains the same page annotations. Source image URL fields are omitted | |
| from the index, annotations, manifest and ZIP. Images are loaded from downloaded | |
| files using the ID-to-path mapping; no source URL lookup is needed or provided. | |
| `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. Images are | |
| included in the release and can be used offline after download. | |
| The public annotations are evaluation references and should not be supplied as | |
| inputs to models being evaluated. Exposure or training contamination can affect | |
| comparisons. | |
| ## License | |
| This dataset is released under the [MIT License](LICENSE). | |