This repository was archived by the owner on Apr 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 439
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·54 lines (48 loc) · 2.24 KB
/
index.html
File metadata and controls
executable file
·54 lines (48 loc) · 2.24 KB
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
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>KNN Classification on Webcam Images with mobileNet.</title>
<script src="https://unpkg.com/ml5@0.4.0/dist/ml5.min.js" type="text/javascript"></script>
</head>
<body>
<h2>KNN Classification on Webcam Images with mobileNet. Built with p5.js</h2>
<div id="videoContainer">
<video id="video" width="640" height="480" autoplay></video>
</div>
<p id="status">Loading Model...</p>
<div>
<button id="load">Load Dataset</button><br />
<p>If you load this sample classifer dataset. Try to make rock, paper, or scissor gestures to see if the classifier can class them.<br />
If this sample dataset doesn't work well for you, you could train your own classifier,<br />
and use the 'Save Dataset' button below to create your own myKNNDataset.json file,<br />
and replace the myKNNDataset.json in this folder.'
</p>
</div>
<br /><p>
<span class="emoji"> ✊ </span><button id="addClassRock">Add an Example to Class Rock</button>
<button id="resetRock">Reset Class Rock</button>
</p><p><span id="exampleRock">0</span> Rock examples</p>
<p>| Confidence in Rock is: <span id="confidenceRock">0</span></p>
<br /><span class="emoji"> 🖐 </span><button id="addClassPaper">Add an Example to Class Paper</button>
<button id="resetPaper">Reset Class Paper</button>
<p><span id="examplePaper">0</span> Paper examples</p>
<p>| Confidence in Paper is: <span id="confidencePaper">0</span></p>
<br /><span class="emoji"> ✌️ </span><button id="addClassScissor">Add an Example to Class Scissor</button>
<button id="resetScissor">Reset Class Scissor</button>
<p><span id="exampleScissor">0</span> Scissor examples</p>
<p>| Confidence in Scissor is: <span id="confidenceScissor">0</span></p>
<br />
<p>
<button id="buttonPredict">Start predicting!</button><br />
<button id="clearAll">Clear all classes</button><br />
</p>
<p>
KNN Classifier with mobileNet model labeled this
as Class: <span id="result">...</span>
with a confidence of <span id="confidence">...</span>
</p>
<div><button id="save">Save Dataset</button></div>
<script src="sketch.js"></script>
</body>
</html>