1_MobileNet_webcam
- Source name
- 1_MobileNet_webcam.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"></script>
<script src="webcam.js" lang="js"></script>
<script src="rps-dataset.js"></script>
<body>
<h1>Hand Sign Classifier!</h1>
<div>
<div>
<video autoplay playsinline muted id="wc" width="800" height="500"></video>
</div>
</div>
<button ty pe="button" id="0" onclick="handleButton(this)">Rock</button>
<button type="button" id="1" onclick="handleButton(this)">Paper</button>
<button type="button" id="2" onclick="handleButton(this)">Scissors</button>
<div id="rockSamples"> Rock Samples : </div>
<div id="paperSamples"> Paper Samples : </div>
<div id="scissorSamples"> Scissor Samples : </div>
<button type="button" id="train" onclick="doTraining()">Train Network</button>
<div id="dummy">Once training is complete, click 'Start Predicting' to see predictions,
and 'Stop Predicting' to end</div>
<button type="button" id="startPredicting" onclick="startPredicting()">Start Predicting</button>
<button type="button" id="stopPredicting" onclick="stopPredicting()">Stop Predicting</button>
<h1>
<div id="prediction"></div>
</h1>
</body>
<script src="index.js"></script>
</html>