-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (45 loc) · 2.1 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Open CV face detection</title>
<link href="./main/style.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"></script><script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/[email protected]"></script>
</head>
<body>
<div id="container">
<canvas class="center-block" id="canvasOutput" width=320 height=240></canvas>
</div>
<div class="text-center">
<p>
<form action="#">
<input type="radio" id="face" name="poop" value="face" checked>
<label for="face">face</label>
<input type="radio" id="eye" name="poop" value="eye">
<label for="eye">eye</label>
</form>
</p>
</div>
<div class="invisible">
<video id="video" class="hidden">Your browser does not support the video tag.</video>
</div>
</div>
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script src="https://threejs.org/examples/js/libs/stats.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.5/dat.gui.min.js"></script>
<script>
var Module = {
wasmBinaryFile: 'https://huningxin.github.io/opencv.js/build/wasm/opencv_js.wasm',
preRun: [function() {
Module.FS_createPreloadedFile('/', 'haarcascade_eye.xml', 'https://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_eye.xml', true, false);
Module.FS_createPreloadedFile('/', 'haarcascade_frontalface_default.xml', 'https://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_frontalface_default.xml', true, false);
Module.FS_createPreloadedFile('/', 'haarcascade_profileface.xml', 'https://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_profileface.xml', true, false);
}],
_main: function() {opencvIsReady();}
};
</script>
<script async src="https://huningxin.github.io/opencv.js/build/wasm/opencv.js"></script>
<script src="./main/script.js"></script>
</body>
</html>