mlboydaisuke commited on
Commit
5d9e51d
·
verified ·
1 Parent(s): 310226f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +12 -4
README.md CHANGED
@@ -8,7 +8,7 @@ tags:
8
  - image-segmentation
9
  - portrait-matting
10
  ---
11
- # modnet_portrait_matting — ExecuTorch XNNPACK
12
 
13
  - **Source**: ZHKKKe/MODNet + DavG25/modnet-pretrained-models ckpt
14
  - **License**: Apache-2.0
@@ -19,15 +19,23 @@ tags:
19
 
20
  All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.
21
 
22
- | precision | file | size (MB) | parity vs fp32 eager (worst corr) | Mac median (ms)* |
23
  |-----------|------|-----------|------------------------------------|------------------|
24
  | fp32 | `modnet_portrait_matting_xnnpack_fp32.pte` | 26.1 | 1.000000 | 64.9 |
25
  | fp16 | `modnet_portrait_matting_xnnpack_fp16.pte` | 24.4 | 1.000000 | 107.8 |
 
 
 
 
 
 
 
 
26
 
27
  \*Mac arm64, single process, median of 10 — a reference point for relative cost
28
  only, not a device number (torch eager fp32 on the same machine: 120.1 ms).
29
 
30
- ### Precisions that did not earn a slot
31
 
32
  - **int8 is not shipped**: measured in the units that matter for this model — mask IoU at 0.5: median 0.9864 over 10 real images, worst 0.5970.
33
 
@@ -44,5 +52,5 @@ XNNPACK delegate coverage (fp32): 94.7% (302/319 ops); ops left on the portable
44
 
45
  ## Conversion
46
 
47
- torch.export -> to_edge_transform_and_lower(XnnpackPartitioner) -> .pte
48
  (conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))
 
8
  - image-segmentation
9
  - portrait-matting
10
  ---
11
+ # modnet_portrait_matting — ExecuTorch
12
 
13
  - **Source**: ZHKKKe/MODNet + DavG25/modnet-pretrained-models ckpt
14
  - **License**: Apache-2.0
 
19
 
20
  All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.
21
 
22
+ | build | file | size (MB) | parity vs fp32 eager (worst corr) | Mac median (ms)* |
23
  |-----------|------|-----------|------------------------------------|------------------|
24
  | fp32 | `modnet_portrait_matting_xnnpack_fp32.pte` | 26.1 | 1.000000 | 64.9 |
25
  | fp16 | `modnet_portrait_matting_xnnpack_fp16.pte` | 24.4 | 1.000000 | 107.8 |
26
+ | Core ML (fp16, iOS) | `modnet_portrait_matting_coreml_all.pte` | 13.8 | 0.999997 | 6.8 |
27
+
28
+
29
+ The Core ML build is the same graph lowered to Apple's Neural Engine instead of
30
+ XNNPACK, which is CPU-only. On an iPhone 17 Pro, Depth-Anything-V2-Small runs
31
+ 500.8 ms through XNNPACK and 42.7 ms through Core ML, at half the file size. It
32
+ computes in fp16 and is iOS-only; the XNNPACK files stay the portable option and
33
+ are what runs on Android.
34
 
35
  \*Mac arm64, single process, median of 10 — a reference point for relative cost
36
  only, not a device number (torch eager fp32 on the same machine: 120.1 ms).
37
 
38
+ ### Builds that did not earn a slot
39
 
40
  - **int8 is not shipped**: measured in the units that matter for this model — mask IoU at 0.5: median 0.9864 over 10 real images, worst 0.5970.
41
 
 
52
 
53
  ## Conversion
54
 
55
+ torch.export -> to_edge_transform_and_lower(partitioner) -> .pte
56
  (conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))