File size: 1,730 Bytes
d4efd65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566858b
d4efd65
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Transformers.js | WebGPU real-time object detection</title>
  <script type="module" crossorigin src="/assets/index-C2x4uvch.js"></script>
  <link rel="stylesheet" crossorigin href="/assets/index-DMNAdTgA.css">
</head>

<body>
  <h1>
    WebGPU real-time object detection w/
    <a href="http://github.com/xenova/transformers.js" target="_blank">🤗 Transformers.js</a>
  </h1>
  <h4>
    Runs locally in your browser, powered by
    <a href="https://huggingface.co/Xenova/yolos-tiny" target="_blank">YOLOS</a>
  </h4>
  <div id="container">
    <video id="video" autoplay muted playsinline></video>
    <canvas id="canvas" width="360" height="240"></canvas>
    <div id="overlay"></div>
  </div>
  <div id="controls">
    <div title="Read frames from your webcam and process them at a lower size (lower = faster)">
      <label>Stream scale</label>
      (<label id="scale-value">0.5</label>)
      <br>
      <input id="scale" type="range" min="0.1" max="1" step="0.1" value="0.5" disabled>
    </div>
    <div title="The length of the longest edge of the image (lower = faster)">
      <label>Image size</label>
      (<label id="size-value">256</label>)
      <br>
      <input id="size" type="range" min="128" max="1024" step="32" value="256" disabled>
    </div>
    <div>
      <label>Threshold</label>
      (<label id="threshold-value">0.7</label>)
      <br>
      <input id="threshold" type="range" min="0.01" max="1" step="0.01" value="0.7" disabled>
    </div>
  </div>
  <label id="status"></label>


</body>

</html>