Update FP32 ONNX from 5d7918b55b92
Browse files- LICENSE +21 -0
- README.md +23 -0
- zipdepth-base-768-fp32.json +104 -0
- zipdepth-base-768-fp32.onnx +3 -0
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Fabio Tosi
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: onnx
|
| 4 |
+
pipeline_tag: depth-estimation
|
| 5 |
+
tags:
|
| 6 |
+
- onnx
|
| 7 |
+
- webgpu
|
| 8 |
+
- zipdepth
|
| 9 |
+
---
|
| 10 |
+
# ZipDepth ONNX
|
| 11 |
+
FP32 ONNX conversion of [Fabio Tosi et al.'s ZipDepth](https://github.com/fabiotosi92/ZipDepth), with the original learned attention and convex upsampling preserved. No quantization or retraining is applied.
|
| 12 |
+
## License and provenance
|
| 13 |
+
The upstream repository distributes its code and checkpoints under its MIT LICENSE; the original copyright and permission notice is included in LICENSE. This conversion is not an official upstream release. ZipDepth was distilled from Depth Anything V2 Large; this card does not relicense the teacher or its original datasets, which are not included here.
|
| 14 |
+
## Input and output
|
| 15 |
+
Input `image` is FP32 RGB divided by 255, NCHW `[1,3,768,768]`. Preserve the source aspect ratio when resizing and pad the remaining area with black. Ignore padded regions when displaying or exporting scene points.
|
| 16 |
+
Output `inverse_depth` is FP32 `[1,1,768,768]`, affine-invariant inverse depth: larger means nearer. It is not a distance in meters. Calibrated distance requires a scale and shift in inverse-depth space. A relative preview may use `z = scale / (raw + shift)` with positive denominators, while retaining the raw output unchanged.
|
| 17 |
+
## Validation
|
| 18 |
+
The JSON manifest contains checkpoint and ONNX SHA-256 hashes and numerical comparisons with the original PyTorch model on a public image, RGB noise and black input. Browser latency and WebGPU operator support must be measured separately; CPU conversion checks are not browser benchmarks.
|
| 19 |
+
## Build
|
| 20 |
+
Source: https://github.com/DaisukeDaisuke/ZipDepth
|
| 21 |
+
Every successful build updates this same repository. Use a Hugging Face commit revision to pin an immutable model download.
|
| 22 |
+
Source commit: `5d7918b55b9204ee24fc76f0c16778d612402d3e`
|
| 23 |
+
ONNX SHA-256: `7926169714cc7e310408f4640f650db3253be1453ad185384bddbea13339795b`
|
zipdepth-base-768-fp32.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "ZipDepth-base",
|
| 3 |
+
"precision": "float32",
|
| 4 |
+
"output_semantics": "affine-invariant inverse depth; larger means nearer",
|
| 5 |
+
"preprocess": "RGB / 255, NCHW; aspect-preserving resize and black padding",
|
| 6 |
+
"checkpoint_sha256": "a55910bb0b99c8c5e641cb9206e810b269690ad94e8a2ef08c827c4679391a65",
|
| 7 |
+
"source_commit": "5d7918b55b9204ee24fc76f0c16778d612402d3e",
|
| 8 |
+
"filename": "zipdepth-base-768-fp32.onnx",
|
| 9 |
+
"sha256": "7926169714cc7e310408f4640f650db3253be1453ad185384bddbea13339795b",
|
| 10 |
+
"bytes": 24624186,
|
| 11 |
+
"input_name": "image",
|
| 12 |
+
"output_name": "inverse_depth",
|
| 13 |
+
"input_shape": [
|
| 14 |
+
1,
|
| 15 |
+
3,
|
| 16 |
+
768,
|
| 17 |
+
768
|
| 18 |
+
],
|
| 19 |
+
"output_shape": [
|
| 20 |
+
1,
|
| 21 |
+
1,
|
| 22 |
+
768,
|
| 23 |
+
768
|
| 24 |
+
],
|
| 25 |
+
"opset": 17,
|
| 26 |
+
"operators": [
|
| 27 |
+
"Add",
|
| 28 |
+
"AveragePool",
|
| 29 |
+
"BatchNormalization",
|
| 30 |
+
"Cast",
|
| 31 |
+
"Concat",
|
| 32 |
+
"Constant",
|
| 33 |
+
"ConstantOfShape",
|
| 34 |
+
"Conv",
|
| 35 |
+
"DepthToSpace",
|
| 36 |
+
"Div",
|
| 37 |
+
"Gather",
|
| 38 |
+
"GlobalAveragePool",
|
| 39 |
+
"MatMul",
|
| 40 |
+
"MaxPool",
|
| 41 |
+
"Mul",
|
| 42 |
+
"Pad",
|
| 43 |
+
"Range",
|
| 44 |
+
"ReduceMean",
|
| 45 |
+
"ReduceSum",
|
| 46 |
+
"Relu",
|
| 47 |
+
"Reshape",
|
| 48 |
+
"Resize",
|
| 49 |
+
"Shape",
|
| 50 |
+
"Sigmoid",
|
| 51 |
+
"Slice",
|
| 52 |
+
"Softmax",
|
| 53 |
+
"Sub",
|
| 54 |
+
"Transpose",
|
| 55 |
+
"Unsqueeze"
|
| 56 |
+
],
|
| 57 |
+
"validation": [
|
| 58 |
+
{
|
| 59 |
+
"label": "fusion/public-image",
|
| 60 |
+
"max_absolute_error": 5.029141902923584e-07,
|
| 61 |
+
"mean_absolute_error": 1.8642849042294074e-08,
|
| 62 |
+
"output_min": 0.0,
|
| 63 |
+
"output_max": 0.17091958224773407
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"label": "fusion/random-rgb",
|
| 67 |
+
"max_absolute_error": 1.043081283569336e-07,
|
| 68 |
+
"mean_absolute_error": 1.2551014449968534e-08,
|
| 69 |
+
"output_min": 0.009747229516506195,
|
| 70 |
+
"output_max": 0.09417390078306198
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"label": "fusion/black",
|
| 74 |
+
"max_absolute_error": 3.650784492492676e-07,
|
| 75 |
+
"mean_absolute_error": 9.113544763295067e-08,
|
| 76 |
+
"output_min": 0.04116407036781311,
|
| 77 |
+
"output_max": 0.11994780600070953
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"label": "onnx/public-image",
|
| 81 |
+
"max_absolute_error": 6.034970283508301e-07,
|
| 82 |
+
"mean_absolute_error": 5.203410324838842e-08,
|
| 83 |
+
"output_min": 0.0,
|
| 84 |
+
"output_max": 0.17091967165470123
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"label": "onnx/random-rgb",
|
| 88 |
+
"max_absolute_error": 1.564621925354004e-07,
|
| 89 |
+
"mean_absolute_error": 2.4493134631597968e-08,
|
| 90 |
+
"output_min": 0.009747234173119068,
|
| 91 |
+
"output_max": 0.09417388588190079
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"label": "onnx/black",
|
| 95 |
+
"max_absolute_error": 1.2293457984924316e-06,
|
| 96 |
+
"mean_absolute_error": 3.444413323450135e-07,
|
| 97 |
+
"output_min": 0.041164495050907135,
|
| 98 |
+
"output_max": 0.11994778364896774
|
| 99 |
+
}
|
| 100 |
+
],
|
| 101 |
+
"checkpoint_unused_keys": [],
|
| 102 |
+
"torch_version": "2.5.1+cpu",
|
| 103 |
+
"onnxruntime_version": "1.20.1"
|
| 104 |
+
}
|
zipdepth-base-768-fp32.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7926169714cc7e310408f4640f650db3253be1453ad185384bddbea13339795b
|
| 3 |
+
size 24624186
|