forked from microsoft/onnxruntime-inference-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (78 loc) · 2.63 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
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous" />
<script type="module" src="dist/index.js"></script>
<style>
/* Add rounded corners to blocks */
.rounded-block {
border-radius: 10px;
border: 1px solid #ccc;
padding: 20px;
position: relative;
}
/* Move text inside the border */
.rounded-block h4 {
position: absolute;
top: 00%;
left: 50%;
transform: translate(-50%, -50%);
padding: 5px 10px;
background-color: #212529;
font-size: 18px;
}
.higlight {
display: inline-block;
}
.higlight:hover {
border: 1px solid red;
}
</style>
</head>
<body data-bs-theme="dark">
<title>segment anything example</title>
<div class="container-fluid">
<h2>segment anything example</h2>
<br>
<div style="display: none;">
<img id="original-image" src="EgyptianCat.png" />
</div>
<div>
<div class="row">
<div class="col">
<canvas id="img_canvas"></canvas>
</div>
<div class="col">
<div class="rounded-block" style="margin-top: 40px; max-width: 200px;">
<h4>Latencies</h4>
<div style="margin-top: 10px;">
encoder: <div id="encoder_latency" class="higlight"></div>
</div>
<div style="margin-top: 10px;">
decoder: <div id="decoder_latency" class="higlight"></div>
</div>
</div>
<div style="margin-top: 40px;">
<form>
<div class="form-group ">
<input title="Upload Image" type="file" id="file-in" name="file-in"
accept=".jpg, .png, .jpeg, .gif, .bmp, .tif, .tiff|image/*">
</div>
</form>
<div class="form-group ">
<button id="cut-button" type="button" class="btn btn-primary">Cut</button>
<button id="clear-button" type="button" class="btn btn-primary">Clear</button>
</div>
<div style="margin-top: 30px;">
<div>Other providers:</div>
<a href="index.html?provider=wasm&model=sam_b_int8">wasm</a>
<a href="index.html?provider=webgpu&model=sam_b">webgpu</a>
</div>
</div>
<p class="text-lg-start">
<div id="status" style="font: 1em consolas;"></div>
</p>
</div>
</body>