-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
369 lines (330 loc) · 15.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description"
content="Design2Code: How Far Are We From Automating Front-End Engineering">
<meta name="keywords" content="Design2Code">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Design2Code: How Far Are We From Automating Front-End Engineering</title>
<link href="https://fonts.googleapis.com/css?family=Google+Sans|Noto+Sans|Castoro"
rel="stylesheet">
<link rel="stylesheet" href="./static/css/bulma.min.css">
<link rel="stylesheet" href="./static/css/bulma-carousel.min.css">
<link rel="stylesheet" href="./static/css/bulma-slider.min.css">
<link rel="stylesheet" href="./static/css/fontawesome.all.min.css">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">
<link rel="stylesheet" href="./static/css/index.css">
<link rel="icon" href="./static/images/salt-logo.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script defer src="./static/js/fontawesome.all.min.js"></script>
<script src="./static/js/bulma-carousel.min.js"></script>
<script src="./static/js/bulma-slider.min.js"></script>
<script src="./static/js/index.js"></script>
<style>
/* Three image containers (use 25% for four, and 50% for two, etc) */
.imgcolumn {
float: left;
width: 50%;
padding: 10px
}
/* Clear floats after image containers */
.imgrow::after {
content: "";
clear: both;
display: table;
}
table.customTable {
width: 50%;
background-color: #FFFFFF;
border-collapse: collapse;
border-width: 2px;
border-color: rgb(214, 236, 244);
border-style: solid;
color: #000000;
margin-left: auto;
margin-right: auto;
}
table.customTable td {
border-width: 2px;
border-color: rgb(214, 236, 244);
border-style: solid;
padding: 5px;
text-align: center;
vertical-align: middle;
}
table.customTable th {
border-width: 2px;
border-color: rgb(214, 236, 244);
border-style: solid;
padding: 5px;
}
table.customTable thead {
background-color: rgb(214, 236, 244);
}
</style>
</head>
<body>
<section class="hero">
<div class="hero-body">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column has-text-centered">
<h1 class="title is-1 publication-title">Design2Code: How Far Are We From Automating Front-End Engineering</h1>
<div class="is-size-5 publication-authors">
<span class="author-block">
<a href="https://noviscl.github.io/">Chenglei Si*</a><sup>1</sup>,</span>
<span class="author-block">
<a href="https://stevenyzzhang.github.io/website/">Yanzhe Zhang*</a><sup>2</sup>,</span>
<span class="author-block">
<a href="https://zyang-ur.github.io/">Zhengyuan Yang</a><sup>3</sup>,</span>
<span class="author-block">
<a href="https://www.cs.dartmouth.edu/~rbliu/">Ruibo Liu</a><sup>4</sup>,
</span>
<span class="author-block">
<a href="https://cs.stanford.edu/~diyiy/">Diyi Yang</a><sup>1</sup>
</span>
</div>
<div class="is-size-5 publication-authors">
<span class="author-block"><sup>1</sup>Stanford University,</span>
<span class="author-block"><sup>2</sup>Georgia Tech,</span>
<span class="author-block"><sup>3</sup>Microsoft,</span>
<span class="author-block"><sup>4</sup>Google DeepMind</span>
</div>
<div class="is-size-5 publication-authors">
<span class="author-block">
<img src="./static/images/stanford-university-logo-2.png" width="200" align="absmiddle"/>
</span>
<span class="author-block">
<img src="./static/images/GeorgiaTech_RGB.png" style="margin-right: 50px;" width="200" align="absmiddle"/>
</span><!---->
</div>
<div class="is-size-5 publication-authors">
<span class="author-block">
<img src="./static/images/Microsoft_logo.svg" style="margin-right: 50px;" width="200" align="absmiddle"/>
</span><!---->
<span class="author-block">
<img src="./static/images/DeepMind_new_logo.png" style="margin-right: 50px;" width="200" align="absmiddle"/>
</span><!---->
</div>
<div class="column has-text-centered">
<div class="publication-links">
<!-- PDF Link. -->
<span class="link-block">
<a href="https://arxiv.org/abs/2403.03163"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fas fa-file-pdf"></i>
</span>
<span>Paper</span>
</a>
</span>
<!-- Code Link. -->
<span class="link-block">
<a href="https://github.com/NoviScl/Design2Code"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>Code</span>
</a>
</span>
<!-- Dataset Link. -->
<span class="link-block">
<a href="https://huggingface.co/datasets/SALT-NLP/Design2Code"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="far fa-images"></i>
</span>
<span>Data</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<!-- Abstract. -->
<div class="columns is-centered has-text-centered">
<div class="column is-four-fifths">
<h2 class="title is-3">Abstract</h2>
<div class="content has-text-justified">
<p>
Generative AI has made rapid advancements in recent years, achieving unprecedented capabilities in multimodal understanding and code generation. This enabled a brand new paradigm of front-end development, where multimodal LLMs can potentially <strong>convert visual designs into code implementations directly</strong>, thus automating the front-end engineering pipeline. In this work, we provide the first systematic study on this visual design to code implementation task (dubbed as Design2Code). We manually curate a benchmark of 484 real-world webpages as test cases and develop a set of automatic evaluation metrics to assess how well current multimodal LLMs can generate the code implementations that directly render into the given reference webpages, given the screenshots as input. We develop a suit of multimodal prompting methods and show their effectiveness on GPT-4V and Gemini Vision Pro. We also finetune an <strong>open-source Design2Code-18B model that successfully matches the performance of Gemini Pro Vision</strong>. Both human evaluation and automatic metrics show that GPT-4V is the clear winner on this task, where annotators think GPT-4V generated webpages can replace the original reference webpages in <strong>49%</strong> cases in terms of visual appearance and content; and perhaps surprisingly, in <strong>64%</strong> cases GPT-4V generated webpages are considered better than even the original reference webpages. Our fine-grained break-down metrics indicate that open-source models mostly lag in recalling visual elements from the input webpages and in generating correct layout designs, while aspects like text content and coloring can be drastically improved with proper finetuning.
</p>
</div>
</div>
</div>
<!--/ Abstract. -->
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column">
<div class="content">
<h2 class="title is-3">Test Set Examples</h2>
<p>We show some examples from our benchmark (for evaluation purpose; bottow two rows) in comparison with the synthetic data created by Huggingface (for training purpose; first row). Our benchmark contains diverse real-world webpages with varying levels of complexities. (Image files are replaced with a placeholder blue box.)</p>
<img src="./static/images/test_examples_compare.png" class="example-image" alt="Example image."/>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column">
<div class="content">
<h2 class="title is-3">Benchmark Performance: Automatic Metrics</h2>
<p>For automatic evaluation, we consider high-level visual similarity (CLIP) and low-level element matching (block-match, text, position, color).
We compare all the benchmarked models along these different dimensions.</p>
<center><img src="./static/images/radar.png" class="example-image" alt="Example image." style="width: 60%;"/></center>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column">
<div class="content">
<h2 class="title is-3">Benchmark Performance: Human Evaluation</h2>
<p>We recruit human annotators to judge pairwise model output preference. The Win/Tie/Lose rate against the baseline (Gemini Pro Vision Direct Prompting). We sample 100 examples and ask 5 annotators for each pair of comparison, and we
take the majority vote on each example.</p>
<img src="./static/images/human_eval_win_rate.png" class="example-image" alt="Example image."/>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column">
<div class="content">
<h2 class="title is-3">Model Comparison Examples</h2>
<p>We present some case study examples to compare between different prompting methods and different models.</p>
<img src="./static/images/text_augmentation_example.png" class="example-image" alt="Example image."/>
<img src="./static/images/self_revision_examples.png" class="example-image" alt="Example image."/>
<img src="./static/images/open_source_models.png" class="example-image" alt="Example image."/>
</div>
</div>
</div>
</section>
<section class="section" style="background-color:#d6eeff">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column">
<div class="content">
<h2 class="title is-3">Additional GPT-4V Generation Examples</h2>
<p>We present more examples of GPT-4V generated webpages in comparison with the original reference webpages. The original designs are on the left and the GPT-4V generated webpages are on the right. You can judge for yourself whether GPT-4V is ready to automate building webpages.</p>
<div class="imgrow">
<div class="imgcolumn">
<img src="./static/images/testset_full_2.png" style="width:100%">
</div>
<div class="imgcolumn">
<img src="./static/images/gpt4v_visual_revision_prompting_2.png" style="width:100%">
</div>
</div>
<div class="imgrow">
<div class="imgcolumn">
<img src="./static/images/testset_full_13.png" style="width:100%">
</div>
<div class="imgcolumn">
<img src="./static/images/gpt4v_visual_revision_prompting_13.png" style="width:100%">
</div>
</div>
<div class="imgrow">
<div class="imgcolumn">
<img src="./static/images/testset_full_28.png" style="width:100%">
</div>
<div class="imgcolumn">
<img src="./static/images/gpt4v_visual_revision_prompting_28.png" style="width:100%">
</div>
</div>
<div class="imgrow">
<div class="imgcolumn">
<img src="./static/images/testset_full_33.png" style="width:100%">
</div>
<div class="imgcolumn">
<img src="./static/images/gpt4v_visual_revision_prompting_33.png" style="width:100%">
</div>
</div>
<div class="imgrow">
<div class="imgcolumn">
<img src="./static/images/testset_full_61.png" style="width:100%">
</div>
<div class="imgcolumn">
<img src="./static/images/gpt4v_visual_revision_prompting_61.png" style="width:100%">
</div>
</div>
<div class="imgrow">
<div class="imgcolumn">
<img src="./static/images/testset_full_89.png" style="width:100%">
</div>
<div class="imgcolumn">
<img src="./static/images/gpt4v_visual_revision_prompting_89.png" style="width:100%">
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section" id="BibTeX">
<div class="container is-max-desktop content">
<h2 class="title">BibTeX</h2>
<pre><code>@misc{si2024design2code,
title={Design2Code: How Far Are We From Automating Front-End Engineering?},
author={Chenglei Si and Yanzhe Zhang and Zhengyuan Yang and Ruibo Liu and Diyi Yang},
year={2024},
eprint={2403.03163},
archivePrefix={arXiv},
primaryClass={cs.CL}
}</code></pre>
</div>
</section>
<section class="section" id="Acknowledgement">
<div class="container is-max-desktop content">
<h2 class="title">Usage and License Notices</h2>
<p>
The data, code and model checkpoint are intended and licensed for research use only. Please do not use them for any malicious purposes.
</p>
<p>
The benchmark is built on top of the C4 dataset, under the ODC Attribution License (ODC-By).
</p>
<p>
This website is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/">Creative
Commons Attribution-ShareAlike 4.0 International License</a>.
</p>
<p>
This source code of this website is borrowed from <a
href="https://github.com/nerfies/nerfies.github.io">Nerfies</a>.
</p>
</div>
</section>
<!--
<footer class="footer">
<div class="container">
<div class="columns is-centered">
<div class="column is-8">
<div class="content">
<p>
This website is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/">Creative
Commons Attribution-ShareAlike 4.0 International License</a>.
</p>
<p>
This source code of this website is borrowed from <a
href="https://github.com/nerfies/nerfies.github.io">Nerfies</a>.
</p>
</div>
</div>
</div>
</div>
</footer> -->
</body>
</html>