DAD / README.md
dad887's picture
Sync abstract with camera-ready manuscript
2362d52 verified
|
Raw History Blame Contribute Delete
6.42 kB
metadata
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<n<10M

Detect Anything in Graphic Design: Element-Level Rewards for Autoregressive Detection

NeurIPS 2026

DAD detects layered design elements, recovers occluded regions, and supports image-to-layer decomposition.

DAD improves element localization and recall, recovers occluded regions, and supports image-to-layer decomposition. Qualitative examples and benchmark results are from the paper; radar-chart metrics are normalized to [0.1, 1].

Abstract

Graphic designs, such as posters, advertisements, and infographics, are an important medium for communicating information and shaping understanding. Unlike natural images, they consist of layered elements with explicit compositional order. However, existing object detection models treat these elements as an unordered set, leaving compositional order unexploited. To address this limitation, we present Detect Anything in Graphic Design (DAD), a model that formulates graphic design detection as compositional deconstruction. It decodes elements in compositional order, using lower-layer elements to better detect higher-layer ones. The key feature of DAD is amodal detection, which predicts the full bounding box of each element, including regions occluded by elements placed above it. Building on this formulation, we propose Element Relative Policy Optimization (EleRPO), which extends GRPO from sequence-level supervision to element-level optimization. EleRPO provides fine-grained training signals that capture how each detected element contributes to overall detection quality, and works synergistically with compositional order to improve detection performance. To support training and evaluation, we build a dataset of 10 million graphic designs. Experiments show that DAD outperforms all baselines and produces amodal predictions consistent with human judgments, supporting effective image-to-layer decomposition. EleRPO consistently improves over GRPO across nine detection benchmarks.

Dataset overview

This repository provides the public layered-design dataset accompanying DAD. It contains approximately one million designs constructed by replacing elements with stylistically and semantically similar alternatives, together with approximately 100,000 ChartGalaxy designs. Composited images, individual layer assets, and aligned annotations support graphic-design detection and image-to-layer decomposition.

The paper's DAD-10M training and evaluation collection contains 10 million designs. The two subsets distributed here are listed below and share the same file layout and annotation schema.

subset source samples layers / sample size
element_replaced/ designs created by replacing elements with stylistically and semantically similar ones retrieved from a 12M-element pool 1,000,683 11.3 ~423 GB
chartgalaxy/ infographics from ChartGalaxy [Li et al., 2025] with original layered representations 99,983 64.3 ~30 GB

File layout

Each subset is distributed as tar shards in <subset>/shards/ (listed with sizes and checksums in <subset>/shards.manifest.json and <subset>/shards/SHA256SUMS). Extracting all shards into <subset>/ gives the layout below.

Both subsets share the same structure:

<subset>/
├── annotations.jsonl                       # one JSON record per sample
└── samples/
    └── <primary_key>/
        ├── 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)

{
  "image":       "samples/<primary_key>/image.webp",
  "primary_key": "<id>",
  "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":      "<subset tag>"
}

boxes[i], types[i], layer_files[i] are aligned by index. bg.webp (when present) is not listed in layer_files.

Loading

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 provides the EleRPO implementation, annotation and filtering tools, a reference-driven layered design synthesis pipeline, 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 and SFT, GRPO, and EleRPO 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 and the included license texts. These licenses apply per source and do not replace one another.