Xenova / slimsam-77-uniform

huggingface.co
Total runs: 8.9K
24-hour runs: 0
7-day runs: 149
30-day runs: 1.7K
Model's Last Updated: December 13 2024
mask-generation

Introduction of slimsam-77-uniform

Model Details of slimsam-77-uniform

https://huggingface.co/nielsr/slimsam-77-uniform with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

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

npm i @xenova/transformers

Example: Perform mask generation with Xenova/slimsam-77-uniform .

import { SamModel, AutoProcessor, RawImage } from '@xenova/transformers';

// Load model and processor
const model = await SamModel.from_pretrained('Xenova/slimsam-77-uniform');
const processor = await AutoProcessor.from_pretrained('Xenova/slimsam-77-uniform');

// Prepare image and input points
const img_url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/corgi.jpg';
const raw_image = await RawImage.read(img_url);
const input_points = [[[340, 250]]] // 2D localization of a window

// Process inputs and perform mask generation
const inputs = await processor(raw_image, input_points);
const outputs = await model(inputs);

// Post-process masks
const masks = await processor.post_process_masks(outputs.pred_masks, inputs.original_sizes, inputs.reshaped_input_sizes);
console.log(masks);
// [
//   Tensor {
//     dims: [ 1, 3, 410, 614 ],
//     type: 'bool',
//     data: Uint8Array(755220) [ ... ],
//     size: 755220
//   }
// ]
const scores = outputs.iou_scores;
console.log(scores);
// Tensor {
//   dims: [ 1, 1, 3 ],
//   type: 'float32',
//   data: Float32Array(3) [
//     0.8350210189819336,
//     0.9786665439605713,
//     0.8379436731338501
//   ],
//   size: 3
// }

You can then visualize the generated mask with:

const image = RawImage.fromTensor(masks[0][0].mul(255));
image.save('mask.png');

image/png

Next, select the channel with the highest IoU score, which in this case is the second (green) channel. Intersecting this with the original image gives us an isolated version of the subject:

image/gif

Demo

We've also got an online demo, which you can try out here .


Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx ).

Runs of Xenova slimsam-77-uniform on huggingface.co

8.9K
Total runs
0
24-hour runs
149
3-day runs
149
7-day runs
1.7K
30-day runs

More Information About slimsam-77-uniform huggingface.co Model

slimsam-77-uniform huggingface.co

slimsam-77-uniform huggingface.co is an AI model on huggingface.co that provides slimsam-77-uniform's model effect (), which can be used instantly with this Xenova slimsam-77-uniform model. huggingface.co supports a free trial of the slimsam-77-uniform model, and also provides paid use of the slimsam-77-uniform. Support call slimsam-77-uniform model through api, including Node.js, Python, http.

slimsam-77-uniform huggingface.co Url

https://huggingface.co/Xenova/slimsam-77-uniform

Xenova slimsam-77-uniform online free

slimsam-77-uniform huggingface.co is an online trial and call api platform, which integrates slimsam-77-uniform's modeling effects, including api services, and provides a free online trial of slimsam-77-uniform, you can try slimsam-77-uniform online for free by clicking the link below.

Xenova slimsam-77-uniform online free url in huggingface.co:

https://huggingface.co/Xenova/slimsam-77-uniform

slimsam-77-uniform install

slimsam-77-uniform is an open source model from GitHub that offers a free installation service, and any user can find slimsam-77-uniform on GitHub to install. At the same time, huggingface.co provides the effect of slimsam-77-uniform install, users can directly use slimsam-77-uniform installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

slimsam-77-uniform install url in huggingface.co:

https://huggingface.co/Xenova/slimsam-77-uniform

Url of slimsam-77-uniform

slimsam-77-uniform huggingface.co Url

Provider of slimsam-77-uniform huggingface.co

Xenova
ORGANIZATIONS

Other API from Xenova

huggingface.co

Total runs: 521.1K
Run Growth: -180.2K
Growth Rate: -34.58%
Updated:August 28 2025
huggingface.co

Total runs: 125.8K
Run Growth: 97.8K
Growth Rate: 77.75%
Updated:February 11 2026
huggingface.co

Total runs: 97.2K
Run Growth: 11.6K
Growth Rate: 11.95%
Updated:December 17 2025
huggingface.co

Total runs: 52.2K
Run Growth: -1.8K
Growth Rate: -3.45%
Updated:July 22 2025
huggingface.co

Total runs: 33.7K
Run Growth: 2.6K
Growth Rate: 7.78%
Updated:July 12 2025
huggingface.co

Total runs: 30.1K
Run Growth: 4.7K
Growth Rate: 15.68%
Updated:June 25 2025
huggingface.co

Total runs: 20.5K
Run Growth: 9.0K
Growth Rate: 43.83%
Updated:July 11 2025
huggingface.co

Total runs: 20.3K
Run Growth: 889
Growth Rate: 4.38%
Updated:June 30 2025
huggingface.co

Total runs: 12.8K
Run Growth: -22
Growth Rate: -0.17%
Updated:July 26 2025
huggingface.co

Total runs: 9.4K
Run Growth: -130
Growth Rate: -1.38%
Updated:October 27 2025
huggingface.co

Total runs: 9.3K
Run Growth: -1.0K
Growth Rate: -10.86%
Updated:June 25 2025
huggingface.co

Total runs: 8.8K
Run Growth: 1.3K
Growth Rate: 14.50%
Updated:July 11 2025
huggingface.co

Total runs: 6.9K
Run Growth: -305.8K
Growth Rate: -4430.60%
Updated:August 28 2025
huggingface.co

Total runs: 6.3K
Run Growth: 887
Growth Rate: 15.09%
Updated:January 09 2026
huggingface.co

Total runs: 5.1K
Run Growth: 1.6K
Growth Rate: 32.11%
Updated:August 19 2025
huggingface.co

Total runs: 4.7K
Run Growth: -2.5K
Growth Rate: -51.82%
Updated:August 28 2025
huggingface.co

Total runs: 2.9K
Run Growth: 2.6K
Growth Rate: 87.96%
Updated:July 11 2025
huggingface.co

Total runs: 2.7K
Run Growth: -159
Growth Rate: -5.95%
Updated:August 19 2025
huggingface.co

Total runs: 2.6K
Run Growth: 252
Growth Rate: 9.68%
Updated:July 01 2025
huggingface.co

Total runs: 2.6K
Run Growth: -189
Growth Rate: -7.35%
Updated:June 25 2025
huggingface.co

Total runs: 2.3K
Run Growth: 409
Growth Rate: 17.74%
Updated:October 08 2024
huggingface.co

Total runs: 2.2K
Run Growth: -963
Growth Rate: -43.20%
Updated:July 22 2025
huggingface.co

Total runs: 1.9K
Run Growth: 459
Growth Rate: 24.29%
Updated:December 17 2025