Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
256
256
End of preview. Expand in Data Studio

im2vec-svg-stack-sample

Rendered (SVG, PNG) pairs for training Im2Vec, a raster-logo-to-SVG model. This is a pre-rendered sample of starvector/svg-stack (2.17M rows total, scraped from permissively-licensed GitHub repos): each .svg is paired with a same-stem .png rendered at 256x256 via cairosvg, matching this project's training pipeline (im2vec/data/render.py).

Why this dataset

Added alongside im2vec-svg-emoji to give the model more data and more shape diversity (real logos, icons, flags, diagrams) than emoji alone. Unlike starvector/svg-icons, these SVGs are genuinely colored: measured on a 500-file sample, ~40% of shapes carry real (non-black) fill, vs. 100% black for the original FIGR-8 training data.

Being scraped, real-world data, it's messier than svg-emoji: ~1-3% of files fail to parse (skipped) and ~20% tokenize past --max-len 512 (dropped by filter_by_token_length). Both are handled automatically by this project's existing pipeline.

Structure

train/svg/shard00..03/*.svg   train/png/shard00..03/*.png   (30000 svg, 29729 png)
valid/svg/*.svg                valid/png/*.png                (3000 svg, 2978 png)
test/svg/*.svg                 test/png/*.png                 (3000 svg, 2976 png)

SVG/PNG counts differ slightly because some SVGs failed to render (see "Why this dataset" above) — every PNG has a matching SVG, but not every SVG has a PNG. Hugging Face caps a single directory at 10,000 files, so train/ (30k+ files) is further split into shard00-shard03 subfolders (8000 files each) within svg//png/; valid//test/ are small enough to skip sharding. Merge same-stem files into one directory to use with im2vec.dataset.load_manifest:

mkdir -p data/svg-stack/train
cp train/svg/shard*/*.svg train/png/shard*/*.png data/svg-stack/train/
mkdir -p data/svg-stack/valid && cp valid/svg/*.svg valid/png/*.png data/svg-stack/valid/
mkdir -p data/svg-stack/test  && cp test/svg/*.svg  test/png/*.png  data/svg-stack/test/

License

Scraped from GitHub repositories filtered for permissive licenses (via BigCode's The Stack). Per-file provenance/license isn't individually tracked in this sample, so treat redistribution with the same care as any large scraped corpus.

Reproduce

python -m im2vec.data.prepare --dataset svg-stack --split train --n 30000 --out data/svg-stack/train
python -m im2vec.data.prepare --dataset svg-stack --split valid --n 3000  --out data/svg-stack/valid
python -m im2vec.data.prepare --dataset svg-stack --split test  --n 3000  --out data/svg-stack/test
Downloads last month
493