bhanc commited on
Commit
d3f79f8
·
verified ·
1 Parent(s): 13d31e3

Keep only the Vulkan FP16 variant

Browse files
README.md CHANGED
@@ -26,7 +26,6 @@ revision `ac7e1c817ecab7c7dff5ce6b1abba61cd213ff29`.
26
  | `xnnpack/u2netp_xnnpack_fp32.pte` | xnnpack | fp32 |
27
  | `xnnpack/u2netp_xnnpack_int8.pte` | xnnpack | selective int8 / fp32 |
28
  | `vulkan/u2netp_vulkan_fp16.pte` | vulkan | fp16 with one fp32 convolution |
29
- | `vulkan/u2netp_vulkan_fp32.pte` | vulkan | fp32 |
30
 
31
  The exports take RGB float32 `[1,3,320,320]` input in `[0,1]` and return one
32
  float32 `[1,1,320,320]` foreground logit map. Image-maximum scaling and ImageNet
@@ -54,8 +53,7 @@ calibration, validation and rejected alternatives.
54
 
55
  Vulkan FP16 preserves input normalization and one sensitive convolution in FP32.
56
  On a Galaxy S20+ (Android 13, Mali), native forward medians were 337 ms for this
57
- variant and 403 ms for Vulkan FP32, versus 316 ms for XNNPACK FP32 and 189 ms
58
- for selective INT8. Vulkan is optional; Android retains its XNNPACK FP32
59
  default. Across 13 device-tested images, Vulkan FP16 averaged 0.9945 mask IoU
60
  against FP32 (minimum 0.9854). See [Vulkan precision notes](vulkan/NOTES.md)
61
  for the export recipe, phone validation and timing limitations.
@@ -67,10 +65,9 @@ config.json 28 B
67
  coreml/config.json 1.5 kB
68
  coreml/u2netp_coreml_fp16.pte 3.3 MB
69
  coreml/u2netp_coreml_fp32.pte 5.5 MB
70
- vulkan/config.json 1.5 kB
71
- vulkan/NOTES.md 4.2 kB
72
  vulkan/u2netp_vulkan_fp16.pte 2.4 MB
73
- vulkan/u2netp_vulkan_fp32.pte 4.6 MB
74
  xnnpack/config.json 1.5 kB
75
  xnnpack/NOTES.md 6.6 kB
76
  xnnpack/u2netp_xnnpack_fp32.pte 4.6 MB
 
26
  | `xnnpack/u2netp_xnnpack_fp32.pte` | xnnpack | fp32 |
27
  | `xnnpack/u2netp_xnnpack_int8.pte` | xnnpack | selective int8 / fp32 |
28
  | `vulkan/u2netp_vulkan_fp16.pte` | vulkan | fp16 with one fp32 convolution |
 
29
 
30
  The exports take RGB float32 `[1,3,320,320]` input in `[0,1]` and return one
31
  float32 `[1,1,320,320]` foreground logit map. Image-maximum scaling and ImageNet
 
53
 
54
  Vulkan FP16 preserves input normalization and one sensitive convolution in FP32.
55
  On a Galaxy S20+ (Android 13, Mali), native forward medians were 337 ms for this
56
+ variant, versus 316 ms for XNNPACK FP32 and 189 ms for selective INT8. Vulkan is optional; Android retains its XNNPACK FP32
 
57
  default. Across 13 device-tested images, Vulkan FP16 averaged 0.9945 mask IoU
58
  against FP32 (minimum 0.9854). See [Vulkan precision notes](vulkan/NOTES.md)
59
  for the export recipe, phone validation and timing limitations.
 
65
  coreml/config.json 1.5 kB
66
  coreml/u2netp_coreml_fp16.pte 3.3 MB
67
  coreml/u2netp_coreml_fp32.pte 5.5 MB
68
+ vulkan/config.json 886 B
69
+ vulkan/NOTES.md 4.1 kB
70
  vulkan/u2netp_vulkan_fp16.pte 2.4 MB
 
71
  xnnpack/config.json 1.5 kB
72
  xnnpack/NOTES.md 6.6 kB
73
  xnnpack/u2netp_xnnpack_fp32.pte 4.6 MB
vulkan/NOTES.md CHANGED
@@ -1,7 +1,7 @@
1
  # Vulkan precision and Android validation
2
 
3
- Both variants accept RGB float32 `[1,3,320,320]` in `[0,1]` and return float32
4
- `[1,1,320,320]` foreground logits. Input normalization stays in FP32. Each
5
  export contains one Vulkan delegate for the network and one portable input
