-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (63 loc) · 2.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>tfjs-yolo demo</title>
</head>
<body>
<div id="my_camera" style="display: none"></div>
<script type="text/javascript" src="/static/js/utils/webcam.min.js"></script>
<script language="JavaScript">
Webcam.set({
width: 320,
height: 240,
image_format: 'jpeg',
jpeg_quality: 90
});
Webcam.attach( '#my_camera' );
</script>
<!-- A button for taking snaps -->
<!-- Code to handle taking the snapshot and displaying it locally -->
<script language="JavaScript">
function take_snapshot() {
// take snapshot and get image data
Webcam.snap( function(data_uri) {
// display results in page
document.getElementById("base64img").value = data_uri
} );
}
</script>
<h1>Object Detection Using TFJS By Bottle</h1>
<div class="container">
<div id="webcam-wrapper">
<div id="loader"></div>
<div id="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<div id="rects"></div>
<video autoplay playsinline muted id="webcam"></video>
</div>
</div>
<div class="container">
<div class="button-group">
<div id="v3"> </div>
<div id="v1tiny"></div>
<button id="v2tiny">Click to start</button>
<div id="v3tiny"></div>
</div>
</div>
<script type="text/javascript" src="/static/dist/bundle.js"></script>
<div>
<form method="POST" action="/index" enctype="multipart/form-data">
<input type="hidden" name="base64img" id="base64img">
<input type="button" value="Submit" onclick="take_snapshot()"> </br> </br>
</form>
</div>
</body>
</html>