AnonymousSubmissionASE commited on
Commit
96bfbc7
·
verified ·
1 Parent(s): 9b0fdaa

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +106 -50
README.md CHANGED
@@ -1,53 +1,109 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: example_id
5
- dtype: string
6
- - name: source_id
7
- dtype: string
8
- - name: pattern_family
9
- dtype: string
10
- - name: pattern_name
11
- dtype: string
12
- - name: attribute_name
13
- dtype: string
14
- - name: attribute_token
15
- dtype: string
16
- - name: position
17
- dtype: string
18
- - name: modified_index
19
- dtype: string
20
- - name: target_value
21
- dtype: string
22
- - name: target_value_from_filename
23
- dtype: string
24
- - name: bias_value
25
- dtype: string
26
- - name: pattern_description
27
- dtype: string
28
- - name: element_description
29
- dtype: string
30
- - name: code_snippet_line
31
- dtype: string
32
- - name: code_snippet_context
33
- dtype: string
34
- - name: html_path
35
- dtype: string
36
- - name: standard_image
37
- dtype: image
38
- - name: noise_image
39
- dtype: image
40
- - name: html_content
41
- dtype: string
42
- splits:
43
- - name: train
44
- num_bytes: 262585045
45
- num_examples: 720
46
- download_size: 214515622
47
- dataset_size: 262585045
48
  configs:
49
- - config_name: default
50
- data_files:
51
- - split: train
52
- path: data/train-*
 
53
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ pretty_name: Pattern Over Pixels Screenshot-to-Code
3
+ license: other
4
+ task_categories:
5
+ - image-to-text
6
+ - text-generation
7
+ tags:
8
+ - screenshot-to-code
9
+ - multimodal
10
+ - html
11
+ - css
12
+ - visual-grounding
13
+ size_categories:
14
+ - n<1K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  configs:
16
+ - config_name: default
17
+ default: true
18
+ data_files:
19
+ - split: train
20
+ path: "data/train-*.parquet"
21
  ---
22
+
23
+ # Pattern Over Pixels Screenshot-to-Code
24
+
25
+ This dataset contains controlled counterfactual screenshot-to-code examples built
26
+ from 30 real-world webpages from Design2Code. Each example preserves a repeated
27
+ UI pattern while introducing a single localized deviation, allowing researchers
28
+ to test whether multimodal models follow the pixels or simply restore the
29
+ dominant template.
30
+
31
+ ## Contents
32
+
33
+ - 720 perturbed HTML instances
34
+ - 360 structural-card examples
35
+ - 360 text-style examples
36
+ - 2 screenshot conditions per example:
37
+ - `standard_image`
38
+ - `noise_image`
39
+
40
+ ## Layout
41
+
42
+ ```text
43
+ hf_release/
44
+ README.md
45
+ .gitattributes
46
+ data/
47
+ examples.jsonl
48
+ metadata/
49
+ dataset_info.json
50
+ validation_report.json
51
+ html/
52
+ cards/
53
+ texts/
54
+ images/
55
+ cards/
56
+ standard/
57
+ noise/
58
+ texts/
59
+ standard/
60
+ noise/
61
+ ```
62
+
63
+ ## Row Schema
64
+
65
+ Each line in `data/examples.jsonl` is one perturbed HTML instance with both
66
+ image conditions attached. Important fields include:
67
+
68
+ - `example_id`
69
+ - `source_id`
70
+ - `pattern_family`
71
+ - `pattern_name`
72
+ - `attribute_name`
73
+ - `position`
74
+ - `target_value`
75
+ - `bias_value`
76
+ - `html_path`
77
+ - `standard_image`
78
+ - `noise_image`
79
+ - `code_snippet_line`
80
+ - `code_snippet_context`
81
+
82
+ ## Loading
83
+
84
+ Load the local release folder with:
85
+
86
+ ```python
87
+ from datasets import load_dataset, Image
88
+
89
+ ds = load_dataset("json", data_files="data/examples.jsonl", split="train")
90
+ ds = ds.cast_column("standard_image", Image())
91
+ ds = ds.cast_column("noise_image", Image())
92
+ ```
93
+
94
+ After pushing to the Hub with `scripts/push_hf_dataset.py`, load it with:
95
+
96
+ ```python
97
+ from datasets import load_dataset
98
+
99
+ ds = load_dataset("AnonymousSubmissionASE/pixels_vs_code", split="train")
100
+ ```
101
+
102
+ ## Notes
103
+
104
+ - `standard_image` and `noise_image` are relative paths inside the dataset repo.
105
+ - The Hub push script materializes `html_content` and embeds image bytes into the
106
+ Parquet shards so the hosted dataset is self-contained.
107
+ - This release is organized for public hosting and loading, not for regeneration.
108
+ - The underlying webpages originate from real-world websites. Check original
109
+ website licenses and terms before downstream redistribution or commercial use.