--- license: other license_name: dad-source-specific-licenses license_link: LICENSE.md configs: - config_name: preview_element_replaced data_dir: preview/element_replaced default: true - config_name: preview_chartgalaxy data_dir: preview/chartgalaxy - config_name: element_replaced_full_index data_files: - split: train path: element_replaced/annotations.jsonl - config_name: chartgalaxy_full_index data_files: - split: train path: chartgalaxy/annotations.jsonl size_categories: - 1M/shards/` (listed with sizes and checksums in `/shards.manifest.json` and `/shards/SHA256SUMS`). Extracting all shards into `/` gives the layout below. Both subsets share the same structure: ``` / ├── annotations.jsonl # one JSON record per sample └── samples/ └── / ├── image.webp # full composited render ├── bg.webp # background-only render (chartgalaxy only) ├── layer_000.webp # RGBA per-element layer, z=0 (bottom) ├── layer_001.webp └── ... ``` ## Annotation schema (`annotations.jsonl`, one JSON object per line) ```jsonc { "image": "samples//image.webp", "primary_key": "", "page_index": 0, "width": 1024, "height": 1536, "boxes": [[x0, y0, x1, y1], ...], // pixel xyxy, one per layer "types": ["visual" | "text", ...], // aligned with boxes "layer_files": ["layer_000.webp", ...], // aligned with boxes "source": "" } ``` `boxes[i]`, `types[i]`, `layer_files[i]` are aligned by index. `bg.webp` (when present) is not listed in `layer_files`. ## Loading ```python import json from PIL import Image from pathlib import Path ROOT = Path("layered_design_dataset/element_replaced") # or chartgalaxy records = [json.loads(l) for l in (ROOT / "annotations.jsonl").open()] r = records[0] img = Image.open(ROOT / r["image"]) layers = [Image.open(ROOT / "samples" / r["primary_key"] / lf) for lf in r["layer_files"]] boxes = r["boxes"] types = r["types"] ``` ## Code and additional resources The [DAD code repository](https://github.com/dad887/DAD) provides the EleRPO implementation, annotation and filtering tools, a [reference-driven layered design synthesis pipeline](https://github.com/dad887/DAD/tree/main/data/element_replacement), and inference/evaluation scripts. The synthesis pipeline includes installation instructions and exports composited images, individual layers, and detection annotations. For the paper's public-data experiment, separate repositories provide the [SFT, RL, and test splits](https://huggingface.co/datasets/dad887/DAD-Public-Repro) and [SFT, GRPO, and EleRPO models](https://huggingface.co/dad887/DAD-Public-Models). Those checkpoints are public-data experiment models, separate from the DAD model used for the paper's main experiments. ## License The `element_replaced` portion is released under CC BY 4.0. The `chartgalaxy` portion retains its upstream source terms; see [LICENSE.md](LICENSE.md) and the included license texts. These licenses apply per source and do not replace one another.