Run this model with HF Jobs

Run onnx-community/sapiens-seg-0.3b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/onnx-community/sapiens-seg-0.3b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/onnx-community/sapiens-seg-0.3b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Semantic segmentation with onnx-community/sapiens-seg-0.3b.

import { pipeline } from '@huggingface/transformers';

const segmenter = await pipeline('image-segmentation', 'onnx-community/sapiens-seg-0.3b');

const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/ryan-gosling.jpg';
const output = await segmenter(url);
console.log(output)
// [
//   {
//     score: null,
//     label: 'Background',
//     mask: RawImage { ... }
//   },
//   {
//     score: null,
//     label: 'Apparel',
//     mask: RawImage { ... }
//   },
//   ...
// ]

You can visualize the outputs with:

for (const l of output) {
  l.mask.save(`${l.label}.png`);
}
Downloads last month
247
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support