LayerFolio / README.md
FolioWeaver's picture
Link FolioWeaver arXiv paper and add citation
9f30ecf verified
|
Raw History Blame Contribute Delete
12.9 kB
---
pretty_name: LayerFolio
license: other
license_name: layerfolio-component-specific-licenses
license_link: LICENSE
size_categories:
- 100K<n<1M
tags:
- image
- layered-images
- scene-graphs
- rgba
- parquet
- datasets
- arxiv:2611.30067
configs:
- config_name: default
data_files:
- split: train
path: data/train-*.parquet
---
# LayerFolio
![LayerFolio: 100,377 paired scenes, 869,762 PNG assets, six visual domains and 55 subcategories.](assets/layerfolio-cover.svg)
<p align="center">
<a href="https://arxiv.org/abs/2611.30067">Paper · arXiv:2611.30067</a> &nbsp;·&nbsp;
<a href="https://arxiv.org/pdf/2611.30067">PDF</a> &nbsp;·&nbsp;
<a href="#citation">Cite LayerFolio</a>
</p>
<p align="center">
<a href="#overview">Overview</a> &nbsp;·&nbsp;
<a href="#quick-start">Quick start</a> &nbsp;·&nbsp;
<a href="#inside-a-sample">Inside a sample</a> &nbsp;·&nbsp;
<a href="#data-reference">Data reference</a> &nbsp;·&nbsp;
<a href="#licensing-and-attribution">Licensing</a>
</p>
**LayerFolio connects what a scene says, how it is structured, and the pixels that make it up.**
Introduced in **[FolioWeaver: A LayerGraph-Grounded Agent for Layered Image
Generation and Editing](https://arxiv.org/abs/2611.30067)**, LayerFolio contains
**100,377 human-reviewed layered scenes**. Each sample pairs a scene description
with a LayerGraph, a full-scene composite, and its individual PNG assets. A shared
representation spans graphic design, photography, UI content, 3D graphics,
drawing, and illustration.
| Paired scenes | Visual domains | Subcategories | Embedded PNGs | Parquet shards |
|:---:|:---:|:---:|:---:|:---:|
| **100,377** | **6** | **55** | **869,762** | **183** |
> **Release at a glance:** one `train` split · approximately **194.33 GB** ·
> one complete sample per row · PNG bytes preserved, including alpha channels.
## Overview
LayerFolio provides paired supervision for **FolioWeaver**, an agent that unifies
layered image generation and iterative editing through a persistent executable
scene state. FolioWeaver uses LayerGraph to ground targeted edits in specific
layers and attributes while reusing unchanged assets.
The dataset aligns scene descriptions, relational graphs, composites, and layer
assets for scene planning, reference-conditioned asset generation, and composition
analysis. Its LayerGraph representation links assets to descriptions, geometry,
stacking order, appearance attributes, and explicit inter-layer relations.
See the [paper](https://arxiv.org/abs/2611.30067) for dataset construction and the
AtomicQA and CBLP evaluation protocols.
| What is paired | What it provides |
| --- | --- |
| **Scene description** | The overall visual intent, preserved in `global_prompt`. |
| **LayerGraph** | Layer identities, prompts, asset references, geometry, and typed relations. |
| **Composite** | The complete scene, embedded in `whole_image`. |
| **Layer assets** | Background and other PNG assets, embedded in `layer_images`. |
### Across visual domains
![Six actual LayerFolio composites showing graphic design, UI content, 3D graphics, photography, drawing and illustration.](assets/layerfolio-gallery.png)
*Representative examples from the release. These panels illustrate visual variety;
they are not a random or balanced evaluation subset. Sample IDs and source routing
are listed in [preview-samples.json](assets/preview-samples.json).*
![Sample counts across the six LayerFolio visual domains.](assets/layerfolio-coverage.svg)
<details>
<summary><strong>Exact domain counts</strong></summary>
| Domain | Scenes | Share |
| --- | ---: | ---: |
| Graphic design | 44,717 | 44.5% |
| Photography | 19,473 | 19.4% |
| 3D & computer graphics | 14,692 | 14.6% |
| UI & screen content | 11,208 | 11.2% |
| Painting & drawing | 6,712 | 6.7% |
| Illustration & animation | 3,575 | 3.6% |
| **Total** | **100,377** | **100%** |
Exact subcategory counts are available in [stats.json](stats.json).
Percentages above are rounded independently.
</details>
## Quick start
Start with streaming to inspect samples without downloading the entire release.
Image features decode to Pillow images when accessed.
```bash
pip install -U datasets pillow
```
```python
import json
from datasets import load_dataset
dataset = load_dataset(
"FolioWeaver/LayerFolio",
split="train",
streaming=True,
)
sample = next(iter(dataset))
graph = json.loads(sample["layergraph_json"])
print(sample["graph_id"])
print(sample["global_prompt"])
print("Annotated layers:", sample["num_layers"])
print("Stored layer assets:", sample["num_layer_images"])
composite = sample["whole_image"] # Pillow image
layer_assets = dict(zip(sample["layer_image_paths"], sample["layer_images"]))
```
<details>
<summary><strong>Access the original PNG bytes</strong></summary>
Turn off decoding before reading a sample. The stored `bytes` are the original
PNG file bytes, including any alpha channel.
```python
from datasets import Image, List
raw_dataset = dataset.cast_column("whole_image", Image(decode=False))
raw_dataset = raw_dataset.cast_column("layer_images", List(Image(decode=False)))
raw_sample = next(iter(raw_dataset))
composite_png = raw_sample["whole_image"]["bytes"]
layer_pngs = {
path: image["bytes"]
for path, image in zip(raw_sample["layer_image_paths"], raw_sample["layer_images"])
}
```
When images are decoded, use `layer_image_paths` to retain the asset-to-path mapping.
</details>
<details>
<summary><strong>Read a local download</strong></summary>
From the root of a downloaded repository:
```python
from datasets import load_dataset
dataset = load_dataset(
"parquet",
data_files={"train": "data/train-*.parquet"},
split="train",
streaming=True,
)
```
Rows may contain many images. Use streaming or selective column reads for
inspection instead of materializing the entire collection in memory.
</details>
## Inside a sample
![A real 3D scene shown alongside its background, nightstand and armchair layer assets; checkerboards indicate transparency.](assets/layerfolio-layers.png)
*Example `3D_Product_Object_001517` from the Poly Haven source stream. The
LayerGraph records the layer identities and their placement in the scene.
Checkerboards are added only for this preview to make transparency visible.*
The accompanying LayerGraph connects these assets to their roles and relations.
For this example, it records that the armchair is `left_of` the nightstand and
that both objects are `supported_by` the background.
```text
Scene description
│
├── LayerGraph ── layer IDs, prompts, boxes, stacking, relations
├── whole_image ─ full-scene PNG
└── layer_images
├── base_image.png
├── layer_00.png
└── layer_01.png
```
**Match layers by asset path.** `num_layers` counts annotations, while
`num_layer_images` counts stored PNG assets other than the whole image.
The asset list includes `base_image.png` and every other PNG in the sample,
including files that a particular layer does not reference. These counts
need not be equal, so a layer's position in the JSON is not an image-list index.
```python
for layer in graph["layers"]:
path = layer.get("rgba_path")
if path in layer_assets:
image = layer_assets[path]
print(layer["id"], image.size)
```
## Data reference
### Record fields
| Field | Contents |
| --- | --- |
| `graph_id` | Released sample identifier. |
| `sample_path` | Sample directory relative to the dataset root. |
| `category`, `subcategory` | Scene taxonomy labels. |
| `split` | `train` for every sample in this release. |
| `global_prompt`, `language` | Scene description and its source annotation language. |
| `num_layers` | Number of annotated layers in the LayerGraph. |
| `num_layer_images` | Number of embedded PNG assets other than the whole image. |
| `whole_image` | Hugging Face Image feature storing the full scene as `{bytes, path}`. |
| `layer_images` | Variable-length list of Image features, including the base image. |
| `layer_image_paths` | Relative paths aligned with `layer_images`. |
| `layergraph_json` | Complete LayerGraph annotation as UTF-8 JSON text. |
| `layergraph_sha256` | SHA-256 of the exported annotation text. |
| `source_layergraph_sha256` | SHA-256 of the original source annotation file. |
| `whole_image_sha256` | SHA-256 of the original composite PNG bytes. |
| `layer_image_sha256` | PNG checksums aligned with `layer_images`. |
The full feature specification is in [schema.json](schema.json).
### Packaging and integrity
```text
LayerFolio/
├── data/train-00000.parquet … train-00182.parquet
├── manifest.jsonl # Shard sizes, row counts, and SHA-256 checksums
├── SHA256SUMS # Per-shard checksums
├── stats.json # Exact release statistics
├── schema.json # Record feature specification
├── source_index.jsonl # Sample-to-source routing
├── SOURCE_PROVENANCE.md # Reconstruction method and limits
├── LICENSE
├── THIRD_PARTY_NOTICES.md
├── licenses/ # Component license texts and notices
└── assets/ # Dataset-card artwork and preview sample IDs
```
PNG assets are embedded directly without decoding or re-encoding. The full
annotation text is preserved, including whitespace and nested attributes,
with only its top-level `split` set to `train`. All stored asset paths are
relative to the dataset root.
To reconstruct a sample, write `layergraph_json.encode("utf-8")` to
`sample_path + "/layergraph.json"` and each raw Image's `bytes` to its `path`
under a chosen output directory. Validate that each path remains relative and
inside that directory before writing. Exported and source annotation hashes
may differ because of the split override; PNG byte hashes are unchanged.
### Split, coverage, and provenance
- **Split:** all **100,377 samples** are released as `train`. This package does
not designate an official validation or test set.
- **Coverage:** domain and subcategory sizes are uneven. The Photography
category includes synthetic imagery and should not be interpreted as a
guarantee of camera-captured photographs.
- **Source routing:** [source_index.jsonl](source_index.jsonl) covers every
released sample. Its mapping was reconstructed and sample-validated;
[SOURCE_PROVENANCE.md](SOURCE_PROVENANCE.md) explains the method and limits.
## Citation
If you use LayerFolio in your research, please cite the FolioWeaver paper:
**[FolioWeaver: A LayerGraph-Grounded Agent for Layered Image Generation and
Editing](https://arxiv.org/abs/2611.30067)**
Wentao Lu, Shengzhe Cui, Xihao Wu, Dingxin Yan, Yixuan Qin, and Pengfei Fang.
arXiv:2611.30067, 2026.
```bibtex
@misc{lu2026folioweaverlayergraphgroundedagentlayered,
title={FolioWeaver: A LayerGraph-Grounded Agent for Layered Image Generation and Editing},
author={Wentao Lu and Shengzhe Cui and Xihao Wu and Dingxin Yan and Yixuan Qin and Pengfei Fang},
year={2026},
eprint={2611.30067},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2611.30067}
}
```
## Licensing and attribution
This is a component-licensed collection. Read [LICENSE](LICENSE) and
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) before redistributing material.
Original copyrightable LayerFolio contributions are offered under **CC BY 4.0**
only to the extent the contributors hold the relevant rights. Third-party content
and applicable adaptations retain their upstream terms, including CC BY-SA 4.0,
Apache-2.0, CC0, and Crello's CDLA / VistaCreate notices. The full legal texts and
source notices are included in [licenses/](licenses/).
The publisher's academic research purpose adds **no dataset-wide non-commercial
restriction**. Permission for a particular use depends on the applicable
component terms and rights; this is not a statement that all third-party
redistribution permissions have been individually cleared. In particular, the
scope of Crello template/asset redistribution under VistaCreate remains to be
confirmed, as explained in the third-party notices.
For the **synthetic image stream**, captions derived from real photographs
were used as prompts for **Qwen-Image** to generate new images. The original
photograph files are not distributed as part of that stream. Qwen-Image's model
license is distinct from the rights in generated outputs. This process
description follows the dataset publisher's confirmation.
[source_index.jsonl](source_index.jsonl) provides sample-to-source routing;
[SOURCE_PROVENANCE.md](SOURCE_PROVENANCE.md) explains that it was reconstructed
and sample-validated, and does not supply every native upstream asset ID or
per-work creator credit. Required source attribution and permissions still apply.