-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
661 lines (556 loc) · 30.7 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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Visual Instruction Tuning">
<meta name="keywords" content="multimodal chatbot">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LLaVA-Grounding</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Google+Sans|Noto+Sans|Castoro">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
<link rel="stylesheet" href="./static/css/index.css">
<link rel="icon" href="images/icon-cl.png">
<!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/js/all.min.js"></script>
<script type="module" src="https://gradio.s3-us-west-2.amazonaws.com/3.39.0/gradio.js"></script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>
</head>
<style>
.expandable-card .card-text-container {
max-height: 200px;
overflow-y: hidden;
position: relative;
}
.expandable-card.expanded .card-text-container {
max-height: none;
}
.expand-btn {
position: relative;
display: none;
background-color: rgba(255, 255, 255, 0.8);
/* margin-top: -20px; */
/* justify-content: center; */
color: #510c75;
border-color: transparent;
}
.expand-btn:hover {
background-color: rgba(200, 200, 200, 0.8);
text-decoration: none;
border-color: transparent;
color: #510c75;
}
.expand-btn:focus {
outline: none;
text-decoration: none;
}
.expandable-card:not(.expanded) .card-text-container:after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 90px;
background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 1));
}
.expandable-card:not(.expanded) .expand-btn {
margin-top: -40px;
}
.card-body {
padding-bottom: 5px;
}
.vertical-flex-layout {
justify-content: center;
align-items: center;
height: 100%;
display: flex;
flex-direction: column;
gap: 5px;
}
.figure-img {
max-width: 100%;
height: auto;
}
.adjustable-font-size {
font-size: calc(0.5rem + 2vw);
}
.chat-history {
flex-grow: 1;
overflow-y: auto;
/* overflow-x: hidden; */
padding: 5px;
border-bottom: 1px solid #ccc;
margin-bottom: 10px;
}
#gradio pre {
background-color: transparent;
}
</style>
<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">🌋 LLaVA-Grounding: Grounded Visual Chat with Large Multimodal Models
<h4></h4>
<!-- <h4 class="title is-3 publication-title"><span class="is-size-3"> Learning to Use <span class="is-size-2">Tools</span> For Creating Multimodal <span class="is-size-2">Agents</span></span></h3> -->
<!-- <h3 class="title is-3 publication-title">Visual Instruction Tuning</h3>
<h5 class="subtitle is-5 publication-awards">NeurIPS 2023 (Oral)</h5> -->
<br>
<div class="is-size-5 publication-authors">
<span class="author-block">
<a href="https://scholar.google.com/citations?user=B8hPxMQAAAAJ&hl=zh-CN" style="color:#a800d7;font-weight:normal;">Hao Zhang<sup>*</sup><sup><b style="color:#a800d7; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://scholar.google.com.hk/citations?user=zdgHNmkAAAAJ&hl=en" style="color:#f68946;font-weight:normal;">Hongyang Li<sup>*</sup><sup><b style="color:#f68946; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://fengli-ust.github.io/" style="color:#a800d7;font-weight:normal;">Feng Li<sup><b style="color:#a800d7; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://rentainhe.github.io/" style="color:#0071f2;font-weight:normal;">Tianhe Ren<sup><b style="color:#0071f2; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://maureenzou.github.io/" style="color:#56d9dd;font-weight:normal;">Xueyan Zou<sup><b style="color:#56d9dd; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://lsl.zone/" style="color:#f5643f;font-weight:normal;">Shilong Liu<sup><b style="color:#f5643f; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://sega-hsj.github.io/" style="color:#aea1e7;font-weight:normal;">Shijia Huang<sup><b style="color:#aea1e7; font-weight:normal">▶ </b></sup></a>,
</span>
<br>
<span class="author-block">
<a href="https://www.microsoft.com/en-us/research/people/jfgao/" style="color:#149308;font-weight:normal;">Jianfeng Gao<sup>☨</sup><sup><b style="color:#149308; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://www.leizhang.org/" style="color:#0071f2;font-weight:normal;">Lei Zhang<sup>☨</sup><sup><b style="color:#0071f2; font-weight:normal">▶ </b></sup></a>,
</span>
<span class="author-block">
<a href="https://chunyuan.li/" style="color:#149308;font-weight:normal;">Chunyuan Li<sup><b style="color:#149308; font-weight:normal">▶<sup><b style="color:#f68946; font-weight:normal">🚩 </b></sup> </b></sup></a>,
</span>
<span class="author-block">
<a href="https://jwyang.github.io/" style="color:#149308;font-weight:normal;">Jianwei Yang<sup><b style="color:#149308; font-weight:normal">▶ <sup><b style="color:#f68946; font-weight:normal">🚩 </b></sup></b></sup></a>,
</span>
</div>
<br>
<div class="is-size-5 publication-authors">
<span class="author-block"><b style="color:#a800d7; font-weight:normal">▶ </b> HKUST</span>
<span class="author-block"><b style="color:#f68946; font-weight:normal">▶ </b> SCUT</b></span>
<span class="author-block"><b style="color:#149308; font-weight:normal">▶ </b> Microsoft Research, Redmond </span>
<span class="author-block"><b style="color:#0071f2; font-weight:normal">▶ </b> IDEA Research</span>
<span class="author-block"><b style="color:#56d9dd; font-weight:normal">▶ </b> University of Wisconsin-Madison </span>
<span class="author-block"><b style="color:#f5643f; font-weight:normal">▶ </b> Tsinghua University </span>
<span class="author-block"><b style="color:#aea1e7; font-weight:normal">▶ </b> CUHK </span>
</div>
<div class="is-size-6 publication-authors">
<span class="author-block"><sup>*</sup> Equal Contribution</span>
  
