-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·251 lines (234 loc) · 15.8 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gesture Capture And Detection</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.js"></script>
</head>
<body class="bg-indigo-50 min-h-screen p-8">
<div class="max-w-4xl mx-auto">
<div class="text-center mb-8">
<h1 class="text-4xl font-bold text-indigo-900 mb-4 flex items-center justify-center gap-2">
<i data-lucide="scan-face" class="w-10 h-10"></i>
Gesture Capture And Detection
<i data-lucide="hand" class="w-10 h-10"></i>
</h1>
<p>Play with computer vision gesture detection!</p>
</div>
<div class="bg-white rounded-3xl shadow-xl p-8 mb-8">
<!-- Camera start button -->
<div class="mb-4 flex justify-end">
<button id="webcamButton" class="bg-indigo-600 text-white px-6 py-3 rounded-lg hover:bg-indigo-700 transition-colors flex items-center gap-2">
<i data-lucide="camera" class="w-5 h-5"></i>
<span>Start Webcam</span>
</button>
</div>
<div id="liveView" class="videoView bg-gradient-to-r from-indigo-50 to-purple-50 rounded-2xl p-8 text-center relative min-h-[475px] flex items-center justify-center">
<!-- Video element -->
<video id="webcam" autoplay playsinline class="hidden"></video>
<!-- Canvas element -->
<canvas id="output_canvas" class="w-full absolute top-0 left-0 right-0 bottom-0"></canvas>
</div>
<div class="space-y-6 mt-8">
<div class="flex items-center gap-2 mb-4">
<i data-lucide="lightbulb" class="w-6 h-6 text-indigo-600"></i>
<h2 class="text-xl font-semibold text-indigo-900">Gesture Tips</h2>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="hand" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">ASL: Hello</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Open palm with fingers extended
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Palm facing forward
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Wave side to side twice
</li>
</ol>
</div>
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="smile" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">ASL: Yes</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Make a fist
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Nod fist up and down
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Repeat nodding motion twice
</li>
</ol>
</div>
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="octagon-x" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">ASL: No</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Extend index and middle fingers
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Touch fingers to thumb
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Repeat closing motion twice
</li>
</ol>
</div>
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="heart-handshake" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">ASL: Thank You</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Start with flat palm near chin
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Keep fingers together and extended
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Move hand forward and down
</li>
</ol>
</div>
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="brain" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">Mind Blown Gesture</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Join fingertips together
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Place hands at your temples
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Spread fingers outward explosively
</li>
</ol>
</div>
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="brain-circuit" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">Thinking Gesture</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Place your hand under your chin
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Hold the pose naturally
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Wait for detection
</li>
</ol>
</div>
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="message-circle-off" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">Silence Gesture</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Keep lips closed together
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Move your index finger across your lips
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Wait for detection
</li>
</ol>
</div>
<div class="bg-gradient-to-br from-indigo-50 to-purple-50 rounded-xl p-6 shadow-lg hover:shadow-xl transition-shadow">
<div class="flex items-center gap-3 mb-4">
<i data-lucide="chevrons-left-right-ellipsis" class="w-6 h-6 text-indigo-600"></i>
<h3 class="font-semibold text-lg text-indigo-900">Head Shake Gesture</h3>
</div>
<ol class="space-y-2">
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">1</span>
Look straight at the camera
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">2</span>
Shake your head from side to side
</li>
<li class="flex items-start gap-2">
<span class="bg-purple-100 text-purple-700 rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0 mt-0.5 text-sm">3</span>
Wait for detection
</li>
</ol>
</div>
</div>
</div>
</div>
<div class="bg-green-50 rounded-3xl shadow-xl p-8 mt-8">
<div class="flex items-center gap-2 mb-4">
<i data-lucide="shield-check" class="w-6 h-6 text-green-600"></i>
<h2 class="text-xl font-semibold text-green-900">Privacy First</h2>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="flex items-start gap-2">
<i data-lucide="cpu" class="w-8 h-8 text-green-600 flex-shrink-0 mt-1"></i>
<div>
<h3 class="font-semibold text-green-900 mb-1">100% Local Processing</h3>
<p>All gesture detection runs entirely in your browser. The AI models operate locally on your device - no data ever leaves your computer.</p>
</div>
</div>
<div class="flex items-start gap-3">
<i data-lucide="shield-ban" class="w-8 h-8 text-green-600 flex-shrink-0 mt-1"></i>
<div>
<h3 class="font-semibold text-green-900 mb-1">Zero Data Collection</h3>
<p>We don't collect, store, or transmit any data. Your camera feed is processed in real-time and never saved or sent anywhere.</p>
</div>
</div>
</div>
</div>
</div>
<!-- Load script type="module" -->
<script type="module" src="script.js"></script>
<script>
// Initialize Lucide icons
lucide.createIcons();
</script>
</body>
</html>