-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (51 loc) · 2.41 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
<html>
<head>
<meta charset="UTF-8">
<title>KNN Classification on Webcam Images with mobileNet. Built with p5.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/addons/p5.dom.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js"></script>
<style></style>
</head>
<body>
<h2>KNN Classification on Webcam Images with mobileNet. Built with p5.js</h2>
<p class="recognizing">Dummy</p>
<p class="gettingready"></p>
<p class="predictions"></p>
<div id="videoContainer"></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>