Depth Estimation
Core ML
core-ml
depth-anything
depth-anything-3
depth-anything-3-small
da3
da3-small
multi-view
multi-view-depth
multi-view-geometry
pose-conditioned
camera-pose
pose-estimation
3d-reconstruction
3d-scanning
arkit
ios
iphone
iphone-12-pro
iphone-17-pro
apple-silicon
apple-neural-engine
ane
on-device
swift
Add model card, license, notice and model list
Browse files
LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
NOTICE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Depth Anything 3 Small Multi-View Core ML
|
| 2 |
+
Copyright 2026 Shuichi Tsutsumi
|
| 3 |
+
|
| 4 |
+
This repository contains Core ML conversions of the Depth Anything 3 Small model weights.
|
| 5 |
+
|
| 6 |
+
Original work:
|
| 7 |
+
Depth Anything 3 Small (depth-anything/DA3-SMALL on Hugging Face,
|
| 8 |
+
revision e08cab65ca0ec38e7826075418411ab90cab4da3), licensed under the Apache License, Version 2.0.
|
| 9 |
+
The original repository has no NOTICE file.
|
| 10 |
+
|
| 11 |
+
Changes made in this conversion:
|
| 12 |
+
- Converted from PyTorch to Core ML packages (.mlpackage) with coremltools.
|
| 13 |
+
- Multi-view input with camera poses: the models take 2 or 3 images together with each image's
|
| 14 |
+
extrinsics and intrinsics (for example from ARKit), instead of a single image.
|
| 15 |
+
- Fixed input sizes of 504 x 504 or 392 x 392 pixels.
|
| 16 |
+
- In the "sliced" variants, the global attention across views is computed in slices of the query
|
| 17 |
+
(16 slices, or 8 in "sliced8") to keep the intermediate matrices small.
|
| 18 |
+
- In the "headcombo" variants, the depth head was rewritten (transposed-convolution upsampling, and the
|
| 19 |
+
upsampling moved later in the head). Depth values differ slightly from the original at object edges.
|
| 20 |
+
|
| 21 |
+
The full text of the Apache License, Version 2.0 is in the LICENSE file.
|
README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: depth-anything/DA3-SMALL
|
| 4 |
+
library_name: coreml
|
| 5 |
+
pipeline_tag: depth-estimation
|
| 6 |
+
tags:
|
| 7 |
+
- coreml
|
| 8 |
+
- core-ml
|
| 9 |
+
- depth-estimation
|
| 10 |
+
- depth-anything-3
|
| 11 |
+
- DA3
|
| 12 |
+
- multi-view
|
| 13 |
+
- multi-view-geometry
|
| 14 |
+
- pose-conditioned
|
| 15 |
+
- arkit
|
| 16 |
+
- ios
|
| 17 |
+
- iphone
|
| 18 |
+
- apple-neural-engine
|
| 19 |
+
- on-device
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# Depth Anything 3 (DA3) Small — Multi-View, Pose-Conditioned Core ML for iPhone
|
| 23 |
+
|
| 24 |
+
Core ML packages of [Depth Anything 3 Small](https://huggingface.co/depth-anything/DA3-SMALL) (`DA3-SMALL`,
|
| 25 |
+
revision `e08cab65ca0ec38e7826075418411ab90cab4da3`) that run the **multi-view, pose-conditioned** path of the
|
| 26 |
+
network on iPhone. Each model takes 2 or 3 images together with their camera poses (extrinsics and intrinsics, for
|
| 27 |
+
example from ARKit) and returns, for every image, a depth map, a confidence map and the camera pose the network
|
| 28 |
+
estimates. The variants are rewritten to run faster and use less memory on the iPhone Neural Engine than a plain
|
| 29 |
+
conversion.
|
| 30 |
+
|
| 31 |
+
Existing Core ML conversions of DA3 Small take a single image. These packages keep the camera encoder and decoder,
|
| 32 |
+
so depth from several views is consistent across the views and can be brought to metres with the input poses.
|
| 33 |
+
|
| 34 |
+
## Variants
|
| 35 |
+
|
| 36 |
+
| Package | Views | Input | What is changed | Minimum iOS | Size |
|
| 37 |
+
|---|---|---|---|---|---|
|
| 38 |
+
| `models/mv3pose392_sliced8_headcombo.mlpackage` (recommended) | 3 | 392 × 392 | 392 input, global attention in 8 slices, depth head rewritten | 18.0 | 72.0 MB |
|
| 39 |
+
| `models/mv2pose392_sliced_headcombo.mlpackage` | 2 | 392 × 392 | 392 input, global attention in 16 slices, depth head rewritten | 18.0 | 71.8 MB |
|
| 40 |
+
| `models/mv3pose_sliced.mlpackage` | 3 | 504 × 504 | global attention in 16 slices | 18.0 | 86.8 MB |
|
| 41 |
+
| `models/mv3pose.mlpackage` | 3 | 504 × 504 | none (plain conversion of the pose-conditioned path) | 17.0 | 86.7 MB |
|
| 42 |
+
|
| 43 |
+
All packages are FP16.
|
| 44 |
+
|
| 45 |
+
- **Sliced global attention** (`sliced`, `sliced8`): the attention across all views is computed in slices of the
|
| 46 |
+
query, so the intermediate attention matrices stay small. It only changes the order of the operations: the
|
| 47 |
+
weights are identical (`mv3pose` and `mv3pose_sliced` have the same `weight.bin`), and the output matches the
|
| 48 |
+
original PyTorch model (mean depth difference 0.03–0.05% on a Mac).
|
| 49 |
+
- **Head rewrite** (`headcombo`): the DPT depth head uses transposed-convolution upsampling and upsamples later in
|
| 50 |
+
the head. Depth and confidence change slightly, mostly at object edges. The pose output does not change (the
|
| 51 |
+
camera decoder reads the backbone, not the head).
|
| 52 |
+
- **392 input**: fewer tokens per image. With the poses from ARKit, the metric scale estimated from the 392
|
| 53 |
+
variants differs from the 504 sliced variant by a median of 2.6% (3 views) and 4.5% (2 views).
|
| 54 |
+
|
| 55 |
+
## Measured on iPhone
|
| 56 |
+
|
| 57 |
+
Two devices only: iPhone 12 Pro (A14, iOS 27.0.1) and iPhone 17 Pro (A19 Pro, iOS 27.0.1), default compute units
|
| 58 |
+
(`.all`). Times are the median inference time of one forward pass (all views). The conditions differ between rows,
|
| 59 |
+
so compare numbers within a row.
|
| 60 |
+
|
| 61 |
+
| Comparison | Device | Condition | Result |
|
| 62 |
+
|---|---|---|---|
|
| 63 |
+
| `mv3pose` → `mv3pose_sliced` | 17 Pro | Release, ARKit poses, handheld, 120 s each from nominal thermal state | 464.3 → 310.5 ms, app memory 1,121 → 762 MB |
|
| 64 |
+
| `mv3pose` → `mv3pose_sliced` | 12 Pro | Release, ARKit poses, handheld, 1 min each, not cooled in between | 774 → 566 ms, Neural Engine memory 760 → 367 MB |
|
| 65 |
+
| `mv3pose_sliced` → `mv3pose392_sliced8_headcombo` | 17 Pro | Debug build test, fixed images | 224 → 91 ms |
|
| 66 |
+
| `mv3pose_sliced` → `mv3pose392_sliced8_headcombo` | 12 Pro | Debug build test, fixed images | 579.5 → 183.4 ms |
|
| 67 |
+
| `mv2pose392_sliced_headcombo` | 17 Pro | Debug build test, fixed images | 53.6–54.6 ms |
|
| 68 |
+
|
| 69 |
+
Notes from these devices:
|
| 70 |
+
|
| 71 |
+
- On the iPhone 17 Pro Neural Engine, the 2-view 504 sliced package does not return (the first inference stalls
|
| 72 |
+
and is cancelled). The 2-view 392 package above returns.
|
| 73 |
+
- A 3-view 392 package with 16 slices also does not return on the iPhone 17 Pro, which is why the recommended
|
| 74 |
+
3-view variant uses 8 slices.
|
| 75 |
+
- The first load compiles the model for the Neural Engine and can take one to several minutes on an iPhone 12 Pro.
|
| 76 |
+
|
| 77 |
+
## Inputs
|
| 78 |
+
|
| 79 |
+
| Name | Type | Shape | Content |
|
| 80 |
+
|---|---|---|---|
|
| 81 |
+
| `image_0` … `image_{S-1}` | Image (RGB, 8-bit) | 392 × 392 or 504 × 504 | The views. View 0 is the reference view. ImageNet normalisation is inside the model. |
|
| 82 |
+
| `extrinsics` | MultiArray Float32 | (1, S, 4, 4) | World-to-camera matrices in the OpenCV camera convention (x right, y down, z forward), **already normalised** (see below). |
|
| 83 |
+
| `intrinsics` | MultiArray Float32 | (1, S, 3, 3) | Pinhole intrinsics of each model input image in pixels (after cropping and resizing to the input size). Only `fx` and `fy` reach the network. |
|
| 84 |
+
|
| 85 |
+
The normalisation of the extrinsics is the one the official `DepthAnything3._normalize_extrinsics` (`api.py`) does
|
| 86 |
+
before the forward pass. It is left to the caller so that it runs in Float32 / Float64 instead of the FP16 of the
|
| 87 |
+
model:
|
| 88 |
+
|
| 89 |
+
```python
|
| 90 |
+
import numpy as np
|
| 91 |
+
|
| 92 |
+
def normalize_extrinsics(w2c): # w2c: (S, 4, 4) world-to-camera, OpenCV axes, metres
|
| 93 |
+
rel = w2c @ np.linalg.inv(w2c[0]) # view 0 becomes the identity
|
| 94 |
+
centres = np.linalg.inv(rel)[:, :3, 3]
|
| 95 |
+
dist = np.sort(np.linalg.norm(centres, axis=1))
|
| 96 |
+
median = max(dist[(len(dist) - 1) // 2], 0.1) # torch.median: the lower middle value
|
| 97 |
+
rel[:, :3, 3] /= median
|
| 98 |
+
return rel.astype(np.float32), median
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
With 2 views the median is the distance of view 0 to itself, so the divisor is always 0.1.
|
| 102 |
+
|
| 103 |
+
ARKit's camera axes (`ARCamera.transform`) are x right, y up and z toward the viewer in the sensor's landscape
|
| 104 |
+
orientation, so the camera-to-world from ARKit has to be rotated into the OpenCV axes of the image you pass before it
|
| 105 |
+
is inverted to world-to-camera. For an image rotated 90 degrees clockwise to portrait (the usual way to show it
|
| 106 |
+
upright when the phone is held in portrait), the model's x is ARKit's +y, the model's y is ARKit's +x and the
|
| 107 |
+
model's z is ARKit's −z: `c2w_model = c2w_arkit @ R`, with the columns of `R` being (0, 1, 0), (1, 0, 0) and
|
| 108 |
+
(0, 0, −1). The intrinsics have to follow the same rotation, centre crop and resize.
|
| 109 |
+
|
| 110 |
+
## Outputs
|
| 111 |
+
|
| 112 |
+
| Name | Type | Shape | Content |
|
| 113 |
+
|---|---|---|---|
|
| 114 |
+
| `depth` | MultiArray Float16 | (1, S, H, W) | Depth of every view in the normalised frame of the input poses. |
|
| 115 |
+
| `confidence` | MultiArray Float16 | (1, S, H, W) | Confidence of every depth value. |
|
| 116 |
+
| `pose_encoding` | MultiArray Float16 | (1, S, 9) | The pose the network estimates for every view: translation (3), quaternion xyzw (4), horizontal and vertical field of view. The translation is the camera position (camera-to-world) in the normalised frame. |
|
| 117 |
+
|
| 118 |
+
To bring the depth to metres, do what the official `api.py` does: align the estimated camera positions from
|
| 119 |
+
`pose_encoding` to the input camera positions with Umeyama's method (similarity transform) and divide the depth by
|
| 120 |
+
the resulting scale.
|
| 121 |
+
|
| 122 |
+
## Model list
|
| 123 |
+
|
| 124 |
+
`models.json` lists every package with the size and SHA-256 of each file inside it, the input size, the number of
|
| 125 |
+
views and the minimum iOS version. Apps can read it to download the files of a package one by one from
|
| 126 |
+
`https://huggingface.co/shu223/Depth-Anything-3-Small-MultiView-CoreML/resolve/main/<path>`, check them and compile
|
| 127 |
+
the package on the device with `MLModel.compileModel(at:)`.
|
| 128 |
+
|
| 129 |
+
## Conversion
|
| 130 |
+
|
| 131 |
+
Converted with coremltools from the original PyTorch implementation
|
| 132 |
+
([ByteDance-Seed/Depth-Anything-3](https://github.com/ByteDance-Seed/Depth-Anything-3)), with the changes listed in
|
| 133 |
+
`NOTICE`. Ray decoding, sky handling and the Gaussian branch of the original model are not included.
|
| 134 |
+
|
| 135 |
+
## License
|
| 136 |
+
|
| 137 |
+
Apache License 2.0, the same as the original weights. See `LICENSE` and `NOTICE`.
|
| 138 |
+
|
| 139 |
+
## Citation
|
| 140 |
+
|
| 141 |
+
```bibtex
|
| 142 |
+
@article{depthanything3,
|
| 143 |
+
title = {Depth Anything 3: Recovering the Visual Space from Any Views},
|
| 144 |
+
author = {Lin, Haotong and Chen, Sili and Liew, Jun Hao and Chen, Donny Y. and Li, Zhenyu and Shi, Guang and Feng, Jiashi and Kang, Bingyi},
|
| 145 |
+
journal = {arXiv preprint arXiv:2511.10647},
|
| 146 |
+
year = {2025}
|
| 147 |
+
}
|
| 148 |
+
```
|
models.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": 1,
|
| 3 |
+
"models": [
|
| 4 |
+
{
|
| 5 |
+
"id": "mv3pose392_sliced8_headcombo",
|
| 6 |
+
"title": "Depth Anything 3 Small (3 views, 392, sliced 8, headcombo)",
|
| 7 |
+
"path": "models/mv3pose392_sliced8_headcombo.mlpackage",
|
| 8 |
+
"files": [
|
| 9 |
+
{
|
| 10 |
+
"path": "Data/com.apple.CoreML/model.mlmodel",
|
| 11 |
+
"bytes": 460938,
|
| 12 |
+
"sha256": "5859d75479693098baa075fb0b4a853ef933b4795934f6a210254d01de5fc783"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"path": "Data/com.apple.CoreML/weights/weight.bin",
|
| 16 |
+
"bytes": 71536576,
|
| 17 |
+
"sha256": "d3a040837c465c18c862c550c2afa907797212df1baeeb4bc2abd85f53501b67"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"path": "Manifest.json",
|
| 21 |
+
"bytes": 617,
|
| 22 |
+
"sha256": "7c34f36dd2fb6a4d7b1532e9c971cb775d39739e1ce255f9805e6c823d345c1c"
|
| 23 |
+
}
|
| 24 |
+
],
|
| 25 |
+
"inputSize": 392,
|
| 26 |
+
"viewCount": 3,
|
| 27 |
+
"requiresPoses": true,
|
| 28 |
+
"minimumOS": "18.0",
|
| 29 |
+
"recommended": true,
|
| 30 |
+
"notes": "All speed-ups combined: input 392, global attention sliced into 8, rewritten head. The smallest and fastest of the 3-view models; runs on iPhone 12 Pro and 17 Pro."
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"id": "mv2pose392_sliced_headcombo",
|
| 34 |
+
"title": "Depth Anything 3 Small (2 views, 392, sliced, headcombo)",
|
| 35 |
+
"path": "models/mv2pose392_sliced_headcombo.mlpackage",
|
| 36 |
+
"files": [
|
| 37 |
+
{
|
| 38 |
+
"path": "Data/com.apple.CoreML/model.mlmodel",
|
| 39 |
+
"bytes": 538893,
|
| 40 |
+
"sha256": "3159ef4b501d25e5db0b1cb866b9ede900de613883e359fb8ad51084ae6d130d"
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"path": "Data/com.apple.CoreML/weights/weight.bin",
|
| 44 |
+
"bytes": 71234240,
|
| 45 |
+
"sha256": "7c1ed360296ef62c13fde09c5bb3a46d96b3681cb3802c8c50a5dbdfb3b929e4"
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"path": "Manifest.json",
|
| 49 |
+
"bytes": 617,
|
| 50 |
+
"sha256": "8a7196b1e1e0afb45540a35fb4cf85e34aede2d3978f34257bb607804f8eb2a2"
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"inputSize": 392,
|
| 54 |
+
"viewCount": 2,
|
| 55 |
+
"requiresPoses": true,
|
| 56 |
+
"minimumOS": "18.0",
|
| 57 |
+
"recommended": false,
|
| 58 |
+
"notes": "The same speed-ups with 2 views."
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"id": "mv3pose_sliced",
|
| 62 |
+
"title": "Depth Anything 3 Small (3 views, 504, sliced)",
|
| 63 |
+
"path": "models/mv3pose_sliced.mlpackage",
|
| 64 |
+
"files": [
|
| 65 |
+
{
|
| 66 |
+
"path": "Data/com.apple.CoreML/model.mlmodel",
|
| 67 |
+
"bytes": 535887,
|
| 68 |
+
"sha256": "df7f236d172382c224c0f056f1bbb40b9daca6b16e118fecb2a57c556eb41a02"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"path": "Data/com.apple.CoreML/weights/weight.bin",
|
| 72 |
+
"bytes": 86300544,
|
| 73 |
+
"sha256": "1ee056122b5b01690b5e61e20d562e4d2d61cad9d96373e2c0e7efde3f667a3f"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"path": "Manifest.json",
|
| 77 |
+
"bytes": 617,
|
| 78 |
+
"sha256": "1de3b678d2a12257ccf4c4cfd9e5716bc31ae63d4279c1319d4c25c894710090"
|
| 79 |
+
}
|
| 80 |
+
],
|
| 81 |
+
"inputSize": 504,
|
| 82 |
+
"viewCount": 3,
|
| 83 |
+
"requiresPoses": true,
|
| 84 |
+
"minimumOS": "18.0",
|
| 85 |
+
"recommended": false,
|
| 86 |
+
"notes": "Input 504 with the global attention sliced."
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"id": "mv3pose",
|
| 90 |
+
"title": "Depth Anything 3 Small (3 views, 504)",
|
| 91 |
+
"path": "models/mv3pose.mlpackage",
|
| 92 |
+
"files": [
|
| 93 |
+
{
|
| 94 |
+
"path": "Data/com.apple.CoreML/model.mlmodel",
|
| 95 |
+
"bytes": 398101,
|
| 96 |
+
"sha256": "4bfb7097f81a26e48a3ade77b81b80dbc16135b56cba5daffe1b2dd2a7993fdd"
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"path": "Data/com.apple.CoreML/weights/weight.bin",
|
| 100 |
+
"bytes": 86300544,
|
| 101 |
+
"sha256": "1ee056122b5b01690b5e61e20d562e4d2d61cad9d96373e2c0e7efde3f667a3f"
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"path": "Manifest.json",
|
| 105 |
+
"bytes": 617,
|
| 106 |
+
"sha256": "96dad3c07dcd28683a674c4f1c362d42aa4297db25aebdc21240eb05ef28287b"
|
| 107 |
+
}
|
| 108 |
+
],
|
| 109 |
+
"inputSize": 504,
|
| 110 |
+
"viewCount": 3,
|
| 111 |
+
"requiresPoses": true,
|
| 112 |
+
"minimumOS": "17.0",
|
| 113 |
+
"recommended": false,
|
| 114 |
+
"notes": "Input 504, converted without changes to the attention or the head."
|
| 115 |
+
}
|
| 116 |
+
]
|
| 117 |
+
}
|