-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
135 lines (121 loc) · 3.9 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<title>FingerPose Example</title>
<!-- Importação do tensorflow, é meio que o coração dele-->
<script src="https://unpkg.com/@tensorflow/tfjs-core@3.7.0/dist/tf-core.js"></script>
<!-- Importação do webgl, modelo de aceleração das animações do browser -->
<script src="https://unpkg.com/@tensorflow/tfjs-backend-webgl@3.7.0/dist/tf-backend-webgl.js"></script>
<!-- Modelo do handpose para detectar as mãos -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/hand-pose-detection@2.0.0/dist/hand-pose-detection.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/hands@0.4.1646424915/hands.min.js"></script>
<!-- The fingerpose library -->
<script src="https://cdn.jsdelivr.net/npm/fingerpose@0.1.0/dist/fingerpose.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="/style/style.css">
<link rel="stylesheet" href="/style/style-mobile.css">
</head>
<body>
<div class="container">
<div class="debug">
<h2>Left Hand</h2>
<table id="summary-left" class="summary">
<thead>
<tr>
<th>Idx</th>
<th>Finger</th>
<th style="width: 110px">Curl</th>
<th style="width: 170px">Direction</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>Thumb</td>
<td><span id="curl-0">-</span></td>
<td><span id="dir-0">-</span></td>
</tr>
<tr>
<td>1</td>
<td>Index</td>
<td><span id="curl-1">-</span></td>
<td><span id="dir-1">-</span></td>
</tr>
<tr>
<td>2</td>
<td>Middle</td>
<td><span id="curl-2">-</span></td>
<td><span id="dir-2">-</span></td>
</tr>
<tr>
<td>3</td>
<td>Ring</td>
<td><span id="curl-3">-</span></td>
<td><span id="dir-3">-</span></td>
</tr>
<tr>
<td>4</td>
<td>Pinky</td>
<td><span id="curl-4">-</span></td>
<td><span id="dir-4">-</span></td>
</tr>
</tbody>
</table>
<br>
<h2>Right Hand</h2>
<table id="summary-right" class="summary">
<thead>
<tr>
<th>Idx</th>
<th>Finger</th>
<th style="width: 110px">Curl</th>
<th style="width: 170px">Direction</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>Thumb</td>
<td><span id="curl-0">-</span></td>
<td><span id="dir-0">-</span></td>
</tr>
<tr>
<td>1</td>
<td>Index</td>
<td><span id="curl-1">-</span></td>
<td><span id="dir-1">-</span></td>
</tr>
<tr>
<td>2</td>
<td>Middle</td>
<td><span id="curl-2">-</span></td>
<td><span id="dir-2">-</span></td>
</tr>
<tr>
<td>3</td>
<td>Ring</td>
<td><span id="curl-3">-</span></td>
<td><span id="dir-3">-</span></td>
</tr>
<tr>
<td>4</td>
<td>Pinky</td>
<td><span id="curl-4">-</span></td>
<td><span id="dir-4">-</span></td>
</tr>
</tbody>
</table>
</div>
<div class="video">
<div id="video-container">
<video id="pose-video" class="layer" playsinline></video>
<canvas id="pose-canvas" class="layer"></canvas>
<div id="pose-result-left" class="layer pose-result"></div>
<br>
<div id="pose-result-right" class="layer pose-result"></div>
</div>
</div>
</div>
<script src="/src/scripts.js" type="module"></script>
</body>
</html>