shunk031 commited on
Commit
fe4c708
·
verified ·
1 Parent(s): e875fd6

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +263 -55
README.md CHANGED
@@ -1,57 +1,265 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: design_name
5
- dtype: string
6
- - name: design_url
7
- dtype: string
8
- - name: awwward_url
9
- dtype: string
10
- - name: design_tags
11
- sequence: uint8
12
- length: 54
13
- - name: text_content
14
- dtype: string
15
- - name: html_tags
16
- sequence: uint8
17
- length: 10
18
- - name: font_face
19
- dtype: string
20
- - name: font_size
21
- dtype: float32
22
- - name: font_color_r
23
- dtype: uint8
24
- - name: font_color_g
25
- dtype: uint8
26
- - name: font_color_b
27
- dtype: uint8
28
- - name: font_color_a
29
- dtype: uint8
30
- - name: font_face_embedding
31
- sequence: float32
32
- length: 40
33
- - name: center_x
34
- dtype: uint16
35
- - name: center_y
36
- dtype: uint16
37
- - name: width
38
- dtype: float32
39
- - name: height
40
- dtype: uint16
41
- splits:
42
- - name: train
43
- num_bytes: 1656086
44
- num_examples: 4268
45
- - name: test
46
- num_bytes: 242098
47
- num_examples: 625
48
- download_size: 541147
49
- dataset_size: 1898184
50
- configs:
51
- - config_name: default
52
- data_files:
53
- - split: train
54
- path: data/train-*
55
- - split: test
56
- path: data/test-*
57
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ annotations_creators:
3
+ - machine-generated
4
+ language:
5
+ - en
6
+ language_creators:
7
+ - found
8
+ license:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ pretty_name: CTXFont
13
+ size_categories:
14
+ - 1K<n<10K
15
+ source_datasets:
16
+ - original
17
+ task_categories:
18
+ - other
19
+ task_ids: []
20
+ tags:
21
+ - design
22
+ - typography
23
+ - font-prediction
24
+ - web-design
25
+ - graphic-design
26
+ - context-aware
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  ---
28
+
29
+ # Dataset Card for CTXFont
30
+
31
+ [![CI](https://github.com/creative-graphic-design/huggingface-datasets/actions/workflows/ci.yaml/badge.svg)](https://github.com/creative-graphic-design/huggingface-datasets/actions/workflows/ci.yaml)
32
+ [![Sync HF](https://github.com/creative-graphic-design/huggingface-datasets/actions/workflows/push_to_hub.yaml/badge.svg)](https://github.com/creative-graphic-design/huggingface-datasets/actions/workflows/push_to_hub.yaml)
33
+
34
+ ## Table of Contents
35
+
36
+ - [Dataset Card Creation Guide](#dataset-card-creation-guide)
37
+ - [Table of Contents](#table-of-contents)
38
+ - [Dataset Description](#dataset-description)
39
+ - [Dataset Summary](#dataset-summary)
40
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
41
+ - [Languages](#languages)
42
+ - [Dataset Structure](#dataset-structure)
43
+ - [Data Instances](#data-instances)
44
+ - [Data Fields](#data-fields)
45
+ - [Data Splits](#data-splits)
46
+ - [Dataset Creation](#dataset-creation)
47
+ - [Curation Rationale](#curation-rationale)
48
+ - [Source Data](#source-data)
49
+ - [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
50
+ - [Who are the source language producers?](#who-are-the-source-language-producers)
51
+ - [Annotations](#annotations)
52
+ - [Annotation process](#annotation-process)
53
+ - [Who are the annotators?](#who-are-the-annotators)
54
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
55
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
56
+ - [Social Impact of Dataset](#social-impact-of-dataset)
57
+ - [Discussion of Biases](#discussion-of-biases)
58
+ - [Other Known Limitations](#other-known-limitations)
59
+ - [Additional Information](#additional-information)
60
+ - [Dataset Curators](#dataset-curators)
61
+ - [Licensing Information](#licensing-information)
62
+ - [Citation Information](#citation-information)
63
+ - [Contributions](#contributions)
64
+
65
+ ## Dataset Description
66
+
67
+ - **Homepage:** https://github.com/nanxuanzhao/CTXFont-dataset
68
+ - **Repository:** https://github.com/creative-graphic-design/huggingface-datasets/tree/main/datasets/CTXFont
69
+ - **Paper (Preprint):** <!-- No arXiv preprint available -->
70
+ - **Paper (Pacific Graphics 2018):** https://onlinelibrary.wiley.com/doi/abs/10.1111/cgf.13576
71
+ - **Leaderboard:** N/A
72
+ - **Point of Contact:** Nanxuan Zhao (contact information not publicly available)
73
+
74
+ ### Dataset Summary
75
+
76
+ CTXFont (Context Font) is a dataset for studying font selection in the context of web design. It contains 1,065 professional web designs from awwwards.com with annotations for 4,893 text elements. Each text element is annotated with font properties including font face, color (RGBA), and size, along with contextual information such as HTML tags, design tags, and element positioning. The dataset includes 492 unique font faces and provides 40-dimensional font face embeddings learned using an autoencoder.
77
+
78
+ The dataset was created for the task of predicting font properties (face, color, size) that match a given web design context, enabling automatic font selection systems that consider the visual and semantic context of the design.
79
+
80
+ The dataset is split into training (4,268 examples) and test (625 examples) sets.
81
+
82
+ ### Supported Tasks and Leaderboards
83
+
84
+ - **Font Property Prediction**: The dataset can be used to train models that predict font properties (font face, color, size) for text elements in web designs based on visual and semantic context. The original paper uses a multi-task deep neural network with adversarial learning.
85
+ - **Font Face Prediction**: Predict which font face best matches a given design context
86
+ - **Font Color Prediction**: Predict RGB color values for text that fits the design
87
+ - **Font Size Prediction**: Predict appropriate font size for text elements
88
+
89
+ No public leaderboard is currently available for this dataset.
90
+
91
+ ### Languages
92
+
93
+ The text content in the dataset is primarily in English, though the dataset focuses on visual and typographic properties rather than language modeling. Design tags and HTML tags are also in English.
94
+
95
+ ## Dataset Structure
96
+
97
+ ### Data Instances
98
+
99
+ A typical example from the dataset:
100
+
101
+ ```python
102
+ {
103
+ 'design_name': '1003_2.png',
104
+ 'design_url': 'http://example.com/design',
105
+ 'awwward_url': 'https://www.awwwards.com/sites/...',
106
+ 'design_tags': [1, 0, 0, ...], # 54-dimensional binary vector
107
+ 'text_content': 'WE ARE A CREATIVE DIGITAL AGENCY',
108
+ 'html_tags': [0, 0, 1, ...], # 10-dimensional binary vector
109
+ 'font_face': 'Roboto',
110
+ 'font_size': 12.0,
111
+ 'font_color_r': 210,
112
+ 'font_color_g': 175,
113
+ 'font_color_b': 146,
114
+ 'font_color_a': 255,
115
+ 'font_face_embedding': [0.123, -0.456, ...], # 40-dimensional embedding
116
+ 'center_x': 113,
117
+ 'center_y': 200,
118
+ 'width': 220.0,
119
+ 'height': 44
120
+ }
121
+ ```
122
+
123
+ ### Data Fields
124
+
125
+ - `design_name` (string): Filename of the web design screenshot (e.g., "1003_2.png")
126
+ - `design_url` (string): URL of the original website
127
+ - `awwward_url` (string): URL on awwwards.com
128
+ - `design_tags` (sequence of uint8): 54-dimensional binary vector representing design characteristics (e.g., "colorful", "minimalist")
129
+ - `text_content` (string): The actual text content of the element
130
+ - `html_tags` (sequence of uint8): 10-dimensional binary vector representing HTML tag (e.g., h1, p, a)
131
+ - `font_face` (string): Name of the font face used
132
+ - `font_size` (float32): Font size in pixels
133
+ - `font_color_r` (uint8): Red channel of font color (0-255)
134
+ - `font_color_g` (uint8): Green channel of font color (0-255)
135
+ - `font_color_b` (uint8): Blue channel of font color (0-255)
136
+ - `font_color_a` (uint8): Alpha channel of font color (0-255)
137
+ - `font_face_embedding` (sequence of float32): 40-dimensional embedding of the font face learned via autoencoder
138
+ - `center_x` (uint16): X-coordinate of the element's center position
139
+ - `center_y` (uint16): Y-coordinate of the element's center position
140
+ - `width` (float32): Width of the text element in pixels
141
+ - `height` (uint16): Height of the text element in pixels
142
+
143
+ ### Data Splits
144
+
145
+ The dataset is split into two sets:
146
+
147
+ | | train | test |
148
+ | -------- | ----: | ---: |
149
+ | Examples | 4,268 | 625 |
150
+
151
+ The split is based on unique web designs, ensuring that all text elements from the same design appear in the same split.
152
+
153
+ ## Dataset Creation
154
+
155
+ ### Curation Rationale
156
+
157
+ The dataset was created to enable research on context-aware font selection for web design. Traditional font selection tools model fonts in isolation without considering the visual and semantic context where they are used. This dataset enables the development of systems that can automatically suggest fonts that match the style, mood, and purpose of a given web design.
158
+
159
+ ### Source Data
160
+
161
+ The source data consists of professional web designs from awwwards.com, a platform where web designers submit their work for peer review and recognition.
162
+
163
+ #### Initial Data Collection and Normalization
164
+
165
+ The authors collected 1,065 web designs from awwwards.com, capturing screenshots at 768×1366 resolution (the most common screen resolution at the time). They automatically extracted font properties and text element information by parsing HTML source files. The dataset includes:
166
+
167
+ 1. Screenshots of web designs
168
+ 2. Annotations extracted from HTML/CSS: font face, size, color, position, HTML tags
169
+ 3. Design tags provided by designers to describe the design characteristics
170
+ 4. Font face embeddings learned using an autoencoder trained on 35,364 TrueType fonts
171
+
172
+ Not all fonts shown on webpages could be captured, as some may be embedded in images.
173
+
174
+ #### Who are the source language producers?
175
+
176
+ The source content was created by professional web designers who submitted their work to awwwards.com. These designers represent the global web design community and created the designs for various clients and purposes.
177
+
178
+ ### Annotations
179
+
180
+ The annotations consist of font properties and contextual information for text elements on web designs.
181
+
182
+ #### Annotation process
183
+
184
+ The annotations were automatically extracted from HTML and CSS source files of the web designs. For each text element visible on a webpage, the following were extracted:
185
+
186
+ - Font properties (face, color, size) from CSS
187
+ - HTML tag enclosing the text
188
+ - Position and bounding box from rendered layout
189
+ - Design tags were provided by the designers themselves when submitting to awwwards.com
190
+
191
+ Font face embeddings were computed using a separately trained autoencoder network.
192
+
193
+ #### Who are the annotators?
194
+
195
+ The annotations are machine-generated from HTML/CSS parsing. The design tags were provided by the original web designers who created the designs.
196
+
197
+ ### Personal and Sensitive Information
198
+
199
+ [More Information Needed]
200
+
201
+ <!-- State whether the dataset uses identity categories and, if so, how the information is used. Describe where this information comes from (i.e. self-reporting, collecting from profiles, inferring, etc.). See [Larson 2017](https://www.aclweb.org/anthology/W17-1601.pdf) for using identity categories as a variables, particularly gender. State whether the data is linked to individuals and whether those individuals can be identified in the dataset, either directly or indirectly (i.e., in combination with other data).
202
+
203
+ State whether the dataset contains other data that might be considered sensitive (e.g., data that reveals racial or ethnic origins, sexual orientations, religious beliefs, political opinions or union memberships, or locations; financial or health data; biometric or genetic data; forms of government identification, such as social security numbers; criminal history).
204
+
205
+ If efforts were made to anonymize the data, describe the anonymization process. -->
206
+
207
+ ## Considerations for Using the Data
208
+
209
+ ### Social Impact of Dataset
210
+
211
+ [More Information Needed]
212
+
213
+ <!-- Please discuss some of the ways you believe the use of this dataset will impact society.
214
+
215
+ The statement should include both positive outlooks, such as outlining how technologies developed through its use may improve people's lives, and discuss the accompanying risks. These risks may range from making important decisions more opaque to people who are affected by the technology, to reinforcing existing harmful biases (whose specifics should be discussed in the next section), among other considerations.
216
+
217
+ Also describe in this section if the proposed dataset contains a low-resource or under-represented language. If this is the case or if this task has any impact on underserved communities, please elaborate here. -->
218
+
219
+ ### Discussion of Biases
220
+
221
+ [More Information Needed]
222
+
223
+ <!-- Provide descriptions of specific biases that are likely to be reflected in the data, and state whether any steps were taken to reduce their impact.
224
+
225
+ For Wikipedia text, see for example [Dinan et al 2020 on biases in Wikipedia (esp. Table 1)](https://arxiv.org/abs/2005.00614), or [Blodgett et al 2020](https://www.aclweb.org/anthology/2020.acl-main.485/) for a more general discussion of the topic.
226
+
227
+ If analyses have been run quantifying these biases, please add brief summaries and links to the studies here. -->
228
+
229
+ ### Other Known Limitations
230
+
231
+ [More Information Needed]
232
+
233
+ <!-- If studies of the datasets have outlined other limitations of the dataset, such as annotation artifacts, please outline and cite them here. -->
234
+
235
+ ## Additional Information
236
+
237
+ ### Dataset Curators
238
+
239
+ [More Information Needed]
240
+
241
+ <!-- List the people involved in collecting the dataset and their affiliation(s). If funding information is known, include it here. -->
242
+
243
+ ### Licensing Information
244
+
245
+ [More Information Needed]
246
+
247
+ <!-- Provide the license and link to the license webpage if available. -->
248
+
249
+ ### Citation Information
250
+
251
+ ```bibtex
252
+ @article{zhao2018modeling,
253
+ title={Modeling Fonts in Context: Font Prediction on Web Designs},
254
+ author={Zhao, Nanxuan and Cao, Ying and Lau, Rynson W.H.},
255
+ journal={Computer Graphics Forum},
256
+ volume={37},
257
+ number={7},
258
+ year={2018},
259
+ publisher={The Eurographics Association and John Wiley \& Sons Ltd.}
260
+ }
261
+ ```
262
+
263
+ ### Contributions
264
+
265
+ Thanks to [@nanxuanzhao](https://github.com/nanxuanzhao) for adding this dataset.