image-segmentation · vision · Nested-U RSU · onnxruntime-web@1.21.0 WASM · fp32 · 4.57 MB · Apache-2.0

U-2-Netp Salient Cutout Studio

Ultra-compact 4.57 MB salient object segmentation (BritishWerewolf/U-2-Netp, Apache-2.0) running 100% locally on CPU WASM via onnxruntime-web@1.21.0. Nested Residual U-blocks predict seven multi-scale saliency maps (1959–1965) in under a second with zero server uploads.

BritishWerewolf/U-2-Netp image-segmentation WASM · fp32 · 4.57 MB input.1 [1,3,320,320] Apache-2.0

Split wipe & live post-processing (0 ms)

50%

Loading starter photograph…

Inside U-2-Netp

Alpha distribution (16 bins · log scale)

BG (0.0–0.1) Soft edge (0.1–0.9) FG (0.9–1.0)

Verified ONNX runtime contract

Repository
BritishWerewolf/U-2-Netp (Apache-2.0)
Weight file
onnx/model.onnx · 4,574,861 B (4.57 MB fp32)
Runtime
onnxruntime-web@1.21.0 · CPU WASM EP (Web Worker)
Why raw ORT
Transformers.js 3.7.5 lacks U2NetImageProcessor
Input tensor
input.1 [1, 3, 320, 320] ImageNet RGB letterbox
Outputs
7 maps: 1959 (d0 fused) + 1960–1965 (d1–d6 RSU)
Show the code — ImageNet RGB CHW preprocessing (rgbaToU2NetFloat32CHW)
Show the code — Off-main-thread onnxruntime-web@1.21.0 7-output inference

Explore the U-2-Netp use-case ladder