Skip to content
WebAI

vision / segmentation

Segmentation

Produces a per-pixel mask instead of a box — background removal, portrait effects, cut-outs. Output resolution drives the real cost: the model may be small, but the mask upsampling and canvas compositing run on every frame.

5 entries

Open demo →

Catalog comparison

Entries include models, tools and applications. An upstream example documents a browser integration, not a test on your device. Missing versions, measurements and licenses remain unverified. Historical estimates are not benchmark results.

Catalog comparison
EntryEntry typeFrameworkResourcesLicenseBrowser evidenceLinks

SAM Tiny (ONNX)

Segment Anything Model — quantized mobile variant for the browser.

Tasks: Segmentation

ModelTransformers.js

q8: 13.1 MiB

fp16: 19.8 MiB

fp32: 38.0 MiB

Code license: Apache-2.0

Weight license: Apache-2.0

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
Xenova/slimsam-77-uniform
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
Promptable Segmentation
Package
Not verified
Runtime version
@huggingface/transformers@4.3.0
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Apache-2.0
Legacy license label (unverified)
Apache-2.0

Deployment variants

q8
Download size: 13.1 MiB
Peak runtime memory: Not measured
Quantization / precision: q8
Weight revision: 5850ab45f587c112167512ffef949107115e26a0
Weight artifact ↗
fp16
Download size: 19.8 MiB
Peak runtime memory: Not measured
Quantization / precision: fp16
Weight revision: 5850ab45f587c112167512ffef949107115e26a0
Weight artifact ↗
fp32
Download size: 38.0 MiB
Peak runtime memory: Not measured
Quantization / precision: fp32
Weight revision: 5850ab45f587c112167512ffef949107115e26a0
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

MediaPipe Selfie Segmentation

Lightweight binary segmentation for people in close-up shots.

Tasks: Segmentation

ModelMediaPipe

Download size: 0.2 MiB

Code license: Apache-2.0

Weight license: Not verified

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
Not verified
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
Selfie Segmentation
Package
@mediapipe/selfie_segmentation
Runtime version
@mediapipe/selfie_segmentation@0.1.1675465747
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Not verified
Legacy license label (unverified)
Apache-2.0

Deployment variants

Unspecified variant
Download size: 0.2 MiB
Peak runtime memory: Not measured
Quantization / precision: Not verified
Weight revision: Not verified
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

RMBG-1.4

The most-downloaded background removal model on the Hub, outputting an alpha matte rather than a binary mask. Its license is Bria’s own: free for non-commercial use, commercial use requires an agreement — read it before shipping.

Tasks: Segmentation

ModelTransformers.js

q8: 42.3 MiB

fp16: 84.1 MiB

fp32: 168.0 MiB

Code license: Apache-2.0

Weight license: Other

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
briaai/RMBG-1.4
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
Alpha matte output, General subjects
Package
Not verified
Runtime version
@huggingface/transformers@4.3.0
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Other

Deployment variants

q8
Download size: 42.3 MiB
Peak runtime memory: Not measured
Quantization / precision: q8
Weight revision: 2ceba5a5efaec153162aedea169f76caf9b46cf8
Weight artifact ↗
fp16
Download size: 84.1 MiB
Peak runtime memory: Not measured
Quantization / precision: fp16
Weight revision: 2ceba5a5efaec153162aedea169f76caf9b46cf8
Weight artifact ↗
fp32
Download size: 168.0 MiB
Peak runtime memory: Not measured
Quantization / precision: fp32
Weight revision: 2ceba5a5efaec153162aedea169f76caf9b46cf8
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

MODNet

Trimap-free portrait matting in 12 MB at fp16, which is small enough to run per video frame. It assumes a person in frame: on other subjects the matte degrades rather than failing loudly.

Tasks: Segmentation

ModelTransformers.js

q8: 6.3 MiB

q4f16: 11.3 MiB

fp16: 12.4 MiB

fp32: 24.7 MiB

