-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv1.html
122 lines (92 loc) · 4.56 KB
/
v1.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sit Straight, an teachable machine experiment</title>
<meta name="description" content="Teachable Browser">
<meta name="author" content="Atharva Patil">
<link rel="shortcut icon" href="./img/favicon.png">
<!-- more documentation at https://github.com/googlecreativelab/teachablemachine-libraries -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.3.1/dist/tf.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@teachablemachine/pose@0.8/dist/teachablemachine-pose.min.js"></script>
<!-- <link href="https://fonts.googleapis.com/css?family=Barlow:400,500,600,700&display=swap" rel="stylesheet"> -->
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lora:400,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<script src="js/teachable-machine.js"></script>
<!-- This is the site introduction page div -->
<div id="intro-wrapper" class="intro-wrapper">
<!-- Letft side text -->
<div class="intro-text">
<h1>Sit straight</h1>
<h4>An teachable machine experiment which forces you to sit straight while watching
videos.
<br><br>
If you tilt your head or don't sit straight the video blurs out making it
impossible for you to watch the video unless you sit straight.
</h4>
<p>Adjust your position to the face marker & begin the experiment</p>
<div class="actions">
<button type="button" id="start-app" >View Experiment</button>
<button type="button" id="begin-tutorial">How it works?</button>
</div>
</div>
<!-- Right side images -->
<div class="intro-images">
<!-- <img src="./img/intro/intro.png" class="item-1" alt="Image 1"> -->
<img src="./img/intro/intro-1.png" class="item-1" alt="Image 1">
<img src="./img/intro/intro-2.png" class="item-2" alt="Image 1">
<img src="./img/intro/intro-3.png" class="item-3" alt="Image 1">
<canvas height="240" width="240" id="thecanvas" class="item-4"></canvas>
</div>
</div>
<!-- This wrapper contain all the tutorial explainers -->
<div id="tutorial-wrapper">
<div class="tutorial-text">
<h1>How it works ...</h1>
<ul>
<li>Using webcam & machine learning, keypoints <sup>[1]</sup> relevant to the face & shoulder are identified.</li>
<li>The algorithm is trained to identify good <sup>[2]</sup> & bad <sup>[3]</sup> poses, independent of users.</li>
<li>When bad poses are identified the screen blurs out. Try adjusting your position to the face marker <sup>[4]</sup> & click to continue.</li>
</ul>
<button type="button" id="start-exp">View Experiment</button>
</div>
<div class="tutorial-images">
<img src="./img/tutorial/keypoints.png" class="tut-1" alt="Image 1">
<img src="./img/tutorial/good.png" class="tut-2" alt="Image 1">
<img src="./img/tutorial/bad.png" class="tut-3" alt="Image 1">
<canvas height="240" width="240" id="othercanvas" class="tut-4"></canvas>
</div>
<video id="thevideo" height="240" width="240" style="display: none;"></video>
<video id="othervideo" height="240" width="240" style="display: none;"></video>
</div>
<!-- This contains loading state graphs for when the model is loading -->
<div id="loading-wrapper">
<div class="loading" id="loading">Please wait till model loads</div>
</div>
<!-- This contains the youtube embed & search bar -->
<div id="app-wrapper">
<div class="inputs" id="inputs">
<input type="text" name="fname" value="Enter youtube link here" id="youtube-url">
<button id="search_button" onclick="handleVideoUpdate()">
<img src="./img/search-icon.svg" width="32px" height="inherit" />
</button>
</div>
<div class="embed-video" id="embed-video">
<div>
<iframe width="800" height="540" id="vid" src="https://www.youtube.com/embed/kNCPdkWhpSU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="tensorflow" id="tensorflow">
<div><canvas id='canvas'></canvas></div>
<div id='label-container'></div>
</div>
<div class="footer">
<p><a href="https://atharvapatil.github.io/" target="_blank"> Made by Atharva Patil</a></p>
</div>
</body>
</html>