Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

Slide2SVG

Slide2SVG was released as part of the paper “Semantic Document Derendering: SVG Reconstruction via Vision-Language Modeling” (AAAI 2026).

Slide2SVG is a real-world dataset for semantic document derendering: transforming a rasterized presentation slide into a structured, editable SVG representation. Curated from publicly available academic conference presentations, it captures diverse design styles, font choices, image placements, and layout configurations found in real slides.

Each sample includes:

  • the raster slide in PNG format
  • an SVG representation that preserves editability (composed of only image and text SVG elements)
  • individual PNG image assets referenced by the SVG

The dataset is split into roughly 40,000 training samples and 225 test samples.


Dataset format

This dataset is formatted with Parquet shards. Each example contains:

  • id (string): unique sample id
  • image (Image): raster slide (PNG)
  • svg (string): SVG markup as text
  • assets_zip (binary): a ZIP archive containing the PNG image assets referenced by the SVG
  • assets (list[string]): filenames contained in assets_zip
  • num_assets (int): number of assets in the ZIP

Quickstart

Install

pip install datasets pillow

Load the dataset

from datasets import load_dataset

ds = load_dataset("ahazimeh/slide2svg")
print(ds)

Inspect an example

ex = ds["train"][0]
print(ex["id"])
print(type(ex["image"]))
print(ex["num_assets"])
print(ex["assets"])
print(ex["svg"])

Extract asset PNGs from assets_zip

import io
import zipfile

ex = ds["train"][0]

zf = zipfile.ZipFile(io.BytesIO(ex["assets_zip"]))
names = zf.namelist()
print("assets:", names)

# Read one asset as bytes
asset0_bytes = zf.read(names[0])

# Convert bytes to a PIL image
from PIL import Image
asset0 = Image.open(io.BytesIO(asset0_bytes)).convert("RGBA")

Save one complete example to disk (PNG + SVG + assets)

import os
import io
import zipfile

out_dir = "sample_export"
os.makedirs(out_dir, exist_ok=True)

ex = ds["train"][0]

# Save raster slide
ex["image"].save(os.path.join(out_dir, f"{ex['id']}.png"))

# Save SVG
with open(os.path.join(out_dir, f"{ex['id']}.svg"), "w", encoding="utf-8") as f:
    f.write(ex["svg"])

# Save assets
zf = zipfile.ZipFile(io.BytesIO(ex["assets_zip"]))
os.makedirs(out_dir, exist_ok=True)
zf.extractall(out_dir)

Data collection and processing

Slide2SVG was assembled using the following pipeline:

  1. PDF Collection
    Presentation slides in PDF format were collected from archives of several major machine learning conferences.

  2. SVG Conversion
    PDFs were converted to Figma designs and exported as raw SVG files. This conversion is used only for dataset creation. At inference time, we assume the slide is available only as a raster image.

  3. Asset Grouping
    Figma-exported SVGs often group text elements using non-semantic heuristics. To improve structure, text elements are reorganized using a zero-shot DocLayout-YOLO-based procedure so that text assets belonging to one entity are merged into a unified text object with updated spatial attributes.

  4. Outlier Filtering
    Slides with more than 8 image assets or 31 text assets (95th percentile thresholds) are filtered out as unusually complex.

  5. Rasterization
    The final SVGs are rendered into PNG format to obtain paired raster slides.


Intended use

This dataset supports research and development in:

  • raster-to-SVG conversion / derendering
  • slide/document understanding
  • layout analysis and generation
  • editability-preserving reconstruction

Maintainer

  • Adam Hazimeh
  • Contact: adam(dot)hazimeh(at)epfl(dot)ch
Downloads last month
14