Downloads · 30 days
163
34% of all-time downloads
wide-video/szl-BEN2-ONNX-v1.0.0
szl-BEN2-ONNX-v1.0.0 is a image segmentation model from wide-video. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for transformers.js. The card lists the license as mit.
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
Downloads · 30 days
163
34% of all-time downloads
All-time downloads
474
Public
Repo size
865 MB
Likes
0
Public
Click a slice to open those files.
.onnx865 MB · 100%
From the Hugging Face model README
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
Example: Remove background of an image
import { pipeline } from '@huggingface/transformers';
const segmenter = await pipeline('background-removal', 'onnx-community/BEN2-ONNX');
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/woman-with-afro_medium.jpg';
const output = await segmenter(url);
output[0].save('mask.png');
// You can also use `output[0].toCanvas()` or `await output[0].toBlob()` if you would like to access the output without saving.
| Input | Output |
|---|---|