|
<!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 background removal</title> |
|
<script type="module" crossorigin src="/assets/index-CN6ihHJN.js"></script> |
|
<link rel="stylesheet" crossorigin href="/assets/index-CX2MTg_Z.css"> |
|
</head> |
|
|
|
<body> |
|
<h1> |
|
Real-time background removal 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/modnet" target="_blank">MODNet</a> |
|
</h4> |
|
<div id="container"> |
|
<video id="video" autoplay muted playsinline></video> |
|
<canvas id="canvas" width="360" height="240"></canvas> |
|
<canvas id="output-canvas" width="360" height="240"></canvas> |
|
</div> |
|
<div id="controls"> |
|
<div> |
|
<label>Image size</label> |
|
(<label id="size-value">256</label>) |
|
<br> |
|
<input id="size" type="range" min="64" max="512" step="32" value="256" disabled> |
|
</div> |
|
</div> |
|
<label id="status"></label> |
|
|
|
|
|
</body> |
|
|
|
</html> |