-
Notifications
You must be signed in to change notification settings - Fork 288
/
workbench.html
519 lines (504 loc) · 17.2 KB
/
workbench.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dev-Workbench</title>
<link rel="stylesheet" href="./workbench.css" />
<!-- Font Awesome -->
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
/>
<!-- Google Fonts -->
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<!-- Bootstrap core CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
crossorigin="anonymous"
>
<!-- Material Design Bootstrap -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.19.0/css/mdb.min.css"
rel="stylesheet"
/>
<!-- JQuery -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"
></script>
<!-- Bootstrap tooltips -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.4/umd/popper.min.js"
></script>
<!-- Bootstrap core JavaScript -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/js/bootstrap.min.js"
></script>
<!-- MDB core JavaScript -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.19.0/js/mdb.min.js"
></script>
<script src="https://unpkg.com/feather-icons"></script>
<link
href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css"
rel="stylesheet"
/>
<script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="../../common/jszip.min.js"></script>
<script src="../../common/FileSaver.min.js"></script>
<script src="../../common/localforage.min.js"></script>
</head>
<body>
<!--Navbar-->
<nav
class="navbar navbar-expand-lg navbar-dark flex-row px-2"
style="background: rgb(33, 37, 41);"
>
<div style="cursor: pointer;" id="goBack">
<i data-feather="arrow-left" class="text-white"></i>
</div>
<<<<<<< HEAD
<!-- Navbar brand -->
<div class="navbar-brand-div flex-grow-1">
<span style="cursor: default" class="navbar-brand " > Workbench</span>
</div>
<div>
<ul class="navbar-nav mr-auto px-2">
=======
<!-- Navbar brand -->
<span style="cursor: default;" class="navbar-brand"> Workbench</span>
<ul class="navbar-nav mr-auto">
>>>>>>> master
<!-- Dropdown -->
<li
class="nav-item dropdown"
>
<a
class="nav-link dropdown-toggle"
id="navbarDropdownMenuLink"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>Options</a
>
<div
style="margin-left: -5em;"
class="dropdown-menu dropdown-primary"
aria-labelledby="navbarDropdownMenuLink"
>
<a
id="exportOption"
class="dropdown-item"
href="#"
style="display: none;"
><i class="fas fa-file-export"></i> Export</a
>
<a class="dropdown-item" href="#" onclick="importWork()"
><i class="fas fa-file-import"></i> Import</a
>
<input type="file" id="importFile" />
<a
class="dropdown-item helpButton"
href="#"
data-toggle="modal"
data-target="#helpModal"
>
<i class="fas fa-question-circle"></i>
Help/User Guide</a
>
</div>
</div>
</li>
</ul>
</nav>
<!--/.Navbar-->
<div id="headbar">
<br />
<div id="headContent" style="font-size: xx-large;">
Welcome to <b>Development Workbench</b>
</div>
<div id="headSub" style="font-size: large;">
Create your own ML models in 3 simple steps
</div>
<br />
</div>
<!-- Vertical Steppers -->
<div id="stepper">
<div class="row mt-1" style="max-width: 90%; margin: 0 auto;">
<div class="col-md-12">
<!-- Steppers Wrapper -->
<ul class="stepper stepper-vertical">
<!-- First Step -->
<li class="active firstStepHead">
<a id="step1Link" href="#">
<span class="circle">1</span>
<span class="label">Select/Create Training Data</span>
</a>
<div class="step-content grey lighten-3">
<p style="font-size: 1em;">
Select your own dataset (spritesheet) or create a new one from
caMicroscope labels or own custom data. <br />
<button
id="firstStepButton"
onclick="dataSelect();"
style="
border-radius: 50%;
padding: 1em;
margin-bottom: -1em;
"
type="button"
class="btn btn-primary"
>
<i data-feather="chevron-right" class="text-white"></i>
</button>
</p>
</div>
</li>
<!-- Second Step -->
<li class="secondStepHead">
<!--Section Title -->
<a href="#!">
<span class="circle">2</span>
<span class="label">Algorithm Creation and Training</span>
</a>
<!-- Section Description -->
<div class="step-content grey lighten-3">
<p style="font-size: 1em;">
Create your own customized CNN algorithm and train your model
accordingly. <br />
<a id="secondStepButton" href="./createAlgo/bench.html">
<button
style="
border-radius: 50%;
padding: 1em;
margin: 1em 0em -1em -1em;
"
type="button"
class="btn btn-primary"
>
<i
data-feather="chevron-right"
class="text-white"
></i></button
></a>
</p>
</div>
</li>
<!-- Third Step -->
<li class="thirdStepHead">
<a href="#!">
<span class="circle">3</span>
<span class="label"> Save your work </span>
</a>
<!-- Section Description -->
<div class="step-content grey lighten-3">
<p style="font-size: 1em;">
Save your model (JSON/binaries) to disk for later use<br />
</p>
</div>
</li>
</ul>
<!-- /.Steppers Wrapper -->
</div>
</div>
</div>
<!-- /.Vertical Steppers -->
<div id="cards">
<br /><br />
<div
style="
align-content: center;
display: flex;
flex-wrap: wrap;
padding: 1em;
"
>
<!-- Cards -->
<div class="card" style="max-width: 20em; margin-left:2cm; auto;">
<!-- Card content -->
<div class="card-body">
<!-- Title -->
<h4 class="card-title">Select your dataset</h4>
<!-- Text -->
<p style="text-align: justify;" class="card-text">
Select the dataset (.zip) having three files; spritesheet
(data.jpg), a binary labels (labels.bin) and the classes
(labelnames.csv) from your local storage.
</p>
<div class="input-group">
<div class="custom-file">
<input
type="file"
id="spriteInput"
accept=".zip"
style="max-width: 98%;"
/>
<label
style="overflow: hidden;"
class="custom-file-label spriteInputLabel"
for="spriteInput"
>Choose file
</label>
</div>
</div>
</div>
</div>
<div style="height: 1em; margin-left:5cm; padding: 2em 0; font-size: large;">
<b> OR</b>
</div>
<div class="card" style="max-width: 20em; margin-left:2cm; auto;">
<!-- Card content -->
<div class="card-body">
<!-- Title -->
<h4 class="card-title">Create your own</h4>
<!-- Text -->
<p class="card-text" style="text-align: justify;">
Build your own spritesheet using labeling from the caMicroscope
instance or browsing your own dataset.
</p>
<!-- Buttons -->
<div style="text-align: center;">
<button
data-toggle="modal"
data-target="#labelsUploadModal"
style="border-radius: 5px; font-size: 0.9em;"
class="btn btn-primary px-2"
onclick="resetLabelsModal()"
>
caM Labels
</button>
<button
style="border-radius: 5px; font-size: 0.9em;"
class="btn btn-primary px-2"
data-toggle="modal"
data-target="#labelsUploadModal"
onclick="resetLabelsModal(true)"
>
Custom Data
</button>
</div>
</div>
</div>
<!-- Cards -->
</div>
</div>
<!-- Labels/customData Upload Modal -->
<div
class="modal fade"
id="labelsUploadModal"
tabindex="-1"
role="dialog"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="labelSelectModalTitle"></h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<form
id="labelsUploadForm"
onsubmit="return false"
method="post"
enctype="multipart/form-data"
>
<div class="modal-body">
<div class="labelsInputGroup">
<div id="step1Desc"></div>
<br />
<div class="input-group">
<div class="custom-file">
<input
type="file"
id="labelsInput"
accept=".zip"
required
/>
<label
class="custom-file-label labelsInputLabel"
for="labelsInput"
style="overflow: hidden;"
>
Choose
</label>
</div>
</div>
</div>
<div id="filterLabels">
Select the labels you want to include in the dataset. <br />
<br />
<ul
id="labelsFilterList"
style="max-height: 25em; overflow: auto;"
class="list-group"
></ul>
</div>
<div id="labelsDatasetZip" style="margin-bottom: -2.8em;">
The spritesheet (.jpg) and labels (binary) files have been
created according to your customized data. Download the .zip
file and select it in the "Select your dataset" section on this
page. <br />
Click on "Done" after the download is finished. <br />
<button
id="datasetDownloadButton"
type="button"
class="btn btn-info"
style="
padding: 0.6em;
font-size: 1em;
border-radius: 5px;
margin-top: 1em;
"
>
Download <i
data-feather="download"
class="text-white"
></i>
</button>
<br />
<br />
</div>
<div id="selectResolution" style="margin-bottom: -2em;">
Select normalized image resolution (in px) for the dataset
images. Please <b><u>Note</u></b> that more resolution images
will take more time to create spritesheet and training and
testing may affect accordingly.
<br />
<div style="display: flex; flex-wrap: wrap;">
<div style="display: flex; margin: 0 auto;">
<input
id="datasetNormalWidth"
class="form-control form-control-sm"
type="number"
value="60"
min="20"
style="width: 7em; margin: 1em;"
/>
<span style="margin: 1em;">x</span>
<input
id="datasetNormalHeight"
class="form-control form-control-sm"
type="number"
value="60"
min="20"
style="width: 7em; margin: 1em;"
/>
</div>
</div>
</div>
<br />
</div>
<div class="modal-footer">
<button
id="labelsSubmitButton"
type="submit"
class="btn btn-success"
style="padding: 0.6em; font-size: 1em; border-radius: 5px;"
>
<div id="labelsSubmitText">
Next <i data-feather="chevron-right" class="text-white"></i>
</div>
<div
id="labelsSubmitLoading"
class="spinner-border"
role="status"
>
<span class="sr-only">Loading...</span>
</div>
<div id="labelsSubmitFinish">
Done <i data-feather="check" class="text-white"></i>
</div>
</button>
</div>
</form>
</div>
</div>
</div>
<!-- Help/User-Guide Modal -->
<div
class="modal fade"
id="helpModal"
tabindex="-1"
role="dialog"
aria-hidden="true"
>
<div
class="modal-dialog modal-top modal-full-height modal-dialog-scrollable"
role="document"
>
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="helpModalTitle">Help - User Guide</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" style="align-content: center;"></div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary px-3"
data-dismiss="modal"
style="border-radius: 5px; font-size: 1em; padding: 0.65em;"
>
Close
</button>
</div>
</div>
</div>
</div>
<!-- Toast Alert -->
<div
id="toastPlaceholder"
style="position: fixed; top: 1em; width: 100%; align-content: center;"
>
<div
id="toastAlert"
style="max-width: 40em; min-width: 10em; margin: 0 auto;"
class="alert alert-dismissible fade"
role="alert"
>
<span id="toastContent"></span>
<button
type="button"
class="close"
onclick="$('#toastAlert').removeClass('show'); $('#toastPlaceholder').hide();"
>
<span aria-hidden="true">×</span>
</button>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"
integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8"
crossorigin="anonymous"></script>
<script src="./workbench.js"></script>
<script>
feather.replace(); // for feather Icons
</script>
</body>
</html>