DesignAsCode: Bridging Structural Editability and Visual Fidelity in Graphic Design Generation
Paper β’ 2602.17690 β’ Published
This dataset provides the image retrieval assets used by the DesignAsCode graphic design generation pipeline. It contains a large collection of design element images along with a pre-built FAISS index for semantic retrieval.
The images are sourced from the Crello dataset. We extracted the semantic representation of every element image using sentence-transformers/all-mpnet-base-v2 and built a FAISS index to enable fast text-to-image retrieval.
| File | Size | Description |
|---|---|---|
crello_pngs.tar.gz |
~18 GB | Archive of ~228K PNG design element images (backgrounds, shapes, icons, photos, etc.) |
elements_local.index |
~370 MB | Pre-built FAISS index for semantic similarity search over all element images |
id_mapping_local.json |
~4.6 MB | JSON mapping from FAISS index positions to image file IDs |
The DesignAsCode pipeline uses these files during the Retrieve stage:
elements_local.index) finds the most similar image by vector similarityid_mapping_local.json) translates the FAISS result index to an image filenamecrello_pngs/) into the design outputpip install huggingface_hub
# Download all files
huggingface-cli download Tony1109/crello-image-library --repo-type dataset --local-dir .
# Extract the image archive
tar -xzf crello_pngs.tar.gz
Then place the files in the data/ directory of your DesignAsCode project:
design-as-code/
βββ data/
βββ image_library/ # extracted from crello_pngs.tar.gz (renamed)
βββ elements_local.index # FAISS index
βββ id_mapping_local.json # index β image ID mapping
See the Quick Start Guide for full instructions.
@article{liu2026designascode,
title={DesignAsCode: Bridging Structural Editability and Visual Fidelity in Graphic Design Generation},
author={Liu, Ziyuan and Sun, Shizhao and Huang, Danqing and Shi, Yingdong and Zhang, Meisheng and Li, Ji and Yu, Jingsong and Bian, Jiang},
journal={arXiv preprint arXiv:2602.17690},
year={2026},
url={https://arxiv.org/abs/2602.17690}
}