-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvia.html
10376 lines (9162 loc) · 383 KB
/
via.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 lang="en">
<head>
<meta charset="UTF-8">
<!--
VGG Image Annotator (via)
www.robots.ox.ac.uk/~vgg/software/via/
Copyright (c) 2016-2018, Abhishek Dutta, Visual Geometry Group, Oxford University.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-->
<title>VGG Image Annotator</title>
<meta name="author" content="Abhishek Dutta">
<meta name="description" content="VIA is a standalone image annotator application packaged as a single HTML file (< 400 KB) that runs on most modern web browsers.">
<!--
Development of VIA is supported by the EPSRC programme grant
Seebibyte: Visual Search for the Era of Big Data (EP/M013774/1).
Using Google Analytics, we record the usage of this application.
This data is used in reporting of this programme grant.
If you do not wish to share this data, you can safely remove the
javascript code below.
-->
<script type="text/javascript">
//<!--AUTO_INSERT_GOOGLE_ANALYTICS_JS_HERE-->
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-20555581-2', 'auto');
ga('set', 'page', '/via-2.0.0.html');
ga('send', 'pageview');
</script>
<!-- CSS style definition -->
<style type="text/css">
body { min-width:200px; padding:0; margin:0; font-family:sans-serif; }
* { box-sizing: border-box; }
input[type=text] { border:1px solid #cccccc; margin:0.6rem 0; padding:0.2rem 0.4rem; }
a { text-decoration:none; }
textarea { border:1px solid #cccccc; margin:0.6rem 0; padding:0.2rem 0.4rem; }
/* Top panel : #navbar, #toolbar */
.top_panel { font-size:0.9rem; display:block; background-color:#212121; color:#ffffff; z-index:1001; margin-bottom:1rem;}
/* Navigation menu bar that appear at the top */
.menubar { display:inline-block; height:1.8rem; } /* height needed to avoid extra bottom border */
.menubar a:link { color:#eeeeee; text-decoration:none; }
.menubar a:visited { color:#eeeeee; text-decoration:none; }
.menubar ul { display:block; padding:0; margin:0; }
.menubar li { display:inline; float:left; padding:0.45rem 1rem; }
.menubar li:hover { background-color:#616161; cursor:default; }
.menubar li ul { display:none; background-color:#212121; border:1px solid #616161; min-width:10rem; position:absolute; z-index:100; margin:0.4rem -1rem;}
.menubar li ul li { display:block; float:none; color:#eeeeee; margin:0; padding:0.6rem 1rem; }
.menubar li ul li:hover { cursor:pointer; }
.menubar li ul li.submenu_divider { margin:0 0.4rem; padding:0; height:1px; border-bottom:1px solid #424242; }
.menubar li:hover ul { display:block; }
/* toolbar containing small icons for tools */
.toolbar { display:inline-block; margin-left:1rem; }
.toolbar svg { fill:white; margin: 0.2rem 0.1rem; height:1.2rem; -moz-user-select:none; -webkit-user-select:none; -ms-user-select:none;}
.toolbar svg:hover { fill:yellow; cursor:pointer; }
.toolbar svg:active { fill:white; }
.toolbar ul { display:inline-block; padding:0.2rem; margin:0; }
.toolbar li { display:inline; float:left; padding:0rem 0.3rem; border:1px solid white;} /* main menu items */
.toolbar li:hover { color:red; cursor:pointer; }
/* Middle panel: containing #image_panel, #leftsidebar */
.middle_panel { display:table; table-layout:fixed; width:100%; z-index:1; padding:0;}
#leftsidebar { display:none; z-index:10; vertical-align:top;}
#display_area { display:table-cell; width:100%; z-index:1; margin:0; padding-left:1em; vertical-align:top; }
/* layers of canvas */
#image_panel { position:relative; outline:none; }
#image_panel img { visibility:hidden; opacity:0; position:absolute; top:0px; left:0px; width:100%; height:100%; outline:none; }
#image_panel canvas { position:absolute; top:0px; left:0px; outline:none;}
#image_panel .visible { visibility:visible !important; opacity:1 !important; }
#image_panel label>img { visibility:visible; opacity:1; position:relative; width:auto; height:4em; outline:none; }
/* image buffer
#image_panel .fadein { visibility:visible; opacity:1; transition: visibility 0s linear 0s, opacity 300ms; }
#image_panel .fadeout { visibility:hidden; opacity:0; transition: visibility 0s linear 300ms, opacity 300ms; }
*/
/* image grid view */
#image_grid_panel { position:relative; margin:0; padding:0; width:100%; }
#image_grid_panel #image_grid_toolbar { display:block; font-size:small; padding:0.5rem 0;}
#image_grid_panel #image_grid_toolbar select { font-size:small; }
#image_grid_panel #image_grid_toolbar .tool { display:inline; margin:0 0.5rem;}
#image_grid_panel #image_grid_group_panel { font-size:small; }
#image_grid_panel #image_grid_group_panel select { font-size:small; }
#image_grid_panel #image_grid_group_panel .image_grid_group_toolbar { display:inline; margin-left: 2rem;}
#image_grid_panel #image_grid_group_panel .image_grid_group_toolbar select { margin:0 0.2rem; padding:0; font-size:small;}
#image_grid_panel #image_grid_nav { display:inline; font-size:small; padding-left:0.5rem; margin-top:0.2rem; }
#image_grid_panel #image_grid_nav span { margin: 0 0.2rem; }
#image_grid_panel #image_grid_content { position:relative; overflow:hidden; margin:0; padding:0; outline:none; }
#image_grid_panel #image_grid_content #image_grid_content_img img { margin:0.3em; padding:0; border:0.2em solid #ffffff; outline:0.1em solid #0066ff;}
#image_grid_panel #image_grid_content #image_grid_content_img .not_sel { opacity:0.6; outline:none; }
#image_grid_panel #image_grid_content #image_grid_content_img { position:absolute; top:0; left:0; width:100%; height:100%; }
#image_grid_panel #image_grid_content #image_grid_content_rshape { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; }
#image_grid_panel #image_grid_content img { float:left; margin:0; }
#leftsidebar_collapse_panel { display:none; position:relative; z-index:10; vertical-align:top; }
#leftsidebar_show_button { font-size:large; margin-left:0.1rem; }
#leftsidebar_show_button:hover { color:red; cursor: pointer; }
/* Left sidebar accordion */
button.leftsidebar_accordion { font-size:large; background-color:#f2f2f2; cursor:pointer; padding:0.5em 0.5em; width:100%; text-align:left; border:0; outline:none; }
button.leftsidebar_accordion:focus { outline: none; }
button.leftsidebar_accordion.active, button.leftsidebar_accordion:hover { background-color: #e6e6e6; }
button.leftsidebar_accordion:after { content:'\02795'; color:#4d4d4d; float:right; }
button.leftsidebar_accordion.active:after { content: '\2796'; }
.leftsidebar_accordion_panel { display:none; padding:0 0.5em; font-size:small; border-right:2px solid #f2f2f2; border-bottom:2px solid #f2f2f2; }
.leftsidebar_accordion_panel.show { display:block; }
/* Keyboard shortcut panel */
.leftsidebar_accordion_panel table { border-collapse:collapse; }
.leftsidebar_accordion_panel td { border:1px solid #f2f2f2; padding:0.2rem 0.4rem; }
/* buttons */
.button_panel { display:inline-block; width:100%; margin:0.2rem 0; }
.button_panel .text_button, .text_button { color: #0000ff; padding: 0.2rem 0.2rem; -moz-user-select:none; -webkit-user-select:none; -ms-user-select:none; }
.button_panel .flush_right { float:right; }
.button_panel .text_button:hover, .text_button:hover { cursor:pointer; }
.button_panel .text_button:active, .text_button:active { color: #000000; }
.button_panel .active { border-bottom:1px solid black; }
.button_panel .button { display:inline-block; padding:0.35rem 0.5rem; margin:0 0.05rem; cursor:pointer; background-color:#cccccc; border-radius:0.2rem; -moz-user-select:none; -webkit-user-select:none; -ms-user-select:none; }
.button_panel .button:hover { background-color:black; color:white; }
/* Attributes properties: name, description, type, ... */
#attribute_properties { display:table; width:100%; border-collapse:collapse; margin:1rem 0; border:1px solid #cccccc; }
#attribute_properties .property { display:table-row;}
#attribute_properties .property span { display:table-cell; padding: 0.2rem 0.4rem; }
#attribute_properties .property span input { width: 100%; border:1px solid #cccccc; margin: 0;}
#attribute_properties .property span input:focus { border:1px solid black; }
#attribute_properties .property span select { width: 100%; border:1px solid #cccccc; margin: 0;}
/* Attributes options: options for attribute type={checkbox,radio,...} */
#attribute_options { display:table; width:100%; border-collapse:collapse; margin:1rem 0; border:1px solid #cccccc; table-layout:fixed; }
#attribute_options .new_option_id_entry { display:inline-block; padding:1rem 0.2rem; }
#attribute_options .new_option_id_entry input {border:none; border-bottom:1px solid #cccccc; margin: 0; font-size: 0.8rem;}
#attribute_options .property { display:table-row;}
#attribute_options .property span { display:table-cell; padding: 0.2rem 0.2rem; font-weight:bold; }
#attribute_options .property input { display:table-cell; width:94%; border:none; border-bottom:1px solid #cccccc; margin: 0; font-size: 0.8rem;}
#attribute_options .property input:focus { border-bottom:1px solid #000000; background-color:#f2f2f2; color:#000000; }
#attribute_options .property span input[type=checkbox] { vertical-align:middle; }
#attribute_options .property span input[type=radio] { vertical-align:middle; }
/* overlay panel used to gather user inputs before invoking a function using invoke_with_user_inputs() */
#user_input_panel { position:fixed; display:none; width:100%; height:100%; top:0; left:0; right:0; bottom:0; background-color: rgba(0,0,0,0.6); z-index:1002; }
#user_input_panel .content { position:fixed; background-color:white; top:50%; left:50%; transform:translate(-50%,-50%); -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); padding:2rem 4rem;}
#user_input_panel .content .title { font-size:large; font-weight:bold; }
#user_input_panel .content .user_inputs { display:table; width:100%; border-collapse:collapse;}
#user_input_panel .content .user_inputs .row { display:table-row; }
#user_input_panel .content .user_inputs .cell { display:table-cell; padding:1rem 0.5rem; vertical-align:middle; border:1px solid #f2f2f2; }
#user_input_panel .content .user_confirm { display:table; width:100%; text-align:center; margin:2rem 0;}
#user_input_panel .content .user_confirm .ok { display:table-cell; width:48%; }
#user_input_panel .content .user_confirm .cancel { display:table-cell; width:48%; }
#user_input_panel .content .warning { color:red; }
/* Attribute editor */
#annotation_editor_panel { position:fixed; display:none; width:100%; left:0; bottom:0; background-color:white; border-top:2px solid #cccccc; padding:0.2em 1em; overflow:auto; z-index:1001; box-shadow: 0 0 1em #cccccc;}
#annotation_editor { display:table; margin-bottom:3em; border-collapse:collapse; font-size:inherit; position: absolute; background-color:white; }
#annotation_editor .row { display:table-row; }
#annotation_editor .highlight .col { background-color:#e6e6e6;}
#annotation_editor .col { display:table-cell; padding:0.4em 0.6em; border:1px solid #000000; vertical-align:middle; font-size:inherit; }
#annotation_editor .header { font-weight:bold; }
#annotation_editor .id { font-weight:bold; }
#annotation_editor .col input[type=checkbox] { vertical-align:middle; }
#annotation_editor .col input[type=radio] { vertical-align:middle; font-size:inherit; }
#annotation_editor .col label { vertical-align:middle; font-size:inherit; }
#annotation_editor .col textarea { border:0.1em solid #cccccc; padding:0; margin:0; font-size:inherit; background-color:#ffffff; }
#annotation_editor .col textarea:focus { border:0.1em dashed #cccccc; }
#annotation_editor .col span { display:block; }
#annotation_editor .col horizontal_container { display:inline-block; }
#annotation_editor .col .img_options { display:inline; }
#annotation_editor .col .img_options .imrow { display:block; }
#annotation_editor .col .img_options span { display:inline-block; margin: 0.2rem 0.4rem;}
#annotation_editor .col .img_options span img { height:4em; }
#annotation_editor .col .img_options p { margin:0; padding:0; font-size:inherit; }
#annotation_editor .col .img_options input[type=radio] { display:none; }
#annotation_editor .col .img_options input[type=radio] + label { display:block; cursor:pointer; text-align:center;}
#annotation_editor .col .img_options input[type=radio]:checked + label { border: 0.1em solid black; background-color:#cccccc; cursor:default; font-size:inherit; }
#project_info_panel { display:table; border-collapse:collapse; font-size:0.8rem; }
#project_info_panel .row { display:table-row; }
#project_info_panel .col { display:table-cell; padding:0.4rem 0.1rem; border:none; }
#project_info_panel .col input[type=text] { font-size:0.8rem; border:none; border-bottom:1px solid #cccccc; margin: 0; width:100%;}
#project_info_panel .col input:focus { border-bottom:1px solid #000000; background-color:#f2f2f2; color:#000000; }
/* Region shape selection panel inside leftsidebar */
ul.region_shape { font-size:xx-large; list-style-type:none; overflow:hidden; padding:0.4em 0; margin:0; }
ul.region_shape li { float:left; padding:0 0.2em; fill:#ffffff; stroke:#000000; }
ul.region_shape li:hover { cursor:pointer; fill:#ffffff; stroke:#ff0000; }
ul.region_shape .selected { fill:#ffffff; stroke:#ff0000; }
/* cursor coordinates inside region shape selection panel in leftsidebar */
#region_info { font-size:0.8em; margin-bottom:0.4em; }
/* Loaded image list shown in leftsidebar panel */
#img_fn_list { display:none; font-size:small; overflow:scroll; min-height:10rem; max-height:25rem; }
#img_fn_list ul { position:relative; line-height:1.3em; margin:0; padding:0; list-style-type:none;}
#img_fn_list li { white-space:nowrap; display:block; padding:0 0.4rem; }
#img_fn_list li:hover { background-color:#d5e5ff; cursor:pointer; }
#img_fn_list .error { color:red; }
#img_fn_list .sel { border-left:0.2rem solid black !important; font-weight:bold; }
#img_fn_list .buffered { border-left:0.2rem solid #cccccc; }
#message_panel { display:block; width:100%; position:fixed; bottom:0px; z-index:9999; text-align:center; }
#message_panel .content { display:inline; margin:auto; background-color:#000000; color:#ffff00; font-size:small; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:2rem; padding: 0.5rem 2rem;}
.text_panel { display:none; margin:auto; font-size:medium; line-height:1.3em; margin: 0; max-width:700px; }
.text_panel li { margin:1em 0; text-align:left; }
.text_panel p { text-align:left; }
.svg_button:hover { cursor:pointer; }
/* Loading spinbar */
.loading_spinbox { display:inline-block; border:0.4em solid #cccccc; border-radius:50%; border-top:0.4em solid black; border-bottom:0.4em solid black;-webkit-animation:spin 2s linear infinite; animation:spin 2s linear infinite; }
@-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#invisible_file_input { width:0.1px; height:0.1px; opacity:0; overflow:hidden; position:absolute; z-index:-1; }
.display_none { display:none !important; }
.display_block { display:block !important; }
/* project settings */
#settings_panel { font-size:1rem; border-collapse:collapse; width:95%; }
#settings_panel a { border: 1px solid #f2f2f2; }
#settings_panel .row { display:table-row; border-bottom:1px solid #f2f2f2; }
#settings_panel .variable { display:table-cell; width:60%; padding:0.5rem 0.5rem; }
#settings_panel .variable div { display:block; }
#settings_panel .variable .name { }
#settings_panel .variable .desc { font-size:0.7em; color:#808080; padding:0.2rem 0rem; }
#settings_panel .value { display:table-cell; vertical-align:middle; padding-left:1rem; }
/* page {about, help, file not found, etc.} */
.display_area_content { } /* this class is used to clear the display area content */
.narrow_page_content li { font-size:0.9rem; margin: 0.4rem 0; }
.narrow_page_content { width:60%; }
.force_small_font { font-size:small !important; }
.key { font-family:monospace; padding:1px 6px; background:linear-gradient(to bottom,#f0f0f0,#fcfcfc);; border:1px solid #e0e0e0; white-space:nowrap; color:#303030; border-bottom-width:2px; border-radius:3px; font-size:1.2em; }
</style>
</head>
<body onload="_via_init()" onresize="_via_update_ui_components()">
<!--
SVG icon set definitions
Material icons downloaded from https://material.io/icons
-->
<svg style="display:none;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="via_logo">
<!-- Logo designed by Abhishek Dutta <[email protected]>, May 2018 -->
<title>VGG Image Annotator Logo</title>
<rect width="400" height="160" x="0" y="0" fill="#212121"></rect>
<text x="56" y="130" font-family="Serif" font-size="100" fill="white">V</text>
<text x="180" y="130" font-family="Serif" font-size="100" fill="white">I</text>
<text x="270" y="130" font-family="Serif" font-size="100" fill="white">A</text>
<rect width="80" height="100" x="52" y="40" stroke="yellow" fill="none" stroke-width="2"></rect>
<text x="72" y="30" font-family="'Comic Sans MS', cursive, sans-serif" font-size="18" fill="yellow">VGG</text>
<rect width="50" height="100" x="175" y="45" stroke="yellow" fill="none" stroke-width="2"></rect>
<text x="175" y="35" font-family="'Comic Sans MS', cursive, sans-serif" font-size="18" fill="yellow">Image</text>
<rect width="80" height="100" x="265" y="40" stroke="yellow" fill="none" stroke-width="2"></rect>
<text x="265" y="30" font-family="'Comic Sans MS', cursive, sans-serif" font-size="18" fill="yellow">Annotator</text>
</symbol>
<symbol id="shape_rectangle">
<title>Rectangular region shape</title>
<rect width="20" height="12" x="6" y="10" stroke-width="2"></rect>
</symbol>
<symbol id="shape_circle">
<title>Circular region shape</title>
<circle r="10" cx="16" cy="16" stroke-width="2"></circle>
</symbol>
<symbol id="shape_ellipse">
<title>Elliptical region shape</title>
<ellipse rx="12" ry="8" cx="16" cy="16" stroke-width="2"></ellipse>
</symbol>
<symbol id="shape_polygon">
<title>Polygon region shape</title>
<path d="M 15.25,2.2372 3.625,11.6122 6,29.9872 l 20.75,-9.625 2.375,-14.75 z" stroke-width="2"></path>
</symbol>
<symbol id="shape_point">
<title>Point region shape</title>
<circle r="3" cx="16" cy="16" stroke-width="2"></circle>
</symbol>
<symbol id="shape_polyline">
<title>Polyline region shape</title>
<path d="M 2,12 10,24 18,12 24,18" stroke-width="2"></path>
<circle r="1" cx="2" cy="12" stroke-width="2"></circle>
<circle r="1" cx="10" cy="24" stroke-width="2"></circle>
<circle r="1" cx="18" cy="12" stroke-width="2"></circle>
<circle r="1" cx="24" cy="18" stroke-width="2"></circle>
</symbol>
<!-- Material icons downloaded from https://material.io/icons -->
<symbol id="icon_settings">
<path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path>
</symbol>
<symbol id="icon_save">
<path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"></path>
</symbol>
<symbol id="icon_open">
<path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"></path>
</symbol>
<symbol id="icon_gridon">
<path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"></path>
</symbol>
<symbol id="icon_gridoff">
<path d="M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2H8zm8 0h4v4h-4V4zM1.27 1.27L0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27L1.27 1.27zM10 12.55L11.45 14H10v-1.45zm-6-6L5.45 8H4V6.55zM8 20H4v-4h4v4zm0-6H4v-4h3.45l.55.55V14zm6 6h-4v-4h3.45l.55.54V20zm2 0v-1.46L17.46 20H16z"></path>
</symbol>
<symbol id="icon_next">
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path>
</symbol>
<symbol id="icon_prev">
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path>
</symbol>
<symbol id="icon_list">
<path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"></path>
</symbol>
<symbol id="icon_zoomin">
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
<path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
</symbol>
<symbol id="icon_zoomout">
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"></path>
</symbol>
<symbol id="icon_copy">
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path>
</symbol>
<symbol id="icon_paste">
<path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"></path>
</symbol>
<symbol id="icon_pasten">
<path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"></path>
<text x="8" y="18">n</text>
</symbol>
<symbol id="icon_pasteundo">
<path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"></path>
<text x="8" y="18">x</text>
</symbol>
<symbol id="icon_selectall">
<path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z"></path>
</symbol>
<symbol id="icon_close">
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>
</symbol>
<symbol id="icon_insertcomment">
<path d="M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path>
</symbol>
<symbol id="icon_checkbox">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path>
</symbol>
<symbol id="icon_fileupload">
<path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"></path>
</symbol>
<symbol id="icon_filedownload">
<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path>
</symbol>
</defs>
</svg>
<!-- used by invoke_with_user_inputs() to gather user inputs -->
<div id="user_input_panel"></div>
<!-- to show status messages -->
<div id="message_panel">
<div id="message_panel_content" class="content"></div>
</div>
<!-- spreadsheet like editor for annotations -->
<div id="annotation_editor_panel">
<div class="button_panel">
<span class="text_button" onclick="edit_region_metadata_in_annotation_editor()" id="button_edit_region_metadata" title="Manual annotations of regions">Region Annotations</span>
<span class="text_button" onclick="edit_file_metadata_in_annotation_editor()" id="button_edit_file_metadata" title="Manual annotations of a file">File Annotations</span>
<span class="button" style="float:right;margin-right:0.2rem;" onclick="annotation_editor_toggle_all_regions_editor()" title="Close this window of annotation editor">×</span>
<span class="button" style="float:right;margin-right:0.2rem;" onclick="annotation_editor_increase_panel_height()" title="Increase the height of this panel">↑</span>
<span class="button" style="float:right;margin-right:0.2rem;" onclick="annotation_editor_decrease_panel_height()" title="Decrease the height of this panel">↓</span>
<span class="button" style="float:right;margin-right:0.2rem;" onclick="annotation_editor_increase_content_size()" title="Increase size of contents in annotation editor">+</span>
<span class="button" style="float:right;margin-right:0.2rem;" onclick="annotation_editor_decrease_content_size()" title="Decrease size of contents in annotation editor">−</span>
</div>
<!-- here, a child div with id="annotation_editor" is added by javascript -->
</div>
<div class="top_panel" id="ui_top_panel">
<!-- menu bar -->
<div class="menubar">
<ul>
<li onclick="show_home_panel()" style="cursor:pointer;">Home</li>
<li>Project
<ul>
<li onclick="project_open_select_project_file()" title="Load a VIA project (from a JSON file)">Load</li>
<li onclick="project_save_with_confirm()" title="Save this VIA project (as a JSON file)">Save</li>
<li onclick="settings_panel_toggle()" title="Show/edit project settings">Settings</li>
<li class="submenu_divider"></li>
<li onclick="sel_local_images()" title="Add images locally stored in this computer">Add local files</li>
<li onclick="project_file_add_url_with_input()" title="Add images from a web URL (e.g. http://www.robots.ox.ac.uk/~vgg/software/via/images/swan.jpg)">Add files from URL</li>
<li onclick="project_file_add_abs_path_with_input()" title="Add images using absolute path of file (e.g. /home/abhishek/image1.jpg)">Add file using absolute path</li>
<li onclick="sel_local_data_file('files_url')" title="Add images from a list of web url or absolute path stored in a text file (one url or path per line)">Add url or path from text file</li>
<li onclick="project_file_remove_with_confirm()" title="Remove selected file (i.e. file currently being shown)">Remove file</li>
<li class="submenu_divider"></li>
<li onclick="sel_local_data_file('attributes')" title="Import region and file attributes from a JSON file">Import region/file attributes</li>
<li onclick="project_save_attributes()" title="Export region and file attributes to a JSON file">Export region/file attributes</li>
</ul>
</li>
<li>Annotation
<ul>
<li onclick="download_all_region_data('csv')" title="Export annotations to a CSV file">Export Annotations (as csv)</li>
<li onclick="download_all_region_data('json')" title="Export annotaitons to a JSON file">Export Annotations (as json)</li>
<li onclick="" class="submenu_divider"></li>
<li onclick="sel_local_data_file('annotations')" title="Import annotations from a CSV file">Import Annotations (from csv)</li>
<li onclick="sel_local_data_file('annotations')" title="Import annotations from a JSON file">Import Annotations (from json)</li>
<li class="submenu_divider"></li>
<li onclick="show_annotation_data()" title="Show a preview of annotations (opens in a new browser windows)">Preview Annotations</li>
<li onclick="download_as_image()" title="Download an image containing the annotations">Download as Image</li>
</ul>
</li>
<li>View
<ul>
<li onclick="image_grid_toggle()" title="Toggle between single image view and image grid view">Toggle image grid view</li>
<li onclick="leftsidebar_toggle()" title="Show or hide the sidebar shown in left hand side">Toggle left sidebar</li>
<li onclick="toggle_img_fn_list_visibility()" title="Show or hide a panel to update annotations corresponding to file and region">Toggle image filename list</li>
<li class="submenu_divider"></li>
<li onclick="toggle_attributes_editor()" title="Show or hide a panel to update file and region attributes">Toggle attributes editor</li>
<li onclick="annotation_editor_toggle_all_regions_editor()" title="Show or hide a panel to update annotations corresponding to file and region">Toggle annotation editor (Space)</li>
<li class="submenu_divider"></li>
<li onclick="toggle_region_boundary_visibility()" title="Show or hide the region boundaries">Show/hide region boundaries (b)</li>
<li onclick="toggle_region_id_visibility()" title="Show or hide the region id labels">Show/hide region labels (l)</li>
<li onclick="toggle_region_info_visibility()" title="Show or hide the image coordinates">Show/hide region info.</li>
</ul>
</li>
<li>Help
<ul>
<li onclick="set_display_area_content(VIA_DISPLAY_AREA_CONTENT_NAME.PAGE_GETTING_STARTED)" title="Show a guide to get started with this application">Getting Started</li>
<li title="Visit the project page for this application"><a href="http://www.robots.ox.ac.uk/~vgg/software/via/" target="_blank">VGG Project Page</a></li>
<li onclick="" title="Report an issue to the developers of this application (requires an account at gitlab.com)"><a href="https://gitlab.com/vgg/via/issues" target="_blank">Report issues</a></li>
<li class="submenu_divider"></li>
<li><a target="_blank" href="https://gitlab.com/vgg/via/blob/master/Contributors.md" title="List of people who have contributed towards the development of VIA">Contributors</a></li>
<li onclick="set_display_area_content(VIA_DISPLAY_AREA_CONTENT_NAME.PAGE_LICENSE)" title="View license of this application">License</li>
<li onclick="set_display_area_content(VIA_DISPLAY_AREA_CONTENT_NAME.PAGE_ABOUT)" title="Show more details about this application">About VIA</li>
</ul>
</li>
</ul>
</div> <!-- end of menubar -->
<!-- Shortcut toolbar -->
<div class="toolbar">
<svg onclick="project_open_select_project_file()" viewbox="0 0 24 24"><use xlink:href="#icon_open"></use><title>Open Project</title></svg>
<svg onclick="project_save_with_confirm()" viewbox="0 0 24 24"><use xlink:href="#icon_save"></use><title>Save Project</title></svg>
<svg onclick="settings_panel_toggle()" viewbox="0 0 24 24"><use xlink:href="#icon_settings"></use><title>Update Project Settings</title></svg>
<!--
<svg onclick="" viewbox="0 0 24 24"><use xlink:href="#icon_checkbox"></use><title>Locate Files</title></svg>
-->
<svg onclick="sel_local_data_file('annotations')" style="margin-left:1rem;" viewbox="0 0 24 24"><use xlink:href="#icon_fileupload"></use><title>Import Annotations from CSV</title></svg>
<svg onclick="download_all_region_data('csv')" viewbox="0 0 24 24"><use xlink:href="#icon_filedownload"></use><title>Download Annotations as CSV</title></svg>
<svg onclick="image_grid_toggle()" id="toolbar_image_grid_toggle" style="margin-left:1rem;" viewbox="0 0 24 24"><use xlink:href="#icon_gridon"></use><title>Switch to Image Grid View</title></svg>
<svg onclick="annotation_editor_toggle_all_regions_editor()" viewbox="0 0 24 24"><use xlink:href="#icon_insertcomment"></use><title>Toggle Annotation Editor</title></svg>
<svg onclick="move_to_prev_image()" style="margin-left:1rem;" viewbox="0 0 24 24"><use xlink:href="#icon_prev"></use><title>Previous</title></svg>
<svg onclick="toggle_img_fn_list_visibility()" viewbox="0 0 24 24"><use xlink:href="#icon_list"></use><title>Toggle Filename List</title></svg>
<svg onclick="move_to_next_image()" viewbox="0 0 24 24"><use xlink:href="#icon_next"></use><title>Next</title></svg>
<svg onclick="zoom_in()" style="margin-left:1rem;" viewbox="0 0 24 24"><use xlink:href="#icon_zoomin"></use><title>Zoom In</title></svg>
<svg onclick="zoom_out()" viewbox="0 0 24 24"><use xlink:href="#icon_zoomout"></use><title>Zoom Out</title></svg>
<svg onclick="sel_all_regions()" viewbox="0 0 24 24" style="margin-left:1rem;"><use xlink:href="#icon_selectall"></use><title>Select All Regions</title></svg>
<svg onclick="copy_sel_regions()" viewbox="0 0 24 24"><use xlink:href="#icon_copy"></use><title>Copy Regions</title></svg>
<svg onclick="paste_sel_regions_in_current_image()" viewbox="0 0 24 24"><use xlink:href="#icon_paste"></use><title>Paste Regions</title></svg>
<svg onclick="paste_to_multiple_images_with_confirm()" viewbox="0 0 24 24"><use xlink:href="#icon_pasten"></use><title>Paste Region in Multiple Images</title></svg>
<svg onclick="del_sel_regions_with_confirm()" viewbox="0 0 24 24"><use xlink:href="#icon_pasteundo"></use><title>Undo Regions Pasted in Multiple Images</title></svg>
<svg onclick="del_sel_regions()" viewbox="0 0 24 24"><use xlink:href="#icon_close"></use><title>Delete Region</title></svg>
</div>
<!-- end of shortcut toolbar -->
<input type="file" id="invisible_file_input" name="files[]" style="display:none">
</div> <!-- endof #top_panel -->
<!-- Middle Panel contains a left-sidebar and image display areas -->
<div class="middle_panel">
<!-- this panel contains a button to shows the left side bar -->
<div id="leftsidebar_collapse_panel">
<span class="text_button" onclick="leftsidebar_toggle()" title="Show left sidebar">▸</span>
</div>
<div id="leftsidebar">
<div class="leftsidebar_accordion_panel show" style="float:right; border:2px solid #f2f2f2;">
<span class="text_button" onclick="leftsidebar_decrease_width()" title="Reduce width of this toolbar panel">←</span>
<span class="text_button" onclick="leftsidebar_increase_width()" title="Increase width of this toolbar panel">→</span>
<span class="text_button" onclick="leftsidebar_toggle()" title="Show/hide this toolbar panel">◂</span>
</div>
<button class="leftsidebar_accordion active">Region Shape</button>
<div class="leftsidebar_accordion_panel show">
<ul class="region_shape">
<li id="region_shape_rect" class="selected" onclick="select_region_shape('rect')" title="Rectangle (Shortcut key 1)"><svg height="32" viewbox="0 0 32 32"><use xlink:href="#shape_rectangle"></use></svg></li>
<li id="region_shape_circle" onclick="select_region_shape('circle')" title="Circle (Shortcut key 2)"><svg height="32" viewbox="0 0 32 32"><use xlink:href="#shape_circle"></use></svg></li>
<li id="region_shape_ellipse" onclick="select_region_shape('ellipse')" title="Ellipse (Shortcut key 3)"><svg height="32" viewbox="0 0 32 32"><use xlink:href="#shape_ellipse"></use></svg></li>
<li id="region_shape_polygon" onclick="select_region_shape('polygon')" title="Polygon (Shortcut key 4)"><svg height="32" viewbox="0 0 32 32"><use xlink:href="#shape_polygon"></use></svg></li>
<li id="region_shape_point" onclick="select_region_shape('point')" title="Point (Shortcut key 5)"><svg height="32" viewbox="0 0 32 32"><use xlink:href="#shape_point"></use></svg></li>
<li id="region_shape_polyline" onclick="select_region_shape('polyline')" title="Polyline (Shortcut key 6)"><svg height="32" viewbox="0 0 32 32"><use xlink:href="#shape_polyline"></use></svg></li>
</ul>
<div id="region_info" class="display_none"> </div>
</div>
<!-- Project -->
<button class="leftsidebar_accordion active" id="project_panel_title">Project</button>
<div class="leftsidebar_accordion_panel show" id="img_fn_list_panel">
<div id="project_info_panel">
<div class="row">
<span class="col"><label for="project_name">Name: </label></span>
<span class="col"><input type="text" value="" onchange="project_on_name_update(this)" id="project_name" title="VIA project name"></span>
</div>
</div>
<div id="project_tools_panel">
<div class="button_panel" style="margin:0.1rem 0;" >
<select style="width:48%" id="filelist_preset_filters_list" onchange="img_fn_list_onpresetfilter_select()" title="Filter file list using predefined filters">
<option value="all">All files</option>
<option value="files_without_region">Show files without regions</option>
<option value="files_missing_region_annotations">Show files missing region annotations</option>
<option value="files_missing_file_annotations">Show files missing file annotations</option>
<option value="files_error_loading">Files that could not be loaded</option>
<option value="regex">Regular Expression</option>
</select>
<input style="width:50%" type="text" placeholder="regular expression" oninput="img_fn_list_onregex()" id="img_fn_list_regex" title="Filter using regular expression">
</div>
</div>
<div id="img_fn_list"></div>
<p>
<div class="button_panel">
<span class="button" onclick="sel_local_images()" title="Add new file from local disk">Add Files</span>
<span class="button" onclick="project_file_add_url_with_input()" title="Add new file using URL">Add URL</span>
<span class="button" onclick="project_file_remove_with_confirm()" title="Remove selected file (i.e. file currently being shown) from project">Remove</span>
</div>
</p>
</div>
<!-- Attributes -->
<button class="leftsidebar_accordion" id="attributes_editor_panel_title">Attributes</button>
<div class="leftsidebar_accordion_panel" id="attributes_editor_panel">
<div class="button_panel" style="padding:1rem 0;">
<span class="text_button" onclick="show_region_attributes_update_panel()" id="button_show_region_attributes" title="Show region attributes">Region Attributes</span>
<span class="text_button" onclick="show_file_attributes_update_panel()" id="button_show_file_attributes" title="Show file attributes">File Attributes</span>
</div>
<div id="attributes_update_panel">
<div class="button_panel">
<input style="width:70%" type="text" placeholder="attribute name" id="user_input_attribute_id" value="">
<span id="button_add_new_attribute" class="button" onclick="add_new_attribute_from_user_input()" title="Add new attribute">+</span>
<span id="button_del_attribute" class="button" onclick="delete_existing_attribute_with_confirm()" title="Delete existing attribute">−</span>
</div>
<div class="button_panel" style="margin:0.1rem 0;" >
<select style="width:100%" id="attributes_name_list" onchange="update_current_attribute_id(this)" title="List of existing attributes"></select>
</div>
<div id="attribute_properties"></div>
<div id="attribute_options"></div>
<p style="text-align:center">
<span class="text_button" title="Show a spreadsheet like editor for all manual annotations" onclick="annotation_editor_toggle_all_regions_editor()">Toggle Annotation Editor</span>
</p>
</div>
</div>
<button class="leftsidebar_accordion">Keyboard Shortcuts</button>
<div class="leftsidebar_accordion_panel">
<div style="display:block; text-align:center; padding:1rem;">Available only on image focus</div>
<table>
<tr>
<td style="width:8em;"><span class="key">←</span> <span class="key">↑</span> <span class="key">→</span> <span class="key">↓</span></td>
<td>Move selected region by 1 px (Shift to jump)</td>
</tr>
<tr>
<td><span class="key">a</span></td>
<td>Select all regions</td>
</tr>
<tr>
<td><span class="key">c</span></td>
<td>Copy selected regions</td>
</tr>
<tr>
<td><span class="key">v</span></td>
<td>Paste selected regions</td>
</tr>
<tr>
<td><span class="key">d</span></td>
<td>Delete selected regions</td>
</tr>
<tr>
<td><span class="key">Ctrl</span> + Wheel</td>
<td>Zoom in/out (mouse cursor is over image)</td>
</tr>
<tr>
<td><span class="key">l</span></td>
<td>Toggle region label</td>
</tr>
<tr>
<td><span class="key">b</span></td>
<td>Toggle region boundary</td>
</tr>
<tr>
<td><span class="key">Enter</span></td>
<td>Finish drawing polyshape</td>
</tr>
<tr>
<td><span class="key">Backspace</span></td>
<td>Delete last polyshape vertex</td>
</tr>
</table>
<div style="display:block; text-align:center; padding:1rem;">Always Available</div>
<table>
<tr>
<td style="width:8em;"><span class="key">←</span> <span class="key">→</span></td>
<td>Move to next/previous image</td>
</tr>
<tr>
<td><span class="key">+</span> <span class="key">-</span> <span class="key">=</span></td>
<td>Zoom in/out/reset</td>
</tr>
<tr>
<td><span class="key">↑</span></td>
<td>Update region label</td>
</tr>
<tr>
<td><span class="key">↓</span></td>
<td>Update region colour</td>
</tr>
<tr>
<td><span class="key">Spacebar</span></td>
<td>Toggle annotation editor (Ctrl to toggle on image editor)</td>
</tr>
<tr>
<td><span class="key">Home</span> / <span class="key">h</span></td>
<td>Jump to first image</td>
</tr>
<tr>
<td><span class="key">End</span> / <span class="key">e</span></td>
<td>Jump to last image</td>
</tr>
<tr>
<td><span class="key">PgUp</span> / <span class="key">u</span></td>
<td>Jump several images</td>
</tr>
<tr>
<td><span class="key">PgDown</span> / <span class="key">d</span></td>
<td>Jump several images</td>
</tr>
<tr>
<td><span class="key">Esc</span></td>
<td>Cancel ongoing task</td>
</tr>
</table>
</div>
</div> <!-- end of leftsidebar -->
<!-- Main display area: contains image canvas, ... -->
<div id="display_area">
<div id="image_panel" class="display_area_content display_none">
<!-- buffer images using <img> element will be added here -->
<!-- @todo: in future versions, this canvas will be replaced by a <svg> element -->
<canvas id="region_canvas" width="1" height="1" tabindex="1">Sorry, your browser does not support HTML5 Canvas functionality which is required for this application.</canvas>
<!-- here, a child div with id="annotation_editor" is added by javascript -->
</div>
<div id="image_grid_panel" class="display_area_content display_none">
<div id="image_grid_group_panel">
<span class="tool">Group by <select id="image_grid_toolbar_group_by_select" onchange="image_grid_toolbar_onchange_group_by_select(this)"></select></span>
</div>
<div id="image_grid_toolbar">
<span>Selected</span>
<span id="image_grid_group_by_sel_img_count">0</span>
<span>of</span>
<span id="image_grid_group_by_img_count">0</span>
<span>images in current group, show</span>
<span>
<select id="image_grid_show_image_policy" onchange="image_grid_onchange_show_image_policy(this)">
<option value="all">all images (paginated)</option>
<option value="first_mid_last">only first, middle and last image</option>
<option value="even_indexed">even indexed images (i.e. 0,2,4,...)</option>
<option value="odd_indexed">odd indexed images (i.e. 1,3,5,...)</option>
<option value="gap5">images 1, 5, 10, 15,...</option>
<option value="gap25">images 1, 25, 50, 75, ...</option>
<option value="gap50">images 1, 50, 100, 150, ...</option>
</select>
</span>
<div id="image_grid_nav"></div>
</div>
<div id="image_grid_content">
<div id="image_grid_content_img"></div>
<svg xmlns:xlink="http://www.w3.org/2000/svg" id="image_grid_content_rshape"></svg>
</div>
<div id="image_grid_info">
</div>
</div> <!-- end of image grid panel -->
<div id="settings_panel" class="display_area_content display_none">
<h2>Settings</h2>
<div class="row">
<div class="variable">
<div class="name">Project Name</div>
</div>
<div class="value">
<input type="text" id="_via_settings.project.name"/>
</div>
</div>
<div class="row">
<div class="variable">
<div class="name">Default Path</div>
<div class="desc">If all images in your project are saved in a single folder, set the default path to the location of this folder. The VIA application will load images from this folder by default. Note: a default path of <code>"./"</code> indicates that the folder containing <code>via.html</code> application file also contains the images in this project. For example: <code>/datasets/VOC2012/JPEGImages/</code> or <code>C:\Documents\data\</code> <strong>(note the trailing <code>/</code> and <code>\</code></strong>)</div>
</div>
<div class="value">
<input type="text" id="_via_settings.core.default_filepath" placeholder="/datasets/pascal/voc2012/VOCdevkit/VOC2012/JPEGImages/"/>
</div>
</div>
<div class="row">
<div class="variable">
<div class="name">Search Path List</div>
<div class="desc">If you define multiple paths, all these folders will be searched to find images in this project. We do not recommend this approach as it is computationally expensive to search for images in multiple folders. <ol id="_via_settings.core.filepath"></ol></div>
</div>
<div class="value">
<input type="text" id="settings_input_new_filepath" placeholder="/datasets/pascal/voc2012/VOCdevkit/VOC2012/JPEGImages"/>
</div>
</div>
<div class="row">
<div class="variable">
<div class="name">Region Label</div>
<div class="desc">By default, each region in an image is labelled using the region-id. Here, you can select a more descriptive labelling of regions.</div>
</div>
<div class="value">
<select id="_via_settings.ui.image.region_label"></select>
</div>
</div>
<div class="row">
<div class="variable">
<div class="name">Region Colour</div>
<div class="desc">By default, each region is drawn using a single colour. Using this setting, you can assign a unique colour to regions grouped according to a region attribute.</div>
</div>
<div class="value">
<select id="_via_settings.ui.image.region_color"></select>
</div>
</div>
<div class="row">
<div class="variable">
<div class="name">Region Label Font</div>
<div class="desc">Font size and font family for showing region labels.</div>
</div>
<div class="value">
<input id="_via_settings.ui.image.region_label_font" placeholder="12px Arial"/>
</div>
</div>
<div class="row">
<div class="variable">
<div class="name">Preload Buffer Size</div>
<div class="desc">Images are preloaded in buffer to allow smoother navigation of next/prev images. A large buffer size may slow down the overall browser performance. To disable preloading, set buffer size to 0.</div>
</div>
<div class="value">
<input type="text" id="_via_settings.core.buffer_size" />
</div>
</div>
<div class="row">
<div class="variable">
<div class="name">On-image Annotation Editor</div>
<div class="desc">When a single region is selected, the on-image annotation editor is gets activated which the user to update annotations of this region. By default, this on-image annotation editor is placed near the selected region.</div>
</div>
<div class="value">
<select id="_via_settings.ui.image.on_image_annotation_editor_placement">
<option value="NEAR_REGION">close to selected region</option>
<option value="IMAGE_BOTTOM">at the bottom of image being annotated</option>
<option value="DISABLE">DISABLE on-image annotation editor</option>
</select>
</div>
</div>
<div class="row" style="border:none;">
<button onclick="settings_save()" value="save_settings" style="margin-top:2rem">Save</button>
<button onclick="settings_panel_toggle()" value="cancel_settings" style="margin-left:2rem;">Cancel</button>
</div>
</div> <!-- end of settings panel -->
<div id="page_404" class="display_area_content display_none narrow_page_content">
<h2>File Not Found</h2>
<p>Filename: <span style="font-family:Mono;" id="page_404_filename"></span></p>
<p>We recommend that you update the default path in <span class="text_button" title="Show Project Settings" onclick="settings_panel_toggle()">project settings</span> to the folder which contains this image.</p>
<p>A temporary fix is to use <span class="text_button" title="Load or Add Images" onclick="sel_local_images()">browser's file selector</span> to manually locate and add this file. We do not recommend this approach because it requires you to repeat this process every time your load this project in the VIA application.</p>
</div> <!-- end of file not found panel -->
<div id="page_start_info" class="display_area_content display_none narrow_page_content">
<ul>
<li>To start annotation, <span class="text_button" title="Load or Add Images" onclick="sel_local_images()">select images</span> (or, add images from <span class="text_button" title="Add images from a web URL (e.g. http://www.robots.ox.ac.uk/~vgg/software/via/images/swan.jpg)" onclick="project_file_add_url_with_input()">URL</span> or <span class="text_button" title="Add images using absolute path of file (e.g. /home/abhishek/image1.jpg)" onclick="project_file_add_abs_path_with_input()">absolute path</span>) and draw regions</li>
<li>Use <span class="text_button" title="Toggle attributes editor panel" onclick="toggle_attributes_editor()">attribute editor</span> to define attributes (e.g. name) and <span class="text_button" title="Toggle annotations editor panel" onclick="annotation_editor_toggle_all_regions_editor()">annotation editor</span> to describe each region (e.g. cat) using these attributes.</li>
<li>Remember to <span class="text_button" onclick="project_save_with_confirm()">save</span> your project before closing this application so that you can <span class="text_button" onclick="project_open_select_project_file()">load</span> it later to continue annotation.</li>
<li>For help, see the <span class="text_button" onclick="set_display_area_content(VIA_DISPLAY_AREA_CONTENT_NAME.PAGE_GETTING_STARTED)">Getting Started</span> page and pre-loaded demo: <a href="http://www.robots.ox.ac.uk/~vgg/software/via/via_demo.html">image annotation</a> and <a href="http://www.robots.ox.ac.uk/~vgg/software/via/via_face_demo.html">face annotation</a>.</li>
</ul>
</div>
<div id="page_getting_started" class="display_area_content display_none narrow_page_content">
<p>A more detailed user guide (with screenshots and descriptions) is <a href="http://www.robots.ox.ac.uk/~vgg/software/via/docs/user_guide.html">available here</a>.</p>
<ol>
<li><strong>Load Images</strong>: The first step is to load all the images that you wish to annotate. There are multiple ways to add images to a VIA project. Choose the method that suits your use case.
<ul>
<li>Method 1: Selecting local files using browser's file selector
<ol>
<li>Click <span class="text_button" title="Load or Add Images" onclick="sel_local_images()"><code>Project → Add local files</code></span></li>
<li>Select desired images and click <code>Open</code></li>
</ol>
</li>
<li>Method 2: Adding files from URL or absolute path
<ol>
<li>Click <span class="text_button" title="Add images from a web URL (e.g. http://www.robots.ox.ac.uk/~vgg/software/via/images/swan.jpg)" onclick="project_file_add_url_with_input()"><code>Project → Add files from URL</code></span></li>
<li>Enter URL and click <code>OK</code></li>
</ol>
</li>
<li>Method 3: Adding files from list of url or absolute path stored in text file
<ol>
<li>Create a text file containing URL and absolute path (one per line)</li>
<li>Click <span class="text_button" title="Add images from a list of web url or absolute path stored in a text file (one url or path per line)" onclick="sel_local_data_file('files_url')"><code>Project → Add url or path from text file</code></span></li>
<li>Select the text file and click <code>Open</code></li>
</ol>
</li>
</ul>
</li>
<li><strong>Draw Regions</strong>: Select a region shape (<span class="text_button" onclick="select_region_shape('rect')">rectangle</span>, <span class="text_button" onclick="select_region_shape('circle')">circle</span>, <span class="text_button" onclick="select_region_shape('ellipse')">ellipse</span>, <span class="text_button" onclick="select_region_shape('polygon')">polygon</span>, <span class="text_button" onclick="select_region_shape('point')">point</span>, <span class="text_button" onclick="select_region_shape('polyline')">polyline</span>) from the left sidebar and draw regions as follows:
<ul>
<li>Rectangle, Circle and Ellipse
<ul>
<li>Press left mouse button, drag mouse cursor and release mouse button.</li>
<li>To define a point inside an existing region, click inside the region to select it (if not already selected), now press left mouse button, drag and release to draw region inside existing region.</li>
<li>To select, click inside the region. If the click point contains multiple regions, then clicking multiple times at that location shuffles selection through those regions.</li>
</ul>
</li>
</ul>
<ul>
<li>Point
<ul>
<li>Click to define points.</li>
<li>To draw a region inside existing region, click inside the region to select it (if not already selected), now click again to define the point.</li>
<li>To select, click on (or near) the existing point.</li>
</ul>
</li>
</ul>
<ul>
<li>Polygon and Polyline
<ul>
<li>Click to define vertices.</li>
<li>Press <strong>[Enter]</strong> to finish drawing the region or press [Esc] to cancel.</li>
<li>If the first vertex needs to be defined inside an existing region, click inside the region to select it (if not already selected), now click again to define the vertex.</li>
<li>To select, click inside the region. If the click point contains multiple regions, then clicking multiple times at that location shuffles selection through those regions.</li>
</ul>
</li>
</ul>
</li>
<li><strong>Create Annotations</strong>: For a more detailed description of this step, see <a href="http://www.robots.ox.ac.uk/~vgg/software/via/docs/creating_annotations.html">Creating Annotations : VIA User Guide</a>. Click the <span class="text_button" onclick="annotation_editor_toggle_all_regions_editor()"><code>View → Toggle attributes editor</code></span> to show attributes editor panel in left sidebar and add the desired file or region attributes (e.g. name). Now click <span class="text_button" onclick="annotation_editor_toggle_all_regions_editor()"><code>View → Toggle annotations editor</code></span> to show the annotation editor panel in the bottom side. Update the annotations for each region.</li>
<li><strong>Export Annotations</strong>: To export the annotations in json or csv format, click <span class="text_button" onclick="download_all_region_data('csv')"><code>Annotation → Export annotations</code></span> in top menubar.</li>
<li><strong>Save Project</strong>: To save the project, click <span class="text_button" onclick="project_save_with_confirm()"><code>Project → Save</code></span> in top menubar.</li>
</ol>
</div>
<div id="page_load_ongoing" class="display_area_content narrow_page_content">
<div style="text-align:center">
<a href="http://www.robots.ox.ac.uk/~vgg/software/via/">
<svg height="160" viewbox="0 0 400 160" style="background-color:#212121;">
<use xlink:href="#via_logo"></use>
</svg>
</a>
<div style="margin-top:4rem">Loading ...</div>
</div>
</div>
<div id="page_about" class="display_area_content display_none" style="width:40rem !important">
<div style="text-align:center">
<a href="http://www.robots.ox.ac.uk/~vgg/software/via/">
<svg height="160" viewbox="0 0 400 160" style="background-color:#212121;">
<use xlink:href="#via_logo"></use>
</svg>
</a>
</div>
<p style="font-family:mono; font-size:0.8em;text-align:center;"><a href="https://gitlab.com/vgg/via/blob/master/CHANGELOG">Version 2.0.7</a></p>
<p>VGG Image Annotator (VIA) is an image annotation tool that can be used to define regions in an image and create textual descriptions of those regions. VIA is an <a href="https://gitlab.com/vgg/via/">open source project</a> developed at the <a href="http://www.robots.ox.ac.uk/~vgg/">Visual Geometry Group</a> and released under the BSD-2 clause <a href="https://gitlab.com/vgg/via/blob/master/LICENSE">license</a>.</p>
<p>Here is a list of some salient features of VIA:
<ul>
<li>based solely on HTML, CSS and Javascript (no external javascript libraries)</li>
<li>can be used off-line (full application in a single html file of size < 400KB)</li>
<li>requires nothing more than a modern web browser (tested on Firefox, Chrome and Safari)</li>
<li>supported region shapes: rectangle, circle, ellipse, polygon, point and polyline</li>
<li>import/export of region data in csv and json file format</li>
</ul>
</p>
<p>For more details, visit <a href="http://www.robots.ox.ac.uk/~vgg/software/via/">http://www.robots.ox.ac.uk/~vgg/software/via/</a>.</p>
<p> </p>
<p>Copyright © 2016-2019, <a href="mailto:[email protected]">Abhishek Dutta</a>,Visual Geometry Group, Oxford University and <a target="_blank" href="https://gitlab.com/vgg/via/blob/master/Contributors.md">VIA Contributors</a>.</p>
</div> <!-- end of page_about -->
<div id="page_license" class="display_area_content display_none narrow_page_content">
<pre>
Copyright (c) 2016-2019, Abhishek Dutta, Visual Geometry Group, Oxford University and VIA Contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
</pre>
</div>
</div> <!-- end of display_area -->
</div> <!-- end of middle_panel -->
<!-- this vertical spacer is needed to allow scrollbar to show
items like Keyboard Shortcut hidden under the attributes panel -->
<div style="width: 100%;" id="vertical_space"></div>
<script type="text/javascript">
//<!--AUTO_INSERT_VIA_DEMO_JS_HERE-->
</script>
<script type="text/javascript">
//<!--AUTO_INSERT_VIA_JS_HERE-->
/*
VGG Image Annotator (via)
www.robots.ox.ac.uk/~vgg/software/via/
Copyright (c) 2016-2018, Abhishek Dutta, Visual Geometry Group, Oxford University.