Bartosz Hanc commited on
Commit ·
28cea3b
1
Parent(s): 5195a44
Fix config schema and document XNNPACK int8 quality
Browse files- README.md +28 -8
- small/coreml/config.json +1 -3
- small/vulkan/config.json +1 -3
- small/xnnpack/config.json +1 -5
README.md
CHANGED
|
@@ -23,17 +23,37 @@ revision `5426e4f0f36572d16453bbda7a8389317b1bef99`.
|
|
| 23 |
| `small/coreml/depth_anything_v2_small_coreml_fp16.pte` | coreml | fp16 |
|
| 24 |
| `small/vulkan/depth_anything_v2_small_vulkan_fp16.pte` | vulkan | fp16 |
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
## Repository structure
|
| 27 |
|
| 28 |
```
|
| 29 |
-
config.json
|
| 30 |
-
small/coreml/config.json
|
| 31 |
-
small/coreml/depth_anything_v2_small_coreml_fp16.pte
|
| 32 |
-
small/vulkan/config.json
|
| 33 |
-
small/vulkan/depth_anything_v2_small_vulkan_fp16.pte
|
| 34 |
-
small/xnnpack/config.json
|
| 35 |
-
small/xnnpack/depth_anything_v2_small_xnnpack_fp32.pte
|
| 36 |
-
small/xnnpack/depth_anything_v2_small_xnnpack_int8.pte
|
| 37 |
```
|
| 38 |
|
| 39 |
## Compatibility
|
|
|
|
| 23 |
| `small/coreml/depth_anything_v2_small_coreml_fp16.pte` | coreml | fp16 |
|
| 24 |
| `small/vulkan/depth_anything_v2_small_vulkan_fp16.pte` | vulkan | fp16 |
|
| 25 |
|
| 26 |
+
## XNNPACK int8
|
| 27 |
+
|
| 28 |
+
The INT8 export uses dynamic INT8 activations and per-channel INT8 weights for
|
| 29 |
+
linear layers; convolutions remain floating point. Public inputs and outputs
|
| 30 |
+
remain float32.
|
| 31 |
+
|
| 32 |
+
Numerical agreement with the float reference on four held-out upstream example
|
| 33 |
+
illustrations (`demo17`–`demo20`):
|
| 34 |
+
|
| 35 |
+
| Image | Range-normalized RMSE | Correlation |
|
| 36 |
+
| --- | --- | --- |
|
| 37 |
+
| demo17 | 1.24% | 0.999633 |
|
| 38 |
+
| demo18 | 1.34% | 0.999104 |
|
| 39 |
+
| demo19 | 0.47% | 0.999970 |
|
| 40 |
+
| demo20 | 1.28% | 0.999690 |
|
| 41 |
+
|
| 42 |
+
Range-normalized RMSE is RMSE divided by the reference depth range. These are
|
| 43 |
+
numerical export checks, not depth-accuracy benchmarks. A synthetic random-input
|
| 44 |
+
check reached 3.32% range-normalized RMSE (correlation 0.990703).
|
| 45 |
+
|
| 46 |
## Repository structure
|
| 47 |
|
| 48 |
```
|
| 49 |
+
config.json 39 B
|
| 50 |
+
small/coreml/config.json 879 B
|
| 51 |
+
small/coreml/depth_anything_v2_small_coreml_fp16.pte 50.2 MB
|
| 52 |
+
small/vulkan/config.json 879 B
|
| 53 |
+
small/vulkan/depth_anything_v2_small_vulkan_fp16.pte 49.6 MB
|
| 54 |
+
small/xnnpack/config.json 1.5 kB
|
| 55 |
+
small/xnnpack/depth_anything_v2_small_xnnpack_fp32.pte 99.0 MB
|
| 56 |
+
small/xnnpack/depth_anything_v2_small_xnnpack_int8.pte 35.5 MB
|
| 57 |
```
|
| 58 |
|
| 59 |
## Compatibility
|
small/coreml/config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
"model": "depth_anything_v2_small",
|
| 4 |
-
"family": "
|
| 5 |
"capabilities": [
|
| 6 |
"depth-estimation"
|
| 7 |
],
|
|
@@ -11,8 +11,6 @@
|
|
| 11 |
{
|
| 12 |
"file": "depth_anything_v2_small_coreml_fp16.pte",
|
| 13 |
"precision": "fp16",
|
| 14 |
-
"quantized": false,
|
| 15 |
-
"default": true,
|
| 16 |
"methods": {
|
| 17 |
"forward": {
|
| 18 |
"inputs": [
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
"model": "depth_anything_v2_small",
|
| 4 |
+
"family": "depth_anything_v2",
|
| 5 |
"capabilities": [
|
| 6 |
"depth-estimation"
|
| 7 |
],
|
|
|
|
| 11 |
{
|
| 12 |
"file": "depth_anything_v2_small_coreml_fp16.pte",
|
| 13 |
"precision": "fp16",
|
|
|
|
|
|
|
| 14 |
"methods": {
|
| 15 |
"forward": {
|
| 16 |
"inputs": [
|
small/vulkan/config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
"model": "depth_anything_v2_small",
|
| 4 |
-
"family": "
|
| 5 |
"capabilities": [
|
| 6 |
"depth-estimation"
|
| 7 |
],
|
|
@@ -11,8 +11,6 @@
|
|
| 11 |
{
|
| 12 |
"file": "depth_anything_v2_small_vulkan_fp16.pte",
|
| 13 |
"precision": "fp16",
|
| 14 |
-
"quantized": false,
|
| 15 |
-
"default": true,
|
| 16 |
"methods": {
|
| 17 |
"forward": {
|
| 18 |
"inputs": [
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
"model": "depth_anything_v2_small",
|
| 4 |
+
"family": "depth_anything_v2",
|
| 5 |
"capabilities": [
|
| 6 |
"depth-estimation"
|
| 7 |
],
|
|
|
|
| 11 |
{
|
| 12 |
"file": "depth_anything_v2_small_vulkan_fp16.pte",
|
| 13 |
"precision": "fp16",
|
|
|
|
|
|
|
| 14 |
"methods": {
|
| 15 |
"forward": {
|
| 16 |
"inputs": [
|
small/xnnpack/config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
"model": "depth_anything_v2_small",
|
| 4 |
-
"family": "
|
| 5 |
"capabilities": [
|
| 6 |
"depth-estimation"
|
| 7 |
],
|
|
@@ -11,8 +11,6 @@
|
|
| 11 |
{
|
| 12 |
"file": "depth_anything_v2_small_xnnpack_fp32.pte",
|
| 13 |
"precision": "fp32",
|
| 14 |
-
"quantized": false,
|
| 15 |
-
"default": true,
|
| 16 |
"methods": {
|
| 17 |
"forward": {
|
| 18 |
"inputs": [
|
|
@@ -42,8 +40,6 @@
|
|
| 42 |
{
|
| 43 |
"file": "depth_anything_v2_small_xnnpack_int8.pte",
|
| 44 |
"precision": "int8",
|
| 45 |
-
"quantized": true,
|
| 46 |
-
"default": false,
|
| 47 |
"methods": {
|
| 48 |
"forward": {
|
| 49 |
"inputs": [
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
"model": "depth_anything_v2_small",
|
| 4 |
+
"family": "depth_anything_v2",
|
| 5 |
"capabilities": [
|
| 6 |
"depth-estimation"
|
| 7 |
],
|
|
|
|
| 11 |
{
|
| 12 |
"file": "depth_anything_v2_small_xnnpack_fp32.pte",
|
| 13 |
"precision": "fp32",
|
|
|
|
|
|
|
| 14 |
"methods": {
|
| 15 |
"forward": {
|
| 16 |
"inputs": [
|
|
|
|
| 40 |
{
|
| 41 |
"file": "depth_anything_v2_small_xnnpack_int8.pte",
|
| 42 |
"precision": "int8",
|
|
|
|
|
|
|
| 43 |
"methods": {
|
| 44 |
"forward": {
|
| 45 |
"inputs": [
|