Code license: Apache-2.0

Weight license: Apache-2.0

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
Xenova/modnet
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
Portrait matting, Trimap-free
Package
Not verified
Runtime version
@huggingface/transformers@4.3.0
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Apache-2.0

Deployment variants

q8
Download size: 6.3 MiB
Peak runtime memory: Not measured
Quantization / precision: q8
Weight revision: fa2fa546052fba4c08921230a26cc69a333fca12
Weight artifact ↗
q4f16
Download size: 11.3 MiB
Peak runtime memory: Not measured
Quantization / precision: q4f16
Weight revision: fa2fa546052fba4c08921230a26cc69a333fca12
Weight artifact ↗
fp16
Download size: 12.4 MiB
Peak runtime memory: Not measured
Quantization / precision: fp16
Weight revision: fa2fa546052fba4c08921230a26cc69a333fca12
Weight artifact ↗
fp32
Download size: 24.7 MiB
Peak runtime memory: Not measured
Quantization / precision: fp32
Weight revision: fa2fa546052fba4c08921230a26cc69a333fca12
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

U²-Netp

The pruned U²-Net at 4.4 MB — the smallest salient-object model worth shipping, and the ancestor of most background-removal pipelines. Output is a coarse saliency map, so it needs refinement for hair and thin edges.

Tasks: Segmentation

ModelTransformers.js

fp32: 4.4 MiB

Code license: Apache-2.0

Weight license: Apache-2.0

Upstream browser example

Reference ↗

Source review is not a browser execution test.

Sources and comparison details
Exact model ID
BritishWerewolf/U-2-Netp
Natural languages
Not specified
Programming languages
Not specified
Other reported capabilities
Salient object detection, 4.4 MB
Package
Not verified
Runtime version
@huggingface/transformers@4.3.0
Execution backend
Not verified
Code license
Apache-2.0
Weight license
Apache-2.0

Deployment variants

fp32
Download size: 4.4 MiB
Peak runtime memory: Not measured
Quantization / precision: fp32
Weight revision: 7112208dbac3a3642496c8d54e2f0f9bb3dc1dc8
Weight artifact ↗

Performance and compatibility measurements

Compare only results with the same task, input, hardware, browser and precision. No ranking is inferred from model size.

Not measured

About Segmentation

Segmentation under Vision holds 5 catalogue entries: 5 models.

5 of them carry browser evidence, all from upstream browser examples.

The usual pattern for this task is to load quantised weights (ONNX, TFLite or a MediaPipe asset bundle) into the page, hand them to Transformers.js and MediaPipe, and accelerate with WebGPU or WebAssembly. What decides the experience is weight size, peak memory and decoding path — not the parameter count.

To see the output first, open the interactive demo for this task: switch models, edit the sample input and compare results on one page. Every demo states whether it is running real weights or a deterministic simulator.

At a glance

Entries
5 in total
Main runtime
Transformers.js and MediaPipe
Smallest known weights
0.2 MiB
Browser evidence
5 of 5 verified

Segmentation: common questions

Can Segmentation run directly in a browser?
Yes. 5 entries already carry browser evidence (tested here or an upstream example), so the approach works; whether it runs smoothly on your device depends on weight size, browser version and whether WebGPU is enabled.
How large is the model for Segmentation?
We verified the weight file sizes of 5 entries in this task; the smallest tier is 0.2 MiB. Quantisation differs between entries, so the real download depends on the precision you pick. Files are reused from the HTTP cache or Cache Storage after the first download.
Which devices suit Segmentation?
Any modern browser with WebAssembly is a starting point, and WebGPU usually makes it faster. Phones are tighter on memory, so run the demo once on the target device before deciding.
Does running a model here upload my data?
The demos on this site infer inside the tab, so inputs never reach a server. Weights and runtimes are fetched from a CDN on first use and then served from the browser cache.

Other tasks in this category

Browse all Vision models →

Read next

All posts →