-
Notifications
You must be signed in to change notification settings - Fork 1
/
finetune.html
46 lines (38 loc) · 1.97 KB
/
finetune.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
<html>
<head>
<style>
img {border: 5px solid #fff;opacity: 0.9}
img:hover {border:5px solid #ccc; cursor:pointer; opacity: 1.0}
</style>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/mobilenet"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/knn-classifier"></script>
</head>
<body>
<p>(Open the developer console to see predictions)</p>
<h1>Training:</h1>
<div>
<img id="cat1" crossorigin src="http://127.0.0.1:8080/cat1.jpeg" height='75px' onclick="addExample('cat1', 0)"/>
<img id="cat2" crossorigin src="http://127.0.0.1:8080/cat2.jpeg" height='75px' onclick="addExample('cat2', 0)"/>
<img id="cat3" crossorigin src="http://127.0.0.1:8080/cat3.jpeg" height='75px' onclick="addExample('cat3', 0)"/>
<img id="cat4" crossorigin src="http://127.0.0.1:8080/cat4.jpeg" height='75px' onclick="addExample('cat4', 0)"/>
</div>
<div>
<img id="dog1" crossorigin src="http://127.0.0.1:8080/dog1.jpeg" height='75px' onclick="addExample('dog1', 1)"/>
<img id="dog2" crossorigin src="http://127.0.0.1:8080/dog2.jpeg" height='75px' onclick="addExample('dog2', 1)"/>
<img id="dog3" crossorigin src="http://127.0.0.1:8080/dog3.jpeg" height='75px' onclick="addExample('dog3', 1)"/>
<img id="dog4" crossorigin src="http://127.0.0.1:8080/dog4.jpeg" height='75px' onclick="addExample('dog4', 1)"/>
</div>
<h1>Predict:</h1>
<div>
<img id="iscat" crossorigin src="http://127.0.0.1:8080/cat.jpeg" height="200px" onclick="catordog('iscat')"/>
</div>
<div>
<img id="isdog" crossorigin src="http://127.0.0.1:8080/dog.jpeg" height="200px" onclick="catordog('isdog')"/>
</div>
<div>
<img id="carrot" crossorigin src="http://127.0.0.1:8080/carrot.jpeg" height="200px" onclick="catordog('carrot')"/>
</div>
<script src="finetune.js"></script>
</body>
</html>