Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- executorch
|
| 5 |
+
- xnnpack
|
| 6 |
+
- pte
|
| 7 |
+
- on-device
|
| 8 |
+
- image-segmentation
|
| 9 |
+
- portrait-matting
|
| 10 |
+
---
|
| 11 |
+
# modnet_portrait_matting — ExecuTorch XNNPACK
|
| 12 |
+
|
| 13 |
+
`modnet_portrait_matting_xnnpack_fp32.pte` (26.1 MB, fp32, XNNPACK-delegated)
|
| 14 |
+
|
| 15 |
+
- **Source**: ZHKKKe/MODNet + DavG25/modnet-pretrained-models ckpt
|
| 16 |
+
- **License**: Apache-2.0
|
| 17 |
+
- **Input**: [[1, 3, 512, 512]] — RGB [-1,1], 512x512
|
| 18 |
+
- **Output**: alpha matte [1,1,512,512] 0-1
|
| 19 |
+
|
| 20 |
+
## Verification (Mac arm64, executorch 1.4.0, torch 2.13.0)
|
| 21 |
+
|
| 22 |
+
Parity vs torch fp32 eager on random input:
|
| 23 |
+
|
| 24 |
+
| output | shape | max_abs_diff | corr |
|
| 25 |
+
|--------|-------|--------------|------|
|
| 26 |
+
| 0 | [1, 1, 512, 512] | 1.572e-04 | 1.000000 |
|
| 27 |
+
|
| 28 |
+
Median latency over 10 runs (single Mac process, reference only — device numbers to follow):
|
| 29 |
+
ExecuTorch 69.5 ms vs torch eager 120.2 ms.
|
| 30 |
+
|
| 31 |
+
## Conversion
|
| 32 |
+
|
| 33 |
+
torch.export -> to_edge_transform_and_lower(XnnpackPartitioner) -> .pte
|
| 34 |
+
(conversion scripts: `convert/` in the conversion repo)
|