-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathindex.html
222 lines (219 loc) · 9.06 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
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>WebNN Face Recognition 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 id='facerecognition'>
<nav class="navbar navbar-expand-md navbar-dark">
<a href="../">
<div class="logosvg" id="logosvg"></div>
</a>
<span class="navbar-brand">Face Recognition</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 wider-col">
<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>
</div>
</div>
</div>
<!-- <div class="row mb-2 align-items-center">
<div class="col-1 wider-col">
<span>Layout</span>
</div>
<div class="col-md-auto">
<div class="btn-group-toggle" data-toggle="buttons" id="layoutBtns">
<label class="btn btn-outline-info btn-sm">
<input type="radio" name="layout" id="nchw" autocomplete="off">NCHW
</label>
<label class="btn btn-outline-info btn-sm active">
<input type="radio" name="layout" id="nhwc" autocomplete="off" checked>NHWC
</label>
</div>
</div>
</div> -->
<div class="row mb-2 align-items-center">
<div class="col-1 wider-col">
<span>FaceRecognition</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">
<input type="radio" name="frmodel" id="facenet" autocomplete="off" checked>FaceNet
</label>
</div>
</div>
</div>
<div class="row align-items-center">
<div class="col-1 wider-col">
<span>FaceDetection</span>
</div>
<div class="col-md-auto">
<div class="btn-group-toggle" data-toggle="buttons" id="fdModelBtns">
<label class="btn btn-outline-info btn-sm">
<input type="radio" name="fdmodel" id="ssdmobilenetv2face" autocomplete="off">SSD MobileNet V2 Face
</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>
<div class='tab-content clearfix row'>
<div class='shoulddisplay col-sm text-center' style='display: none;'>
<div class='row'>
<div class='col mb-3'>
<img id='targetImage' hidden crossorigin='anonymous' class='img-fluid' alt='Responsive image'
src='./images/targetImage.jpg'>
<canvas id='targetCanvasShow'></canvas>
</div>
</div>
<div class='row'>
<div class='col'>
<label class='btn btn-outline-info'>
<input type='file' id='targetImgFile' accept='image/*' hidden />
<span>Pick Faces Image</span>
</label>
</div>
</div>
<div class='row'>
<div class='col'>
<span class='desc'>
Step 1: Upload frontally oriented faces image.
</span>
</div>
</div>
</div>
<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-3'>
<img id='searchImage' hidden crossorigin='anonymous' class='img-fluid' alt='Responsive image'
src='./images/searchImage.jpg'>
<canvas id='searchCanvasShow'></canvas>
</div>
</div>
<div class='row'>
<div class='col'>
<label class='btn btn-outline-info shoulddisplay' style='display: none;'>
<input type='file' id='searchImgFile' accept='image/*' hidden />
<span>Pick New Faces Image</span>
</label>
</div>
</div>
<div class='row'>
<div class='col'>
<span class='desc'>Step 2: Upload other faces images for prediction.</span>
</div>
</div>
</div>
</div>
</div>
<div class='tab-pane text-center col-sm' id='cameratab'>
<div class='icdisplay'>
<div class='col-lg-12 col-xs-12 text-center'>
<div class='row'>
<div class='col mb-3'>
<canvas id='cameraShow'></canvas>
</div>
<video id='camElement' autoplay playsinline style='display: none;'></video>
</div>
</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 src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"
integrity="sha256-thVOvsS0U8X0/2twH3+6dCK3ZPTvgWgFSivgfpj5vQQ="
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>