Downloads · 30 days
33
2% of all-time downloads
square-zero-labs/BEN2-ONNX
BEN2-ONNX is a image segmentation model from square-zero-labs. 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
33
2% of all-time downloads
All-time downloads
1.7K
Public
Repo size
1.1 GB
Likes
1
Trending 1
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 |
|---|---|