forked from rhammell/mnist-draw
-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
56 lines (53 loc) · 2.28 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MNIST Draw</title>
<link rel="stylesheet" href="css/custom.css">
</head>
<body>
<a href="https://bit.ly/mco-mnist-draw"><img class="header" height="100" src="tf.js_mnist.png"></a>
<p class="header text">
Draw a digit by hand and have it classified in real time, as you draw, by a machine learning model trained against
the <a href="https://en.wikipedia.org/wiki/MNIST_database">MNIST</a> dataset.
The model used for this page is a convolutional neural network (CNN) built using Keras/TensorFlow on a
Google Tensor Processing Unit (TPU). It's explained in depth and is available for you to build for
yourself at <a href="https://bit.ly/mco-mnist-lab">bit.ly/mco-mnist-lab</a>.
Source code on <a href="https://github.com/marcacohen/mnist-draw">Github</a>.
</p>
<div class="container">
<div class="content">
<div id="drawing-space">
<div id="model-load" style="height: 336;
width: 336;
background-color: #0000000d;
position: absolute;
z-index: 1;
text-align: center;">
Loading model...
</div>
<canvas id="canvas" width="336" height="336"></canvas>
</div>
<div class="instructions panel text">
<p>Draw a single digit (0-9) in the empty box.</p>
<button class="text" id="clear-canvas" onclick="this.blur()">Clear</button>
<div>
<svg id="svg-chart"></svg>
</div>
</div>
</div>
<canvas id="scaled-canvas" style="display:none" width="28" height="28"></canvas>
</div>
<div class="footer">
<br>
Made with <span id="heart">♥</span> by <a href="https://mco.dev">Marc</a>.
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="js/fabric.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.2.3"> </script>
<script src="js/custom.js"></script>
</body>
</html>