-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.html
1126 lines (1045 loc) · 45 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
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html><head><!--
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-116935204-3"></script>
<meta charset="utf-8">
<title>Localized Narratives</title>
<meta content="Localized Narratives" name="description">
<meta content="Jordi Pont-Tuset" name="author">
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Courier+Prime" rel="stylesheet">
</head>
<body><div hidden="" by-vulcanize=""><dom-module id="loco-image" assetpath="/loco-image/">
<template>
<style>
/* This is needed to make sure the polymer component has an
offsetWidth. */
:host {
display: block;
}
#main, #canvasContainer {
width: 100%;
}
svg {
border-style: solid;
}
.flexcol {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.flexrow {
display: flex;
flex-direction: row;
justify-content: center;
}
</style>
<div id="main">
<template is="dom-if" if="[[title]]">
<div>[[title]]</div>
</template>
<div id="canvasContainer" hidden$="[[!imageLoaded_]]">
<svg id="canvas" on-tap="handleTap_" height$="[[canvasHeight]]" width$="[[canvasWidth]]" style="[[getCanvasStyle_(effectiveFontSize_, borderWidth)]]">
<g id="image" transform$="[[imageZoomTransform_]]">
<image href$="[[effectiveImageUrl_]]" height$="[[imageHeight]]" width$="[[imageWidth]]">
<slot id="content"></slot>
</image>
</g>
</svg>
</div>
<div hidden$="[[imageLoaded_]]" id="loader" style="[[getLoaderStyle_(borderWidth, canvasHeight, canvasWidth)]]">
<div class="flexcol">
<div class="flexrow">
<paper-spinner-lite active="[[!imageLoadingHasError_]]">
</paper-spinner-lite>
<span hidden$="[[!imageLoadingHasError_]]">
Failed to load image from [[imageUrl]].
</span>
</div>
</div>
</div>
<div hidden="">
<span>Client Coordinates: ([[clientPoint_.x]], [[clientPoint_.y]])</span><br>
<span>Canvas Coordinates: ([[canvasPoint_.x]], [[canvasPoint_.y]])</span><br>
<span>Image Coordinates: ([[imagePoint.x]], [[imagePoint.y]])</span><br>
<span>ViewBox Coordinates: ([[viewBoxPoint_.x]], [[viewBoxPoint_.y]])</span><br>
<span>imageTransform translation: ([[imageTransform_.x]],[[imageTransform_.y]])></span><br>
<span>imageTransform scale: [[imageTransform_.scale]]</span><br>
<span>ScaleRatio_: [[scaleRatio]]</span>
</div>
</div>
</template>
</dom-module>
<dom-module id="loco-bounding-box" assetpath="/loco-bounding-box/">
<template>
<svg>
<g id="box">
<rect x$="[[xmin]]" y$="[[ymin]]" height$="[[height]]" width$="[[width]]" stroke$="[[borderColorRgba]]" stroke-width$="[[effectiveBorderWidth_]]" stroke-dasharray$="[[borderDashArray]]" fill="none"></rect>
<foreignObject x$="[[xmin]]" y$="[[ymin]]" height$="[[height]]" width$="[[width]]">
<div>
<input id="inputText" type="text" value$="[[text]]" hidden$="[[!effectiveShowInputField_]]" style="[[getInputTextStyle_(effectiveFontSize_)]]">
<span id="text" hidden$="[[!effectiveShowText_]]" style="[[getTextStyle_(textBackgroundColorRgba)]]">
[[text]]
</span>
</div>
</foreignObject>
</g>
</svg>
</template>
</dom-module>
<dom-module id="loco-point" assetpath="/loco-point/">
<template>
<svg>
<g id="point">
<circle cx$="[[data.x]]" cy$="[[data.y]]" r$="[[radius_(data,scaleRatio)]]" fill$="[[color_(data)]]">
</circle>
</g>
</svg>
</template>
</dom-module>
<dom-module id="loco-curve" assetpath="/loco-curve/">
<template>
<svg>
<g id="curve">
<path d$="[[curveString_]]" fill="none" stroke$="[[lineColor]]" stroke-width$="[[effectiveStrokeWidth_]]">
</path>
</g>
</svg>
</template>
</dom-module><dom-module id="loco-segmentation-mask" assetpath="/loco-segmentation-mask/">
<template>
<svg>
<g id="mask">
<path d$="[[pathString_]]" fill$="[[fillColor]]" fill-rule="evenodd" fill-opacity$="[[fillOpacity]]">
</path></g>
</svg>
</template>
</dom-module>
<dom-module id="loco-label" assetpath="/loco-label/">
<template>
<svg>
<g id="label">
<foreignObject x$="[[data.x]]" y$="[[data.y]]" height="1px" width="1px" style="overflow: visible">
<div>
<input id="inputText" type="text" value$="[[data.text]]" style="[[getInputTextStyle_(editingText, scaleRatio)]]">
<span id="text" style="[[getTextStyle_(data.*, editingText, scaleRatio)]]">
[[data.text]]
</span>
</div>
</foreignObject>
</g>
</svg>
</template>
</dom-module>
<dom-module id="loco-labeled-point" assetpath="/loco-labeled-point/">
<template>
<template is="dom-if" if="[[data.point]]">
<loco-point data="{{data.point}}"></loco-point>
<template is="dom-if" if="[[data.label]]">
<loco-label editing-text="{{editingText}}" data="{{data.label}}">
</loco-label>
</template>
</template>
</template>
</dom-module>
<dom-module id="loco-binary-mask" assetpath="/loco-binary-mask/">
<template>
<div hidden="">
<canvas id="maskCanvas">
</canvas>
</div>
<svg>
<g id="binaryMask">
<image id="rasterImage">
</image></g>
</svg>
</template>
</dom-module>
<dom-module id="loco-annotated-image" assetpath="/loco-annotated-image/">
<template>
<style>
#image {
text-align: var(--loco-annotated-image-text-align);
}
</style>
<loco-image id="image" title="[[title]]" image-url="[[imageUrl]]" border-width="[[borderWidth]]" canvas-height="[[canvasHeight]]" canvas-width="[[canvasWidth]]" canvas-margin="[[canvasMargin]]" image-height="{{imageHeight}}" image-width="{{imageWidth}}" font-size="[[fontSize]]" image-data="{{imageData}}" expose-image-data="[[exposeImageData]]" image-point="{{imagePoint}}">
<template is="dom-repeat" items="[[objects]]" filter="hasBoundingBox_" observe="bounding_box">
<loco-bounding-box color="[[colorOrDefault_(item)]]" xmin="[[item.bounding_box.xmin]]" xmax="[[item.bounding_box.xmax]]" ymin="[[item.bounding_box.ymin]]" ymax="[[item.bounding_box.ymax]]" border-dash-array="[[item.bounding_box.dash_array]]" text="[[item.text]]">
</loco-bounding-box>
</template>
<template is="dom-repeat" items="[[boundingBoxes]]">
<loco-bounding-box color="[[colorOrDefault_(item)]]" border-dash-array="[[dashArrayOrDefault_(item)]]" xmin="[[item.xmin]]" xmax="[[item.xmax]]" ymin="[[item.ymin]]" ymax="[[item.ymax]]" text="[[item.text]]">
</loco-bounding-box>
</template>
<template is="dom-repeat" items="[[clicksToPoints_(clicks)]]">
<loco-point data="[[item]]">
</loco-point>
</template>
<template is="dom-repeat" items="{{points}}">
<template is="dom-if" if="[[item.x]]">
<loco-point data="[[item]]">
</loco-point>
</template>
<template is="dom-if" if="[[isLabeledPoint_(item)]]">
<loco-labeled-point data="[[item]]">
</loco-labeled-point>
</template>
</template>
<template is="dom-repeat" items="{{labels}}">
<loco-label data="{{item}}">
</loco-label>
</template>
<template is="dom-repeat" items="[[regions]]">
<loco-segmentation-mask polygons="{{item}}" fill-color="[[getSegmentationColor_(index)]]">
</loco-segmentation-mask>
</template>
<template is="dom-repeat" items="[[curves]]">
<loco-curve line-color="rgb(0,200,0)" line-width="1" points="{{item}}">
</loco-curve>
</template>
<template is="dom-repeat" items="[[masks]]">
<loco-binary-mask class="binaryMasks" mask="{{item}}">
</loco-binary-mask>
</template>
</loco-image>
<div hidden="">
<template is="dom-if" if="[[points.length]]">
<b>Labeled points ([[points.length]]):</b><br>
</template>
<template is="dom-repeat" items="[[points]]">
<template is="dom-if" if="[[!item.point]]">
([[item.x]], [[item.y]])<br>
</template>
<template is="dom-if" if="[[item.point]]">
<i>Label:</i> [[item.label.text]]. <i>Position:</i> ([[item.point.x]], [[item.point.y]]).
<template is="dom-if" if="[[item.time_interval]]">
<i>Times:</i> ([[item.time_interval.start]], [[item.time_interval.end]])
</template>
<br>
</template>
</template>
</div>
</template>
</dom-module>
<style>
body {
font-family: 'Open Sans', sans-serif;
line-height: 1.6;
}
table {
width: 100%;
}
table,
tr,
td {
border: none;
border-collapse: collapse;
}
td {
padding: 10px;
}
#audio {
display: block;
outline: none;
width: 100%;
}
.card-actions {
color: white;
background-color: #126a73;
border: 0;
display: flex;
}
#visualizer {
visibility: hidden;
opacity: 0;
transition: all 0.3s;
-webkit-transition: all 0.3s;
position: fixed;
z-index: 1001;
margin: 0;
max-width: 1200px;
width: 90%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-shadow: var(--shadow-elevation-16dp_-_box-shadow);
font-family: 'Open Sans', sans-serif;
}
#mask {
visibility: hidden;
opacity: 0;
transition: all 0.3s;
-webkit-transition: all 0.3s;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1000;
background-color: rgb(0, 0, 0);
}
#start-mask {
opacity: 100%;
transition: all 0.3s;
-webkit-transition: all 0.3s;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1000;
background-color: white;
}
.center {
text-align: center;
}
h1,
h2 {
text-align: center;
}
h1 {
font-size: 45px;
margin-bottom: 50px;
margin-top: 50px;
}
h2 {
font-size: 22px;
}
hr.separator {
background: #000;
max-width: 70px;
height: 9px;
border: none;
}
.block {
margin-bottom: 75px;
}
.wrap {
max-width: 900px;
margin: auto;
}
.paper-col {
width: 7.14%;
float: left;
}
.paper-col-im {
width: 98%;
border: 1px solid black;
margin: 2px;
}
#mask paper-spinner{
width: 100px;
height: 100px;
top: 50%;
left: 50%;
transform: translate(-50% -50%);
--paper-spinner-layer-1-color: white;
--paper-spinner-layer-2-color: white;
--paper-spinner-layer-3-color: white;
--paper-spinner-layer-4-color: white;
--paper-spinner-stroke-width: 10px;
}
#start-mask paper-spinner {
width: 100px;
height: 100px;
top: 50%;
left: 50%;
transform: translate(-50% -50%);
--paper-spinner-stroke-width: 10px;
}
#open-visualizer {
margin-left: 0;
margin-right: 0;
}
.page-button {
font-family: 'Open Sans', sans-serif;
width: 100%;
background-color: #126a73;
color: white;
margin-left: 0;
margin-right: 0;
}
paper-button:hover {
background-color: #13a3ac;
}
paper-button {
text-transform: none;
transition: background-color 0.3s;
}
.col-download-text {
margin-top: 10px;
width: 15%;
float: left;
}
.col-download-buttons {
width: 85%;
float: left;
display: flex;
}
.col-button {
margin: 0;
padding-left: 5px;
padding-right: 5px;
float: left;
}
.row::after {
content: "";
clear: both;
display: table;
margin-bottom: 8px;
}
#subfiles-oid-train,
#subfiles-coco-train {
margin: 0;
display: flex;
padding: 10px;
}
.caption-card {
font-family: 'Open Sans', sans-serif;
border: 2px solid #f1f3f4;
padding: 0;
width: 100%;
border-radius: 9px;
display: flex;
box-shadow: none;
overflow: hidden;
}
.caption-title {
width: 20%;
max-width: 100px;
float: left;
background-color: #f1f3f4;
padding: 3px 10px;
}
.caption-content {
float: left;
padding: 3px 10px;
}
.icon {
width: 26px;
height: 26px;
}
.close-button {
padding: 5px;
position: absolute;
right: -16px;
top: -16px;
background-color: #126a73;
border-radius: 25px;
color: white;
box-shadow: var(--shadow-elevation-16dp_-_box-shadow);
z-index: 1002;
}
.field{
background-color: #eee;
border-radius: 4px;
padding: 3px;
border-left: 3px solid #126a73;
}
.code{
background-color: #eee;
border-radius: 4px;
padding: 15px;
border-left: 3px solid #126a73;
}
#close-formats-button {
background-color: white;
color: darkgray;
top: -42px;
}
#formats li{
margin-bottom: 10px;
}
#open-visualizer-image {
width: 70%;
margin-left: auto;
margin-right: auto;
margin-bottom: 20px;
display: flex;
overflow: hidden;
box-shadow: none;
border-radius: 5px;
}
#explore-overlay {
width: 100%;
height: 100%;
position: absolute;
background: #126a73;
opacity: 0;
transition-duration: 0.3s;
cursor: pointer;
display: flex;
}
#explore-overlay:hover {
opacity: 50%;
}
#explore-overlay-text {
color: white;
margin: auto;
font-size: 200%;
}
</style></div>
<div class="wrap">
<h2 style="margin-bottom: 0; margin-top: 100px;">Connecting Vision and Language with</h2>
<h1 style="margin-bottom: 80px; margin-top: 0">Localized Narratives</h1>
<hr class="separator">
<h2>Publication</h2>
<a href="https://arxiv.org/pdf/1912.03098.pdf" target="_blank">
<div class="row">
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_1.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_2.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_3.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_4.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_5.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_6.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_7.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_8.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_9.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_10.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_11.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_12.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_13.jpeg"></div>
<div class="paper-col"><img class="paper-col-im" src="images/paper_thumb_14.jpeg"></div>
</div>
</a>
<div class="center block" style="margin-top: 10px;"><b>Connecting Vision and Language with
Localized Narratives</b><br>
Jordi Pont-Tuset, Jasper Uijlings, Soravit Changpinyo, Radu Soricut, and Vittorio Ferrari<br>
ECCV (Spotlight), 2020<br>
[<a href="https://arxiv.org/pdf/1912.03098.pdf" target="_blank">PDF</a>] [<a href="javascript:document.getElementById('bibtex').open();">BibTeX</a>] [<a href="https://youtu.be/_MDFe-o8qyA" target="_blank">1'30'' video</a>] [<a href="https://youtu.be/AjuL3ljkt3Y" target="_blank">10' video</a>]
</div>
<paper-dialog entry-animation="fade-in-animation" exit-animation="fade-out-animation" id="bibtex" with-backdrop=""><pre>@inproceedings{PontTuset_eccv2020,
author = {Jordi Pont-Tuset and Jasper Uijlings and Soravit Changpinyo and Radu Soricut and Vittorio Ferrari},
title = {Connecting Vision and Language with Localized Narratives},
booktitle = {ECCV},
year = {2020}
}</pre>
</paper-dialog>
<hr class="separator">
<h2>Abstract</h2>
<div class="center block">
We propose Localized Narratives, a new form of multimodal image annotations connecting vision and
language. We ask annotators to describe an image with their voice while simultaneously hovering
their mouse over the region they are describing. Since the voice and the mouse pointer are
synchronized, we can localize every single word in the description. This dense visual grounding
takes the form of a mouse trace segment per word and is unique to our data. We annotated 849k
images with Localized Narratives: the whole COCO, Flickr30k, and ADE20K datasets, and 671k
images of Open Images, all of which we make publicly available. We provide an extensive
analysis of these annotations showing they are diverse, accurate, and efficient to produce.
We also demonstrate their utility on the application of controlled image captioning.
</div>
<hr class="separator">
<h2>Explore Localized Narratives</h2>
<div class="center" style="margin-bottom: 20px; max-width: 600px; margin-left: auto; margin-right: auto;">
Explore some images and play the Localized Narrative annotation: synchronized voice, caption,
and mouse trace. Don't forget to turn the sound on!
</div>
<paper-card id="open-visualizer-image">
<img src="images/loc-narr.gif">
<div id="explore-overlay">
<div id="explore-overlay-text">Explore <iron-icon icon="exit-to-app" style="--iron-icon-height: 30px;--iron-icon-width: 30px;"></iron-icon>
</div>
</div>
</paper-card>
<paper-button class="page-button block" id="open-visualizer">Explore</paper-button>
<hr class="separator">
<h2>License</h2>
<div class="center block">
All the annotations available through this website are released under a <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">CC BY 4.0</a> license.
You are free to redistribute and modify the annotations, but we ask you to please keep the original attribution to our paper.
</div>
<hr class="separator">
<h2>Code</h2>
<div class="block">
<div class="center">
<div style="margin-bottom: 10px; margin-top:30px;"><b>Python Data Loader and Helpers</b></div>
<div style="max-width: 680px; margin-left: auto; margin-right: auto;">
Visit the <a href="https://github.com/google/localized-narratives" target="_blank">GitHub repository</a>
to view the code to download and work with Localized
Narratives.<br>Here is the <span id="open-formats-link-1" style="text-decoration: underline;cursor: pointer;">documentation</span>
about the file formats used.<br>
Alternatively, you can manually download the data below.
</div>
<div style="margin-bottom: 10px; margin-top:30px;"><b>From Traces to Boxes</b></div>
<div style="max-width: 680px; margin-left: auto; margin-right: auto;">
This <a href="https://colab.research.google.com/drive/1WmOrRsWul4AAwUQbfGswmRqELP8OJiBf" target="_blank">colab</a>
demonstrates how we get from a trace segment to a bounding box.
</div>
</div>
</div>
<hr class="separator">
<h2>Downloads</h2>
<div class="block">
<div class="center">
<div style="margin-bottom: 10px; margin-top: 45px;"><b>Full Localized Narratives</b></div>
<div style="max-width: 730px; margin-left: auto; margin-right: auto;">
Here you can download the full set of Localized Narratives (<span id="open-formats-link-2" style="text-decoration: underline;cursor: pointer;">format description</span>).
<br>Large files are split in shards (a list of them will appear when you click
below).
<br>In parantheses, the number of Localized Narratives in each split. Please note that some images have more than one Localized Narrative annotation, e.g. 5k images in COCO are annotated 5 times.
</div>
<paper-dialog entry-animation="fade-in-animation" exit-animation="fade-out-animation" id="formats" with-backdrop="">
<paper-icon-button class="close-button" icon="clear" id="close-formats-button"></paper-icon-button>
<div style="max-width: 750px; text-align: left;">
<h2>File formats</h2>
<p> The annotations are in <a href="http://jsonlines.org/" target="_blank">JSON Lines</a> format,
that is, each line of the file is an independent valid JSON-encoded object. The largest
files are split into smaller sub-files (shards) for ease of download. Since each
line of the file is independent, the whole file can be reconstructed by simply
concatenating the contents of the shards.</p>
<p>Each line represents one Localized Narrative annotation on one image by one annotator
and has the following fields:</p>
<ul>
<li><tt class="field">dataset_id</tt> String identifying the dataset and split where
the image belongs, e.g. <tt>mscoco_val2017</tt>.</li>
<li><tt class="field">image_id</tt> String identifier of the image, as specified on
each dataset.</li>
<li><tt class="field">annotator_id</tt> Integer number uniquely identifying each annotator.</li>
<li><tt class="field">caption</tt> Image caption as a string of characters.</li>
<li><tt class="field">timed_caption</tt> List of timed utterances, i.e. <tt>{utterance, start_time, end_time}</tt>
where <tt>utterance</tt> is a word (or group of words) and <tt>(start_time, end_time)</tt> is
the time during which it was spoken, with respect to the start of the recording.</li>
<li><tt class="field">traces</tt> List of trace segments, one between each time the mouse
pointer enters the image and goes away from it. Each trace segment is represented as a list
of timed points, i.e. <tt>{x, y, t}</tt>, where <tt>x</tt> and <tt>y</tt> are the normalized
image coordinates (with origin at the top-left corner of the image) and <tt>t</tt> is
the time in seconds since the start of the recording.
Please note that the coordinates can go a bit beyond the image, i.e. <tt><0</tt>
or <tt>>1</tt>, as we recorded the mouse traces including a small band around the image.</li>
<li><tt class="field">voice_recording</tt> Relative URL path with respect to
<tt>https://storage.googleapis.com/localized-narratives/voice-recordings</tt>
where to find the voice recording (in
<a href="https://en.wikipedia.org/wiki/Ogg" target="_blank">OGG</a> format) for that particular image. </li>
</ul>
<p>Below a sample of one Localized Narrative in this format:</p>
<pre class="code">{
dataset_id: 'mscoco_val2017',
image_id: '137576',
annotator_id: 93,
caption: 'In this image there are group of cows standing and eating th...',
timed_caption: [{'utterance': 'In this', 'start_time': 0.0, 'end_time': 0.4}, ...],
traces: [[{'x': 0.2086, 'y': -0.0533, 't': 0.022}, ...], ...],
voice_recording: 'coco_val/coco_val_137576_93.ogg'
}</pre>
</div>
</paper-dialog>
</div>
<div class="row" style="margin-top: 15px;">
<div class="col-download-text">
Open Images
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<paper-button class="page-button" onclick="document.getElementById('subfiles-oid-train').positionTarget = this;document.getElementById('subfiles-oid-train').open();">
Train (507,444)
</paper-button>
<paper-dialog entry-animation="fade-in-animation" exit-animation="fade-out-animation" horizontal-align="left" id="subfiles-oid-train" no-overlap="" vertical-align="top">
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00000-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">1</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00001-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">2</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00002-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">3</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00003-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">4</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00004-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">5</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00005-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">6</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00006-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">7</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00007-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">8</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00008-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">9</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_localized_narratives-00009-of-00010.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">10</paper-button>
</a>
</div>
</paper-dialog>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_validation_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (41,691)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_test_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Test (126,020)</paper-button>
</a>
</div>
</div>
</div>
<div class="row">
<div class="col-download-text">
COCO
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<paper-button class="page-button" onclick="document.getElementById('subfiles-coco-train').positionTarget = this;document.getElementById('subfiles-coco-train').open();">
Train (134,272)
</paper-button>
<paper-dialog entry-animation="fade-in-animation" exit-animation="fade-out-animation" horizontal-align="left" id="subfiles-coco-train" no-overlap="" vertical-align="top">
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/coco_train_localized_narratives-00000-of-00004.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">1</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/coco_train_localized_narratives-00001-of-00004.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">2</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/coco_train_localized_narratives-00002-of-00004.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">3</paper-button>
</a>
</div>
<div class="col-button">
<a href="https://storage.googleapis.com/localized-narratives/annotations/coco_train_localized_narratives-00003-of-00004.jsonl
" style="text-decoration: none;">
<paper-button class="page-button" style="min-width: 45px;">4</paper-button>
</a>
</div>
</paper-dialog>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/coco_val_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (8,573)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
</div>
</div>
</div>
<div class="row">
<div class="col-download-text">
Flickr30k
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/flickr30k_train_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Train (30,546)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/flickr30k_val_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (1,009)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/flickr30k_test_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Test (1,023)</paper-button>
</a>
</div>
</div>
</div>
<div class="row">
<div class="col-download-text">
ADE20k
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/ade20k_train_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Train (20,476)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/ade20k_validation_localized_narratives.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (2,053)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
</div>
</div>
</div>
<div class="center">
<div style="margin-bottom: 10px; margin-top: 45px;"><b>Textual captions only</b></div>
<div style="max-width: 680px; margin-left: auto; margin-right: auto;">
To facilitate download, below are the annotations on the same images as above but containing
only the textual caption, in case you are only interested in this part of Localized
Narratives.
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="col-download-text">
Open Images
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Train (507,444)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_validation_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (41,691)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_test_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Test (126,020)</paper-button>
</a>
</div>
</div>
</div>
<div class="row">
<div class="col-download-text">
COCO
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/coco_train_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Train (134,272)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/coco_val_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (8,573)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
</div>
</div>
</div>
<div class="row">
<div class="col-download-text">
Flickr30k
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/flickr30k_train_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Train (30,546)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/flickr30k_val_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (1,009)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/flickr30k_test_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Test (1,023)</paper-button>
</a>
</div>
</div>
</div>
<div class="row">
<div class="col-download-text">
ADE20k
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/ade20k_train_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Train (20,476)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/ade20k_validation_captions.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Validation (2,053)</paper-button>
</a>
</div>
<div class="col-button" style="width: 33%;">
</div>
</div>
</div>
<div class="center">
<div style="margin-bottom: 10px; margin-top: 45px;"><b>Automatic speech-to-text transcriptions</b></div>
<div style="max-width: 680px; margin-left: auto; margin-right: auto;">
<p>Below you can download the <a href="https://cloud.google.com/speech-to-text" target="_blank">automatic speech-to-text</a>
transcriptions from the voice recordings.
The format is a list of text chunks, each of which is a list of ten alternatives along with its confidence.</p>
<p></p><b>Please note</b>: the final caption text of Localized Narratives is given manually by the annotators.
The automatic transcriptions below are only used to temporally align the manual transcription to the mouse traces.
The timestamps used for this, though, were not stored, so the alignment process cannot be reproduced.
To have some timestamps, you'd need to re-run Google's speech-to-text transcription
(<a target="_blank" href="https://github.com/google/localized-narratives/blob/master/transcription_example.py">here</a> the code we used).
Given that the API is constantly evolving, though, the transcription will likely not match the one stored below.<p></p>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="col-download-text">
Open Images
</div>
<div class="col-download-buttons">
<div class="col-button" style="width: 33%;">
<a href="https://storage.googleapis.com/localized-narratives/annotations/open_images_train_v6_asr.jsonl" style="text-decoration: none;">
<paper-button class="page-button">Train (507,444)</paper-button>