CoolFace
Modelpublic

mlboydaisuke/PIDNet-S-Cityscapes-ExecuTorch

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes62downloads
Model Card

pidnetscityscapes — ExecuTorch

  • Source: XuJiacong/PIDNet + oenpu/PIDNetSenlightfriendlyonnx weights
  • License: MIT
  • Input: [[1, 3, 1024, 1024]] — RGB, ImageNet norm, 1024x1024
  • Output: class logits [1,19,128,128] (argmax + upsample in app)

Variants

All variants take and return fp32 tensors — swap the .pte file, keep your app code.

buildfilesize (MB)parity vs fp32 eager (worst corr)Mac median (ms)*
fp32pidnet_s_cityscapes_xnnpack_fp32.pte30.51.00000027.6
Core ML (fp16, iOS)pidnet_s_cityscapes_coreml_all.pte15.80.9999986.1

The Core ML build is the same graph lowered to Apple's Neural Engine instead of XNNPACK, which is CPU-only. Measured on an iPhone 17 Pro across seven models, it runs 3.5x to 13.9x faster (median 12x) at roughly half the file size — for example Depth-Anything-V2-Small at 500.8 ms against 42.7 ms, and MODNet at 81.7 ms against 5.9 ms. It computes in fp16 and is iOS-only; the XNNPACK files stay the portable option and are what runs on Android.

\*Mac arm64, single process, median of 10 — a reference point for relative cost only, not a device number (torch eager fp32 on the same machine: 64.5 ms).

Builds that did not earn a slot

  • fp16 is not shipped: it comes out at 100% of the fp32 file (30.5 MB vs 30.5 MB), so it buys nothing. XNNPACK serializes convolution weights as fp32 no matter what dtype the graph carries, so on a conv-heavy model fp16 saves no disk and only adds cast operations. Reach for int8 here, not fp16.
  • int8 is not shipped: measured in the units that matter for this model — fraction of pixels keeping their class: median 0.9802 over 10 real images, worst 0.8997.

Verification (executorch 1.4.0, torch 2.13.0)

Parity is measured against the fp32 eager model on real image input; corr is the correlation over all elements of each output tensor.

outputshapemax_abs_diffcorr
0[1, 19, 128, 128]1.696e-051.000000

XNNPACK delegate coverage (fp32): 96.3% (263/273 ops); ops left on the portable kernels: dim_order_ops._to_dim_order_copy.default x3, aten.avg_pool2d.default x3, aten.sum.dim_IntList x2, aten.unsqueeze_copy.default x2

Conversion

torch.export -> toedgetransformandlower(partitioner) -> .pte (conversion scripts: executorch-models)

<!-- funnel:v1 -->


More models in this format: ExecuTorch Model Zoo — 31 models, each with the recipe that produced it.

Want a different model on-device? Open a request — free, open weights only; the export and its measured numbers get published publicly.

<!-- /funnel:v1 -->