Ormbg ONNX
If you haven't already, you can install the Transformers.js JavaScript library from NPM using: npm i @huggingface/transformers
Modellquelle
- Art
- Other
- Dateigröße
- 42,3–168 MB
- Basismodell
- schirrmacher/ormbg
- Version
- vRevision 034e2d8
- Aktualisiert
- 9. Okt. 2026
- Downloads
- 18.397
- Quelle
- Hugging Face
Quellenbeschreibung
Usage (Transformers.js)
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/ormbg-ONNX');
const url = 'https://images.pexels.com/photos/5965592/pexels-photo-5965592.jpeg?auto=compress&cs=tinysrgb&w=1024';
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.
Quellen
1 Quelle
Quellen
1 QuelleVerifiziert 9. Okt.
Modellartefakte
8 Artefakte
Modellartefakte
8 ArtefakteQuellenauszüge
3 Auszüge
Quellenauszüge
3 Auszüge--- license: apache-2.0 base_model: - schirrmacher/ormbg pipeline_tag: image-segmentation library_name: transformers.js tags: - background-removal --- ## Usage (Transformers.js) If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using: ```bash npm i @huggingface/transformers ``` **Example**: Remove background of an image ```js import { pipeline } from '@huggingface/transformers'; const segmenter = await pipeline('background-removal', 'onnx-community/ormbg-ONNX'); const url = 'https://images.pexels.com/photos/5965592/pexels-photo-5965592.jpeg?auto=compress&cs=tinysrgb&w=1024'; 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. ```
Source context: 18397 downloads · 11 likes · Pipeline image-segmentation · Library transformers.js · Repo onnx-community/ormbg-ONNX
Source context: 8724 downloads · 10 likes · Pipeline image-segmentation · Library transformers.js · Repo onnx-community/ormbg-ONNX
