transformers.js/examples/video-object-detection/index.html

43 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transformers.js | Real-time object detection</title>
</head>
<body>
<h1>
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://github.com/WongKinYiu/yolov9" target="_blank">YOLOv9</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>
<label>Image size</label>
(<label id="size-value">128</label>)
<br>
<input id="size" type="range" min="64" max="256" step="32" value="128" disabled>
</div>
<div>
<label>Threshold</label>
(<label id="threshold-value">0.25</label>)
<br>
<input id="threshold" type="range" min="0.01" max="1" step="0.01" value="0.25" disabled>
</div>
</div>
<label id="status"></label>
<script type="module" src="/main.js"></script>
</body>
</html>