-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (47 loc) · 2.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TensorFlow JS Object Detection</title>
<!-- Include TensorFlow.js Library -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<!-- Include TensorFlow.js WASM Backend -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="image-selection">
<img src="./snowboard.jpg" crossOrigin="anonymous" id="snowboard" style="display:none">
<img src="./room.jpg" crossOrigin="anonymous" id="room" style="display:none;">
<img src="./beach.jpg" crossOrigin="anonymous" id="beach" style="display:none;">
<img src="./baseball.jpg" crossOrigin="anonymous" id="baseball" style="display:none;">
</div>
<div id="content-container">
<div id="cropped-images-container">
</div>
<input type="file" id="file-upload" accept="image/*">
<h1>YOLOv8x-68m</h1>
<button id="submit-button" onclick="processImage()">Submit</button>
<div class="backends">
<div class="column">
<h2>Remote CPU</h2>
<input type="text" id="cpu-model-endpoint" placeholder="cpu model endpoint">
<div id="cpu-response-time">Request Time: </div>
<div id="cpu-inference-time">Inference Time: </div>
</div>
<div class="column">
<h2>Browser WASM CPU</h2>
<div id="wasm-browser-inference-time">Inference Time: </div>
</div>
<div class="column">
<h2>Remote WASM CPU</h2>
<input type="text" id="wasm-cpu-model-endpoint" placeholder="wasm model endpoint">
<div id="wasm-cpu-response-time">Request Time: </div>
<div id="wasm-cpu-inference-time">Inference Time: </div>
</div>
</div>
<canvas id="canvas" width="640" height="640" style="border:2px solid black;"></canvas>
</div>
<script src="yolo-web-wasm.js"></script>
</body>
</html>