Sponsored by
Crazyrouter
-The enterprise-grade, cost-effective AI API gateway that provides one API key to access 300+ AI models through OpenAI-compatible endpoints, with
This repository hosts the
U²-Netp
models exported for the
React Native ExecuTorch
library as ExecuTorch
.pte
programs, ready to run on device.
U²-Netp predicts a soft mask for salient foreground objects, including animals
and products as well as people. It does not classify object categories or
separate individual instances.
The exports take RGB float32
[1,3,320,320]
input in
[0,1]
and return one
float32
[1,1,320,320]
foreground logit map. Image-maximum scaling and ImageNet
normalization are included in the graph. RNE applies sigmoid and returns an
opaque RGBA grayscale mask; use its foreground intensity as an alpha mask when
compositing the original image. Fine structures can be missed. FP16 favors
speed and may shift mask boundaries; FP32 preserves the reference more closely.
Precision notes
The INT8 variant selectively quantizes four expensive convolutions with static
INT8 activations and per-channel INT8 weights. Sensitive layers and skip
connections remain FP32; public input and output types are unchanged.
On an Apple M1 Pro, interleaved ExecuTorch runs measured
87 ms
median versus
156 ms
for FP32 (1.78× faster; 30 runs after five warm-ups). Device speedups
will vary. Across 13 images outside calibration, exported masks averaged
0.9953 IoU
against FP32 (minimum 0.9868), at a foreground threshold of 0.5.
These measure export agreement, not accuracy against ground-truth masks.
Choose FP32 when boundary precision matters.
Full-network INT8 remains unpublished because it loses substantial foreground
detail.
Vulkan FP16 preserves input normalization and one sensitive convolution in FP32.
On a Galaxy S20+ (Android 13, Mali), native forward medians were 337 ms for this
variant, versus 316 ms for XNNPACK FP32 and 189 ms for selective INT8. Android uses the standard Vulkan-first default when the Vulkan backend is
linked. Performance varies by device. Across 13 device-tested images, Vulkan FP16 averaged 0.9945 mask IoU
against FP32 (minimum 0.9854).
These files are published for the
ExecuTorch v1.4.1
runtime. ExecuTorch
gives no forward compatibility guarantee, so an older runtime may fail to load
them. CoreML requires iOS 18 / macOS 15 or newer; full RNE execution and
performance still require validation on the target device.
To use them in React Native ExecuTorch, pass
models.semanticSegmentation.U2NETP.DEFAULT
to
useSemanticSegmenter
or
createSemanticSegmenter
. See the
documentation
.
To load these files in your own ExecuTorch runtime, read the
compatibility note
first.
Runs of software-mansion U2NetP-ExecuTorch on huggingface.co
252
Total runs
0
24-hour runs
17
3-day runs
241
7-day runs
241
30-day runs
More Information About U2NetP-ExecuTorch huggingface.co Model
U2NetP-ExecuTorch huggingface.co is an AI model on huggingface.co that provides U2NetP-ExecuTorch's model effect (), which can be used instantly with this software-mansion U2NetP-ExecuTorch model. huggingface.co supports a free trial of the U2NetP-ExecuTorch model, and also provides paid use of the U2NetP-ExecuTorch. Support call U2NetP-ExecuTorch model through api, including Node.js, Python, http.
U2NetP-ExecuTorch huggingface.co is an online trial and call api platform, which integrates U2NetP-ExecuTorch's modeling effects, including api services, and provides a free online trial of U2NetP-ExecuTorch, you can try U2NetP-ExecuTorch online for free by clicking the link below.
software-mansion U2NetP-ExecuTorch online free url in huggingface.co:
U2NetP-ExecuTorch is an open source model from GitHub that offers a free installation service, and any user can find U2NetP-ExecuTorch on GitHub to install. At the same time, huggingface.co provides the effect of U2NetP-ExecuTorch install, users can directly use U2NetP-ExecuTorch installed effect in huggingface.co for debugging and trial. It also supports api for free installation.