Pengyu965 commited on
Commit
200fc7f
·
verified ·
1 Parent(s): 98a9819

Add files using upload-large-folder tool

Browse files
README.md CHANGED
@@ -18,65 +18,56 @@ tags:
18
  - multimodal
19
  size_categories:
20
  - 10K<n<100K
 
 
 
 
 
 
 
21
  ---
22
 
23
  # StructHub
24
 
25
  **StructHub** is a large-scale dataset of **structured images paired with their editable
26
- SVG / XML source code**, built for the *image-to-SVG* (and *text-to-SVG*) task introduced
27
- in **Back2Struct: Making Structured Images Editable Again**. Each raster image (a diagram,
28
  chart, flowchart, architecture figure, UML diagram, schema, etc.) is paired with
29
- **object-level** vector code that explicitly encodes text, shapes, topology, and layout —
30
- supporting supervised and reward-based training for models that "make structured images
31
- editable again."
32
 
33
  - 📄 Paper: *Back2Struct: Making Structured Images Editable Again*
34
  - 🔗 Project page: https://pengyu965.github.io/Back2Struct.github.io/
35
  - 🤖 Model: [`Pengyu965/Back2Struct-Image2SVG-7B`](https://huggingface.co/Pengyu965/Back2Struct-Image2SVG-7B)
36
 
37
- ## Composition
38
 
39
- | Subset | Train (full) | Train (≤ 8,192 tok) | Retention | Benchmark |
40
- |--------|-------------:|--------------------:|----------:|----------:|
41
- | **StarDiag-HQ** | 52,875 | 52,875 | 100.0% | 569 |
42
- | **OpenDiag** | 27,953 | 18,800 | 67.3% | 334 |
43
- | **NNArch** | 3,293 | 1,453 | 46.6% | 97 |
44
- | **Total** | **84,121** | **73,128** | **86.9%** | **1,000** |
45
 
46
- - **StarDiag-HQ** — high-quality synthetic structured diagrams.
47
- - **OpenDiag** — crawled open-domain structured graphics (broad style/topic coverage).
48
- - **NNArch** — neural-network / system architecture diagrams (long, complex SVGs).
49
 
50
- Training uses examples with **≤ 8,192 tokens** of ground-truth SVG (73,128 pairs) for
51
- stable long-context generation.
52
-
53
- ## StructHub Benchmark (1,000 samples)
54
-
55
- A held-out **1,000-sample** evaluation benchmark (569 StarDiag-HQ + 334 OpenDiag +
56
- 97 NNArch), split by ground-truth SVG length into three difficulty tiers:
57
-
58
- | Tier | GT SVG length | # samples |
59
- |------|---------------|----------:|
60
- | Easy | ≤ 2,048 tokens | 333 |
61
- | Medium | 2,048 – 4,096 tokens | 333 |
62
- | Hard | > 4,096 tokens | 334 |
63
-
64
- This enables evaluation across levels of structural complexity.
65
-
66
- ## Data fields
67
-
68
- Each example contains:
69
 
70
  | Field | Type | Description |
71
  |-------|------|-------------|
72
- | `id` | string | Unique example id (source-prefixed, e.g. `starvector_…`, `crawled_…`) |
73
- | `image` | image | The rendered structured raster image (input) |
 
 
74
  | `svg` | string | Ground-truth object-level SVG / XML code (target) |
75
- | `source` | string | `StarDiag-HQ` \| `OpenDiag` \| `NNArch` |
76
- | `num_tokens` | int | Token length of the ground-truth SVG |
77
- | `difficulty` | string | `easy` \| `medium` \| `hard` (benchmark split only) |
78
 
79
- > Adjust the field names above to match the files you upload.
 
 
 
 
 
 
 
 
80
 
81
  ## Usage
82
 
@@ -96,14 +87,13 @@ print(ex["svg"][:500]) # ground-truth SVG/XML
96
 
97
  Predictions are scored with **image-level** metrics (render success rate, DINOv2 similarity,
98
  LPIPS, SSIM between the rendered prediction and the input image) and a **text-level**
99
- GPTScore over the SVG code (Structure / Flow / Style, 0–5 each; Overall 0–100). See the
100
- paper for the render-gated evaluation protocol.
101
 
102
  ## Licensing
103
 
104
  StructHub aggregates multiple sources, including crawled open-domain graphics. Per-source
105
  terms may differ; the dataset is released for **research use**. Please review and respect the
106
- licenses of the original content. *(Confirm and update this field before publishing.)*
107
 
108
  ## Citation
109
 
 
18
  - multimodal
19
  size_categories:
20
  - 10K<n<100K
21
+ configs:
22
+ - config_name: default
23
+ data_files:
24
+ - split: train
25
+ path: data/train-*.parquet
26
+ - split: benchmark
27
+ path: data/benchmark-*.parquet
28
  ---
29
 
30
  # StructHub
31
 
32
  **StructHub** is a large-scale dataset of **structured images paired with their editable
33
+ SVG / XML source code**, for the *image-to-SVG* task introduced in
34
+ **Back2Struct: Making Structured Images Editable Again**. Each raster image (a diagram,
35
  chart, flowchart, architecture figure, UML diagram, schema, etc.) is paired with
36
+ **object-level** vector code that explicitly encodes text, shapes, topology, and layout.
 
 
37
 
38
  - 📄 Paper: *Back2Struct: Making Structured Images Editable Again*
39
  - 🔗 Project page: https://pengyu965.github.io/Back2Struct.github.io/
40
  - 🤖 Model: [`Pengyu965/Back2Struct-Image2SVG-7B`](https://huggingface.co/Pengyu965/Back2Struct-Image2SVG-7B)
41
 
42
+ ## Splits
43
 
44
+ | Split | Description | # examples |
45
+ |-------|-------------|-----------:|
46
+ | `train` | Full StructHub training set (all sources, all token lengths), with the benchmark held out | 86,102 |
47
+ | `benchmark` | Held-out StructHub evaluation benchmark | 1,000 |
 
 
48
 
49
+ Sources are combined into single splits (no per-source or per-difficulty division).
50
+ `source` and `token_count` are kept as columns for optional filtering.
 
51
 
52
+ ## Fields
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  | Field | Type | Description |
55
  |-------|------|-------------|
56
+ | `id` | string | Unique example id (source-prefixed, e.g. `starvector_…`, `crawled_…`, `nn_diagram_…`) |
57
+ | `source` | string | `starvector` \| `crawled` \| `nn_diagram` |
58
+ | `token_count` | int32 | Token length of the ground-truth SVG |
59
+ | `image` | image | The rendered structured raster image (input; PNG, embedded) |
60
  | `svg` | string | Ground-truth object-level SVG / XML code (target) |
 
 
 
61
 
62
+ ## Benchmark
63
+
64
+ The 1,000-sample benchmark draws from all three sources (starvector 569, crawled 334,
65
+ nn_diagram 97), all with SVGs ≤ 8,192 tokens, and is stratified by ground-truth SVG length
66
+ into easy (≤ 2,048), medium (2,048–4,096), and hard (> 4,096) tiers (333 / 333 / 334).
67
+ It is the evaluation set for the paper's Tables 2–3.
68
+
69
+ > Note: the benchmark contains 1,000 rows but 997 distinct `id`s (3 rows are exact
70
+ > duplicates, kept to match the paper's reported count of 1,000).
71
 
72
  ## Usage
73
 
 
87
 
88
  Predictions are scored with **image-level** metrics (render success rate, DINOv2 similarity,
89
  LPIPS, SSIM between the rendered prediction and the input image) and a **text-level**
90
+ GPTScore over the SVG code. See the paper for the render-gated evaluation protocol.
 
91
 
92
  ## Licensing
93
 
94
  StructHub aggregates multiple sources, including crawled open-domain graphics. Per-source
95
  terms may differ; the dataset is released for **research use**. Please review and respect the
96
+ licenses of the original content. *(Confirm and update this field before wide distribution.)*
97
 
98
  ## Citation
99
 
data/benchmark-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:485fdb8370503048aeb9e70e3c22b57416eb9432cdc0ebe6fc31c515fb6b692b
3
+ size 45711956
data/train-00000-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1e96be6ff75e273fb6156596a7738f7888ddbbdd0c81f26a4ef7dab7d5824e9
3
+ size 701057030
data/train-00001-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9161f504ad350e1a69602caad06891747771105048af5356097f46d21fd7305
3
+ size 721033075
data/train-00002-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:421ee8b2afc3bc7ff15d683f58c0ade8a285225eadf7ec6a5be530e4fe8d8694
3
+ size 716734988
data/train-00003-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38d3869a9da8ee90b30d241184df48e084183303c49ae7a1cb1d171e461075c0
3
+ size 480028468
data/train-00004-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:859af23d8e7ed805e7ef6f84954507f363bd8472b82be50f0c789c1812b9baa1
3
+ size 390119694
data/train-00005-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:218ba6579240939ec39fe906e26edc49f2e716da89ca4d3841c4838276393183
3
+ size 398613181
data/train-00006-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48a4393ac02e21c885799e894b91486204d7aa3d0c357e1f7fad055fa66b042b
3
+ size 394730252
data/train-00007-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15a1db369337f15351e41d9a9ff65f88b61d3465d9af1cacf9486d90ff22714b
3
+ size 392596738
data/train-00008-of-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ead6e180d0faf62ec8b54ad63b5a0df57c85527c776fa667b2f4c817808a1ee
3
+ size 392249858