-
Notifications
You must be signed in to change notification settings - Fork 31
/
index.html
186 lines (183 loc) · 7.87 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
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>WebNN Object Detection Example</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<link href='../common/css/style.css' rel='stylesheet'>
<link rel="icon" type="image/x-icon" href="../common/img/favicon/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="../common/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="../common/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../common/img/favicon/favicon-16x16.png">
<link rel="manifest" href="../common/img/favicon/site.webmanifest">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark">
<a href="../">
<div class="logosvg" id="logosvg"></div>
</a>
<span class="navbar-brand">Object Detection</span>
<ul class="navbar-nav"></ul>
</nav>
<div class='container' id='container'>
<div class="card mt-2 mb-2">
<div class="card-body">
<div class="row mb-2 align-items-center justify-content-md-left">
<div class="col-1 col-md-1">
<span>Backend</span>
</div>
<div class="col-md-auto">
<div class="btn-group-toggle" data-toggle="buttons" id="backendBtns">
<label class="btn btn-outline-info custom" name="webnn">
<input type="radio" name="backend" id="webnn_cpu" autocomplete="off">WebNN (CPU)
</label>
<label class="btn btn-outline-info custom" name="webnn">
<input type="radio" name="backend" id="webnn_gpu" autocomplete="off">WebNN (GPU)
</label>
<label class="btn btn-outline-info custom" name="webnn">
<input type="radio" name="backend" id="webnn_npu" autocomplete="off">WebNN (NPU)
</label>
</div>
</div>
</div>
<div class="row mb-2 align-items-center">
<div class="col-1 col-md-1">
<span class="nowrap">Data Type</span>
</div>
<div class="col-md-auto">
<div class="btn-group-toggle" data-toggle="buttons" id="dataTypeBtns">
<label class="btn btn-outline-info" id="float32Label" active>
<input type="radio" name="layout" id="float32" autocomplete="off" checked>Float32
</label>
<label class="btn btn-outline-info" id="float16Label">
<input type="radio" name="layout" id="float16" autocomplete="off">Float16
</label>
</div>
</div>
</div>
<div class="row align-items-center">
<div class="col-1 col-md-1">
<span>Model</span>
</div>
<div class="col-md-auto">
<div class="btn-group-toggle" data-toggle="buttons" id="modelBtns">
<label class="btn btn-outline-info btn-sm active">
<input type="radio" name="model" id="tinyyolov2" autocomplete="off">Tiny Yolo V2
</label>
<label class="btn btn-outline-info btn-sm">
<input type="radio" name="model" id="ssdmobilenetv1" autocomplete="off">SSD MobileNet V1
</label>
</div>
</div>
</div>
</div>
</div>
<ul class='nav nav-tabs nav-justified mb-3' id='tabs' role='tablist'>
<li class='nav-item' id='img' role='presentation'>
<a class='nav-link active' data-toggle='tab' href='#imagetab' role='tab' aria-controls='ex3-tabs-1'
aria-selected='true'>IMAGE</a>
</li>
<li class='nav-item' id='cam' role='presentation'>
<a class='nav-link' data-toggle='tab' href='#cameratab' role='tab' aria-controls='ex3-tabs-2'
aria-selected='false'>LIVE CAMERA</a>
</li>
</ul>
<div class='tab-content clearfix' style='display: none;' id='progressmodel'>
<div class='loading-page'>
<div class='counter'>
<div class='loading'>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<p id='progressstep'>Loading model ...</p>
</div>
</div>
</div>
<div class='tab-content text-center mt-5 col-sm' id='hint'>
<h2 class="text-uppercase text-info">No model selected</h2>
<p class="font-weight-lighter">Please select model to start prediction.</p>
</div>
<div class='shoulddisplay tab-content clearfix' style='display: none;'>
<ul class="list-inline list-pipe text-center">
<li class="list-inline-item">
Load time: <span class='ir' id='loadTime'></span>
</li>
<li class="list-inline-item">
Build time: <span class='ir' id='buildTime'></span>
</li>
<li class="list-inline-item">
<span id='computeLabel'></span>
<span class='ir' id='computeTime'></span>
</li>
</ul>
</div>
<div class='shoulddisplay tab-content clearfix text-center' style='display: none;'>
<div class='col mb-3'>
<span id='fps' class="badge badge-pill badge-success"></span>
</div>
<div class='col mb-3'>
<canvas id='outputCanvas' width='480' height='360'></canvas>
</div>
</div>
<div class='tab-content clearfix row'>
<div class='tab-pane text-center active col-sm' id='imagetab'>
<div class='icdisplay'>
<div class='col-lg-12 col-xs-12 text-center'>
<div class='row'>
<div class='col mb-2' style='display: flex;'>
<div id='div-photos' style='margin: auto; display: flex;' title='Original image'>
<img id='feedElement' hidden crossorigin='anonymous' class='img-fluid' alt='Responsive image'>
</div>
</div>
</div>
<div class='row'>
<div class='col'>
<label class='btn btn-outline-info btn-lg shoulddisplay' style='display: none;'>
<input type='file' id='imageFile' accept='image/*' hidden />
<span>Pick Image</span>
</label>
</div>
</div>
</div>
</div>
</div>
<div class='tab-pane text-center col-sm' id='cameratab'>
<div class='icdisplay'>
<div class='row'>
<div class='col mb-2' style='display: flex;'>
<div id='div-photos' style='margin: auto; display: flex;'>
</div>
</div>
<video id='feedMediaElement' autoplay playsinline style='display: none;'></video>
</div>
</div>
</div>
</div>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<div id="footer"></div>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV"
crossorigin="anonymous"></script>
<script type="module" src='./main.js'></script>
<script type="module" src="../common/component/component.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6TK7JD3KKY"></script>
<script src="../common/libs/gtag.js"></script>
</body>
</html>