<span class="author-block"><sup>☨</sup> Equal Advisory Contribution</span>
  
<span class="author-block"><sup><b style="color:#f68946; font-weight:normal">🚩 </b></sup>Directional Lead</span>
</div>
<br>
<div class="column has-text-centered">
<div class="publication-links">
<span class="link-block">
<a href="https://arxiv.org/abs/2312.02949" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="ai ai-arxiv"></i>
</span>
<span>arXiv</span>
</a>
</span>
<span class="link-block">
<a href="https://github.com/UX-Decoder/LLaVA-Grounding" target="_blank"
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>
<span class="link-block">
<a href="https://llava-grounding.deepdataspace.com/" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="far fa-images"></i>
</span>
<span>Demo</span>
</a>
</span>
<span class="link-block">
<a href="https://github.com/UX-Decoder/LLaVA-Grounding" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fas fa-database"></i>
</span>
<span>Dataset</span>
</a>
</span>
<!-- <span class="link-block">
<a href="" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fas fa-share-square"></i>
</span>
<span>Model</span>
</a>
</span> -->
<!-- <span class="link-block">
<a href="#"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fab fa-youtube"></i>
</span>
<span>Video</span>
</a>
</span> -->
</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-six-fifths">
<!-- <h4 class="title is-5">Abstract</h2> -->
<div class="content has-text-justified">
<p>
<!-- image -->
<img id="teaser" width="100%" src="images/vis.png">
</p>
</div>
</div>
</div>
</div>
</section>
<section class="section" style="background-color:#efeff081">
<div class="container is-max-desktop" id="gradio">
<gradio-app src="https://llava-grounding.deepdataspace.com/"></gradio-app>
</div>
</section>
<section class="section" style="background-color:#efeff081">
<div class="container is-max-desktop">
<!-- Abstract. -->
<div class="columns is-centered has-text-centered">
<div class="column is-six-fifths">
<h2 class="title is-3">Highlights</h2>
<div class="content has-text-justified">
<p>
LLaVA-Grounding maintains
<ol type="1">
<li><b>New grounded visual chat data</b>. <span style="font-size: 95%;">We introduce a data annotation pipeline to label high-quality Grounded Visual Chat (GVC) data. Leveraging human-labeled object detection data and harnessing the robust matching capability of GPT-4, we have successfully labeled 150K GVC instances using the LLaVA instruction tuning dataset.</span></li>
<li><b>🌋 LLaVA-Grounding Model</b>. <span style="font-size: 95%;">We present an end-to-end model, which connects a Large Multimodal Model (LMM) with a grounding model to facilitate grounded visual chat. Our model supports both object and pixel-level grounding, accommodating various visual prompts such as mark, click, box, and scribble. Our model offers a broader range of input and output prompt types compared to other LMMs.</li>
<li><b>Grounding Bench</b>. <span style="font-size: 95%;">We establish Grounding Bench for evaluating grounded visual chat and propose an auto-evaluation pipeline aided by GPT-4. This benchmark assesses grounded visual chat capabilities and provides performance metrics for other state-of-the-art methods.</li>
<li><b>Performance</b>. <span style="font-size: 95%;">Our empirical study validates the effectiveness of LLaVA-Grounding with the best overall performance on our Grounding Bench and competitive performance on traditional grounding tasks such as RefCOCO and Flickr30K.</li>
</ol>
</p>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<!-- Results. -->
<div class="columns is-centered has-text-centered">
<div class="column is-six-fifths">
<h2 class="title is-3">🌋 LLaVA-Grounging Network Architechture</h2>
</div>
</div>
<!-- </div> -->
<!--/ Results. -->
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<div class="content has-text-justified">
<centering>
<div style="text-align: center;">
<img id="teaser" width="60%" src="images/llavag_arch.png">
</div>
</centering>
LLaVA-Grounding enables grounding and visual prompts with two additional modules.
<p>
<b> Prompt encoder.</b>
<!-- <b></b> -->
<ol>For an input image \(X_{\texttt{v}}\) and a visual prompt \(X_{\texttt{p}}\), we employ the pre-trained Semantic-SAM as the prompt encoder. This encoder extracts visual features based on the input image and visual prompts, denoted as \(Z_{\texttt{p}}=h(X_{\texttt{v}},X_{\texttt{p}})\). To convert these prompt features into language embedding tokens \(H_{\texttt{p}}\) of the same dimensionality as the word embedding space in the language model, we use a simple linear layer with a trainable projection matrix \(W_{\texttt{p}}\):
\begin{equation}
H_{\texttt{p}}=W_{\texttt{p}} \cdot Z_{\texttt{p}}, \text{ where } Z_{\texttt{p}}=h\left(X_{\texttt{v}},X_{\texttt{p}}\right)
\end{equation}</ol>
<b> Grounding model. </b>
<!-- <div style="text-align: center;"> -->
<ol>In addition to the language response \(X_{\texttt{a}}\), our model also produces features \(X_{\texttt{g}}\) for grounding. we employ a pretrained OpenSeeD model as the grounding model to generate bounding boxes \(\mathbf{B}\) and masks \(\mathbf{M}\). This process can be defined as follows:
\begin{equation}
\mathbf{B, M}=s\left(X_{\texttt{v}},W_{\texttt{g}} \cdot X_{\texttt{g}}\right)
\end{equation}</ol>
</div>
</p>
<!-- <div style="text-align: center;">
<h3 class="title is-5"><img id="painting_icon" width="3%" src="https://cdn-icons-png.flaticon.com/512/3515/3515174.png"> Training Data Example</h2>
<img id="teaser" width="70%" src="images/llava-plus-example.png">
</div> -->
</div>
</div>
</div>
</div>
</section>
<section class="section" style="background-color:#efeff081">
<!-- Grounedtext2img. -->
<div class="columns is-centered has-text-centered">
<div class="column is-six-fifths">
<h2 class="title is-3"><img id="painting_icon" width="4%" src="https://cdn-icons-png.flaticon.com/512/1698/1698535.png"> <span style="font-size: 100%;">Comparison with other LMMs:</span> Grounded detailed description </h2>
<div class="slideshow-container">
<div style="text-align:center">
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<!-- <span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span> -->
</div>
<div class="mySlides fade">
<div class="numbertext">1 / 11</div>
<img src="./images/compare1.png" style="width:100%;" >
<div class="text">Example 1: A real-life image.</div>
</div>
<div class="mySlides fade">
<div class="numbertext">2 / 11</div>
<img src="./images/compare2.png" style="width:100%">
<div class="text">Example 2: An open-set concept "dragon".</div>
</div>
<div class="mySlides fade">
<div class="numbertext">3 / 11</div>
<img src="./images/compare3.png" style="width:100%">
<div class="text">Example 3: A real-life image.</div>
</div>
</div>
</div>
<br>
</section>
<script>
let slideIndex = 0;
showSlides();
function showSlides() {
let i;
let slides = document.getElementsByClassName("mySlides");
let dots = document.getElementsByClassName("dot");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
setTimeout(showSlides, 4000); // Change image every 1 seconds
}
</script>
<section class="section" id="BibTeX">
<div class="container is-max-desktop content">
<h2 class="title">BibTeX</h2>
<pre><code>
@misc{zhang2023llavagrounding,
title={LLaVA-Grounding: Grounded Visual Chat with Large Multimodal Models},
author={Hao Zhang and Hongyang Li and Feng Li and Tianhe Ren and Xueyan Zou and Shilong Liu and Shijia Huang and Jianfeng Gao and Lei Zhang and Chunyuan Li and Jianwei Yang},
year={2023},
booktitle={arXiv}
}
</code></pre>
</div>
</section>
<section class="section" id="Acknowledgement">
<div class="container is-max-desktop content">
<h2 class="title">Acknowledgement</h2>
<p>
This website is adapted from <a
href="https://github.com/nerfies/nerfies.github.io">Nerfies</a>, licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative
Commons Attribution-ShareAlike 4.0 International License</a>. We thank the LLaMA team for giving us access to their models, and open-source projects, including Alpaca and Vicuna.
</p>
<p>
<b>Usage and License Notices</b>: The data, code and checkpoint is intended and licensed for research use only. They are also restricted to uses that follow the license agreement of LLaVA, CLIP, LLaMA, Vicuna and GPT-4. The dataset is CC BY NC 4.0 (allowing only non-commercial use) and models trained using the dataset should not be used outside of research purposes.
</p>
<p>
<a href='https://github.com/Computer-Vision-in-the-Wild/'><img id="painting_icon" width="10%" src="https://avatars.githubusercontent.com/u/97258247?s=200&v=4"></a>
Related Links:
<a href='https://react-vl.github.io/'>[REACT]</a>
<a href='https://gligen.github.io/'>[GLIGEN]</a>
<a href='https://github.com/Computer-Vision-in-the-Wild/'>[Computer Vision in the Wild (CVinW)]</a>
<a href='https://instruction-tuning-with-gpt-4.github.io/'>[Insutrction Tuning with GPT-4]</a>
</p>
</div>
</section>
<script>
// Handle message showing
function createChatRow(sender, text, imageSrc) {
var article = document.createElement("article");
article.className = "media"
var figure = document.createElement("figure");
figure.className = "media-left";
var span = document.createElement("span");
span.className = "icon is-large";
var icon = document.createElement("i");
icon.className = "fas fas fa-2x" + (sender === "User" ? " fa-user " : sender === "LLaVA" ? " fa-robot" : "");
var media = document.createElement("div");
media.className = "media-content";
var content = document.createElement("div");
content.className = "content";
var para = document.createElement("p");
// wrap text in pre tag to preserve whitespace and line breaks
var pre_text = document.createElement("pre");
pre_text.style = "background-color: white; font-size: 18px; font-family: Arial; padding: 0; margin: 0; white-space: pre-wrap; word-wrap: break-word;";
var paraText = document.createTextNode(text);
pre_text.appendChild(paraText);
var strong = document.createElement("strong");
strong.innerHTML = sender;
var br = document.createElement("br");
para.appendChild(strong);
para.appendChild(br);
para.appendChild(pre_text);
// Add image if imageSrc is provided
if (imageSrc) {
var img = document.createElement("img");
img.src = imageSrc;
img.style = "max-width: 100%; max-height: 300px;"; // Adjust the style as needed
para.appendChild(img);
}
content.appendChild(para);
media.appendChild(content);
span.appendChild(icon);
figure.appendChild(span);
if (sender !== "Description") {
article.appendChild(figure);
};
article.appendChild(media);
return article;
}
function addMessageToChatHistory(sender, message, imageSrc) {
const chatHistory = document.querySelector('.chat-history');
const chatRow = createChatRow(sender, message, imageSrc);
chatHistory.appendChild(chatRow);
chatHistory.scrollTop = chatHistory.scrollHeight;
}
function clearChatHistory() {
const chatHistory = document.querySelector('.chat-history');
chatHistory.innerHTML = "";
}
//
const conversations = [
{
"description": "monalisa",
"turns": [
// ["Description", "Please read the description and answer the question."],
["User", "", "/static/images/monalisa.jpg"],
["User", "Do you know who drew this painting?"],
["LLaVA",
"The painting depicts a woman, commonly believed to be Mona Lisa, the famous artwork by Leonardo da Vinci. " +
"It is a portrait painting that showcases the woman's enigmatic smile and has become one of the most famous and iconic art pieces in the world. " +
"The original work is displayed in the Louvre Museum in Paris, and it is known for its intricate details, use of oil paint, and the artist's innovative techniques that contributed to its enduring appeal and mystery."
]
]
},
{
"description": "monalisa with dog head",
"turns": [
["User", "", "/static/images/monalisa-fun.jpg"],
["User", "Do you know who drew this painting?"],
["LLaVA", "The painting depicts a dog in a humorous situation, where it appears to be wearing a woman's dress and standing in front of a landscape. Although the artist of the painting is not explicitly identified, it could be a reference to the famous artist Da Vinci, known for his artistic works, including the Mona Lisa. The painting is likely a creative and comical take on the traditional portrait style, replacing a human figure with a dog dressed in a woman's clothing, making it an interesting and amusing visual piece."]
]
},
{
"description": "Titanic Rose and Jack",
"turns": [
["User", "", "/static/images/titanic.jpg"],
["User", "What's the ending of this movie?"],
["LLaVA", "In the image, a young woman is leaning on a man in front of a beautiful sunset, with both of them standing on a boat. They appear to be enjoying a romantic moment together. The scene suggests that they could be depicted as the characters Jack and Rose from the popular movie Titanic. In the movie, their romance blossoms aboard the fictional ocean liner Titanic, with the pair ultimately sharing a passionate kiss as the ship sinks into the ocean. The ending of the movie is known for its emotional and heartfelt scenes, where the characters are forced to say goodbye to each other as they are separated by the sinking ship. The image evokes a sense of romance and nostalgia, paying tribute to the iconic love story portrayed in the movie Titanic."]
]
},
{
"description": "Fridge",
"turns": [
["User", "", "/static/images/fridge.jpg"],
["User", "What are the meals that I can cook with these?"],
["LLaVA", "With the variety of food items stored in the refrigerator, you can prepare several meals. For example, you can create a fruit salad using the strawberries, blueberries, and carrots. Additionally, you can make a delicious smoothie using the fruits and vegetables, which would be a healthy and nutritious snack or breakfast option. The milk and eggs can be used to create various dishes, such as a milk-based smoothie, a baked casserole, or scrambled eggs. The juice can also be used to make a fresh fruit and juice mix or as a refreshing homemade popsicle. The possibilities are vast, and the meals you can create will depend on your preferences and dietary needs."],
["User", "I would like to do the fruit salad. Show me the recipe."],
["LLaVA",
`Certainly! Here's a simple fruit salad recipe using the items in your refrigerator:
Ingredients:
- 2 cups fresh strawberries, sliced
- 1 cup fresh blueberries
- 1 large carrot, grated
- Juice of half a lemon
- A handful of chopped fresh parsley or mint
- A few ice cubes
- Optional: honey or maple syrup (adjust to taste)
Instructions:
1. In a large bowl, combine the sliced strawberries, blueberries, and carrot. Gently toss them together to mix.
2. Drizzle the juice of half a lemon over the fruit and vegetables to prevent them from oxidizing and add a refreshing citrus flavor.
3. Sprinkle the chopped fresh parsley or mint over the fruit and gently toss once more.
4. If desired, add a drizzle of honey or maple syrup for a touch of sweetness. Adjust the amount according to your taste preferences.
5. Cover the bowl and refrigerate the fruit salad for at least 30 minutes or up to a few hours. This allows the flavors to meld and creates a more refreshing salad.
6. Serve the fruit salad in cups or bowls, garnished with a sprinkle of fresh parsley or mint, if desired.
This fruit salad recipe is perfect for a healthy snack or side dish, and with the variety of ingredients available in your refrigerator, it should be easy to put together quickly.`]]
},
{
"description": "Beautiful View",
"turns": [
["User", "", "/static/images/view.jpg"],
["User", "What are the things I should be cautious about when I visit here?"],
["LLaVA", "When visiting this peaceful location with a pier extending over a serene lake, surrounded by mountains, there are several things to be cautious about. First, pay attention to the weather conditions, as sudden changes in weather, especially strong winds or storms, can cause the water to become rough and pose risks to the stability of the pier. Second, be mindful of the structural integrity of the pier; avoid overloading it with too many people or excessive weight, as this could potentially damage the pier or cause it to collapse. Additionally, be aware of the surrounding wildlife and respect their space; do not harm or disturb them in any way. Finally, if you decide to go fishing, ensure that you adhere to any local fishing regulations and use appropriate fishing techniques to keep the lake ecosystem healthy and maintain the balance of the food chain."],
["User", "Compose an engaging travel blog post about my trip to this place, highlighting the beautiful sceneries, joyful experiences, and include possible anecdotes."],
["LLaVA",
`Traveling to this picturesque location with a serene lake and mountains in the background was a refreshing and rejuvenating experience. The pier extending over the calm water provided an excellent vantage point from which to appreciate the breathtaking scenery. As I stood on the pier, I couldn't help but feel a deep connection with nature, taking a moment to soak in the peaceful atmosphere.
One of the highlights of my trip was undoubtedly the fishing experience. The area is teeming with life, and I was thrilled to land a sizeable catch, despite the modest size of the lake. The joy of fishing in such a beautiful setting was truly rewarding, and it allowed me to take a break from my busy life and truly immerse myself in the tranquility of nature.
While exploring the surrounding area, I came across a family of birds that had built a nest close to the pier, adding to the charm of the location. Interacting with the wildlife and observing their behavior was an enriching experience that I'll cherish for years to come.
In conclusion, this idyllic destination provided me with an opportunity to unwind and recharge, surrounded by mesmerizing natural beauty and the gentle sounds of water and wildlife. If you're looking for a serene escape from the hustle and bustle of everyday life, this pier overlooking the lake is the perfect place to find solace and reconnect with nature.`
]
]
},
];
// The current image index
let currentIndex = 0;
// The function to update the displayed chat history
function update_dialog_demo() {
// Clear the chat history
clearChatHistory();
for (let i = 0; i < conversations[currentIndex].turns.length; i++) {
if (conversations[currentIndex].turns[i].length == 2) {
addMessageToChatHistory(conversations[currentIndex].turns[i][0], conversations[currentIndex].turns[i][1]);
}
else {
addMessageToChatHistory(conversations[currentIndex].turns[i][0], conversations[currentIndex].turns[i][1], conversations[currentIndex].turns[i][2]);
}
}
// scroll to the top of the chat history
document.querySelector('.chat-history').scrollTop = 0;
}
// Initialize the displayed image
update_dialog_demo();
// Event listeners for the buttons
document.getElementById('prev-question').addEventListener('click', () => {
currentIndex = (currentIndex - 1 + conversations.length) % conversations.length;
update_dialog_demo();
});
document.getElementById('next-question').addEventListener('click', () => {
currentIndex = (currentIndex + 1) % conversations.length;
update_dialog_demo();
});
</script>
</body>
</html>