6
  `amax` reduction. Texture limits are capped at 2048 in each dimension.
7
 
@@ -33,10 +33,9 @@ XNNPACK FP32 `.pte`, not ground-truth segmentation accuracy.
33
  | Variant | Mean mask IoU (13 images) | Minimum mask IoU | File size |
34
  | --- | --- | --- | --- |
35
  | Vulkan FP16 with one FP32 convolution | 0.9945 | 0.9854 | 2,437,516 B |
36
- | Vulkan FP32 | 0.999999 | 0.999986 | 4,646,540 B |
37
 
38
- The FP16 probability MAE was at most 0.00444 across those 13 images. Both
39
- variants produced finite outputs on all 15 inputs.
40
 
41
  Warm native forward measurements on the same bicycle input used three warm-up
42
  runs followed by ten measured runs per variant:
@@ -46,7 +45,7 @@ runs followed by ten measured runs per variant:
46
  | XNNPACK FP32 | 315.6 ms |
47
  | XNNPACK selective INT8 | 189.1 ms |
48
  | Vulkan FP16 with one FP32 convolution | 337.2 ms |
49
- | Vulkan FP32 | 403.1 ms |
50
 
51
  These were sequential host-driven device checks, not interleaved benchmarks;
52
  they exclude model loading, image preprocessing and rendering. Vulkan does not
@@ -86,6 +85,6 @@ runpy.run_module("exporter.cli", run_name="__main__")
86
  PY
87
  ```
88
 
89
- The release exports were byte-identical to the device-validated candidates.
90
  The Python wheel's native runtime cannot execute Vulkan on this Mac; it was
91
  not used as a substitute for phone validation.
 
1
  # Vulkan precision and Android validation
2
 
3
+ The published FP16 variant accepts RGB float32 `[1,3,320,320]` in `[0,1]` and returns float32
4
+ `[1,1,320,320]` foreground logits. Input normalization stays in FP32. The
5
  export contains one Vulkan delegate for the network and one portable input
6
  `amax` reduction. Texture limits are capped at 2048 in each dimension.
7
 
 
33
  | Variant | Mean mask IoU (13 images) | Minimum mask IoU | File size |
34
  | --- | --- | --- | --- |
35
  | Vulkan FP16 with one FP32 convolution | 0.9945 | 0.9854 | 2,437,516 B |
 
36
 
37
+ The FP16 probability MAE was at most 0.00444 across those 13 images. The published
38
+ variant produced finite outputs on all 15 inputs.
39
 
40
  Warm native forward measurements on the same bicycle input used three warm-up
41
  runs followed by ten measured runs per variant:
 
45
  | XNNPACK FP32 | 315.6 ms |
46
  | XNNPACK selective INT8 | 189.1 ms |
47
  | Vulkan FP16 with one FP32 convolution | 337.2 ms |
48
+ | Vulkan FP32 (unpublished trial) | 403.1 ms |
49
 
50
  These were sequential host-driven device checks, not interleaved benchmarks;
51
  they exclude model loading, image preprocessing and rendering. Vulkan does not
 
85
  PY
86
  ```
87
 
88
+ The release FP16 export was byte-identical to the device-validated candidate.
89
  The Python wheel's native runtime cannot execute Vulkan on this Mac; it was
90
  not used as a substitute for phone validation.
vulkan/config.json CHANGED
@@ -38,37 +38,6 @@
38
  }
39
  },
40
  "size_bytes": 2437516
41
- },
42
- {
43
- "file": "u2netp_vulkan_fp32.pte",
44
- "precision": "fp32",
45
- "methods": {
46
- "forward": {
47
- "inputs": [
48
- {
49
- "shape": [
50
- 1,
51
- 3,
52
- 320,
53
- 320
54
- ],
55
- "dtype": "float32"
56
- }
57
- ],
58
- "outputs": [
59
- {
60
- "shape": [
61
- 1,
62
- 1,
63
- 320,
64
- 320
65
- ],
66
- "dtype": "float32"
67
- }
68
- ]
69
- }
70
- },
71
- "size_bytes": 4646540
72
  }
73
  ]
74
  }
 
38
  }
39
  },
40
  "size_bytes": 2437516
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
  ]
43
  }
vulkan/u2netp_vulkan_fp32.pte DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:88523d0b54ec20e9129194f110955cbc6d2f5d90b2293c9a712636fb5d255212
3
- size 4646540