mediapipe-pose-demo / index.html
gustavo_malmoria
add code
9b56ece
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Curl Detector</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet">
<script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>
</script>
<body>
<h1>Excercise counter with Mediapipe</h1>
<section id="demos" class="invisible">
<p>Stand in front of your webcam to get real-time pose landmarker detection.</br>Click <b>enable webcam</b> below and grant access to the webcam if prompted.</p>
<div id="liveView" class="videoView">
<button id="webcamButton" class="mdc-button mdc-button--raised">
<span class="mdc-button__ripple"></span>
<span class="mdc-button__label">ENABLE WEBCAM</span>
</button>
<button id="startButton" class="mdc-button mdc-button--raised">
START COUNTING
</button>
<button id="stopButton" class="mdc-button mdc-button--raised">
STOP COUNTING
</button>
<button id="restartButton" class="mdc-button mdc-button--raised">
RESTART COUNTING
</button>
<div style="position: relative;">
<video id="webcam" style="width: 1280px; height: 720px; position: abso" autoplay playsinline></video>
<canvas class="output_canvas" id="output_canvas" width="1280" height="720" style="position: absolute; left: 0px; top: 0px;"></canvas>
</div>
</div>
<fieldset>
<legend>Choose your excercise</legend>
<div>
<input type="radio" id="curl" name="excercise" value="curl" />
<label for="curl">curl</label>
</div>
<div>
<input type="radio" id="squat" name="excercise" value="squat" />
<label for="squat">squat</label>
</div>
</fieldset>
<div id="counter"></div>
</section>
<script type="module" src="./script.js"></script>
</body>
</html>