Commit ·
4e607a6
0
Parent(s):
init
Browse filesCo-authored-by: amael-apple <amael-apple@users.noreply.huggingface.co>
Files changed (19)
- .gitattributesAdded+35
- LICENSEAdded+88
- README.mdAdded+98
- depthpro2-b_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
- depthpro2-b_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
- depthpro2-b_w4.mlpackage/Manifest.jsonAdded+18
- depthpro2-fov_512x896.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
- depthpro2-fov_512x896.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
- depthpro2-fov_512x896.mlpackage/Manifest.jsonAdded+18
- depthpro2-fov_512x896.mlpackage/executorch_debug_handle_mapping.jsonAdded
- depthpro2-h_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
- depthpro2-h_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
- depthpro2-h_w4.mlpackage/Manifest.jsonAdded+18
- depthpro2-l_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
- depthpro2-l_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
- depthpro2-l_w4.mlpackage/Manifest.jsonAdded+18
- depthpro2-s_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
- depthpro2-s_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
- depthpro2-s_w4.mlpackage/Manifest.jsonAdded+18
1234567891011121314151617181920212223242526272829303132333435*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788Disclaimer: IMPORTANT: This Apple Machine Learning Research Model isspecifically developed and released by Apple Inc. ("Apple") for the sole purposeof scientific research of artificial intelligence and machine-learningtechnology. “Apple Machine Learning Research Model” means the model, includingbut not limited to algorithms, formulas, trained model weights, parameters,configurations, checkpoints, and any related materials (includingdocumentation).
This Apple Machine Learning Research Model is provided to You byApple in consideration of your agreement to the following terms, and your use,modification, creation of Model Derivatives, and or redistribution of the AppleMachine Learning Research Model constitutes acceptance of this Agreement. If Youdo not agree with these terms, please do not use, modify, create ModelDerivatives of, or distribute this Apple Machine Learning Research Model orModel Derivatives.
* License Scope: In consideration of your agreement to abide by the following terms, and subject to these terms, Apple hereby grants you a personal, non-exclusive, worldwide, non-transferable, royalty-free, revocable, and limited license, to use, copy, modify, distribute, and create Model Derivatives (defined below) of the Apple Machine Learning Research Model exclusively for Research Purposes. You agree that any Model Derivatives You may create or that may be created for You will be limited to Research Purposes as well. “Research Purposes” means non-commercial scientific research and academic development activities, such as experimentation, analysis, testing conducted by You with the sole intent to advance scientific knowledge and research. “Research Purposes” does not include any commercial exploitation, product development or use in any commercial product or service.
* Distribution of Apple Machine Learning Research Model and Model Derivatives: If you choose to redistribute Apple Machine Learning Research Model or its Model Derivatives, you must provide a copy of this Agreement to such third party, and ensure that the following attribution notice be provided: “Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.” Additionally, all Model Derivatives must clearly be identified as such, including disclosure of modifications and changes made to the Apple Machine Learning Research Model. The name, trademarks, service marks or logos of Apple may not be used to endorse or promote Model Derivatives or the relationship between You and Apple. “Model Derivatives” means any models or any other artifacts created by modifications, improvements, adaptations, alterations to the architecture, algorithm or training processes of the Apple Machine Learning Research Model, or by any retraining, fine-tuning of the Apple Machine Learning Research Model.
* No Other License: Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent, trademark, and similar intellectual property rights worldwide that may be infringed by the Apple Machine Learning Research Model, the Model Derivatives or by other works in which the Apple Machine Learning Research Model may be incorporated.
* Compliance with Laws: Your use of Apple Machine Learning Research Model must be in compliance with all applicable laws and regulations.
* Term and Termination: The term of this Agreement will begin upon your acceptance of this Agreement or use of the Apple Machine Learning Research Model and will continue until terminated in accordance with the following terms. Apple may terminate this Agreement at any time if You are in breach of any term or condition of this Agreement. Upon termination of this Agreement, You must cease to use all Apple Machine Learning Research Models and Model Derivatives and permanently delete any copy thereof. Sections 3, 6 and 7 will survive termination.
* Disclaimer and Limitation of Liability: This Apple Machine Learning Research Model and any outputs generated by the Apple Machine Learning Research Model are provided on an “AS IS” basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE MACHINE LEARNING RESEARCH MODEL OR OUTPUTS GENERATED BY THE APPLE MACHINE LEARNING RESEARCH MODEL. You are solely responsible for determining the appropriateness of using or redistributing the Apple Machine Learning Research Model and any outputs of the Apple Machine Learning Research Model and assume any risks associated with Your use of the Apple Machine Learning Research Model and any output and results. IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE MACHINE LEARNING RESEARCH MODEL AND ANY OUTPUTS OF THE APPLE MACHINE LEARNING RESEARCH MODEL, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Governing Law: This Agreement will be governed by and construed under the laws of the State of California without regard to its choice of law principles. The Convention on Contracts for the International Sale of Goods shall not apply to the Agreement except that the arbitration clause and any arbitration hereunder shall be governed by the Federal Arbitration Act, Chapters 1 and 2.
Copyright (C) 2026 Apple Inc. All Rights Reserved.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798---license: otherlicense_name: apple-amlrlicense_link: https://github.com/apple-aiml-research/ml-depth-pro-2/blob/main/LICENSE_MODELpipeline_tag: depth-estimationlibrary_name: coremltags: - depth-estimation - metric-depth - monocular-depth - video-depth - coreml---
<h1 align="center">Depth Pro 2 CoreML Models</h1>
<p align="center"> <a href="https://github.com/apple-aiml-research/ml-depth-pro-2"><img src="https://img.shields.io/badge/GitHub-181717?style=flat-square&logo=github&logoColor=white" alt="GitHub"/></a> <a href="https://arxiv.org/abs/2611.26603"><img src="https://img.shields.io/badge/Technical%20Report-B31B1B?style=flat-square&logo=arxiv&logoColor=white" alt="Technical Report"/></a> <a href="https://apple-aiml-research.github.io/ml-depth-pro-2/"><img src="https://img.shields.io/badge/Project%20Page-666666?style=flat-square&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPjxwYXRoIGQ9Ik0yIDEyaDIwTTEyIDJhMTUgMTUgMCAwIDEgMCAyME0xMiAyYTE1IDE1IDAgMCAwIDAgMjAiLz48L3N2Zz4%3D" alt="Project Page"/></a> <a href="https://huggingface.co/apple/DepthPro2"><img src="https://img.shields.io/badge/All%20Sizes-FFD21E?style=flat-square&logo=huggingface&logoColor=black" alt="All Sizes"/></a></p>
Sharp, temporally consistent metric depth from a single camera, for photos and videos. These arethe Core ML packages (`.mlpackage`) of the torch models on the [Depth Pro 2 page](https://huggingface.co/apple/DepthPro2).
## Models
| Model | Package | Size ||:---:|---|---:|| S | [`depthpro2-s_w4.mlpackage`](https://huggingface.co/apple/DepthPro2-coreml/tree/main/depthpro2-s_w4.mlpackage) | 51 MB || B | [`depthpro2-b_w4.mlpackage`](https://huggingface.co/apple/DepthPro2-coreml/tree/main/depthpro2-b_w4.mlpackage) | 188 MB || L | [`depthpro2-l_w4.mlpackage`](https://huggingface.co/apple/DepthPro2-coreml/tree/main/depthpro2-l_w4.mlpackage) | 891 MB || H+ | [`depthpro2-h_w4.mlpackage`](https://huggingface.co/apple/DepthPro2-coreml/tree/main/depthpro2-h_w4.mlpackage) | 1.6 GB || Field of view | [`depthpro2-fov_512x896.mlpackage`](https://huggingface.co/apple/DepthPro2-coreml/tree/main/depthpro2-fov_512x896.mlpackage) | 91 MB |
Larger models give sharper, steadier depth; smaller ones run faster. On a laptop, start with S.
- **Window.** `w4` is a temporal window of 4 frames. The model takes one frame at a time and keeps the earlier ones in its state, so create a new state for each new video.- **Sizes.** Each depth package has one function per input size, named `res_<W>x<H>`: `res_854x480` (default), `res_640x360`, `res_896x512`, `res_1138x640` and `res_1280x720`.- **Field of view.** The field-of-view package has a single size, 896x512, for 16:9 frames. It estimates the focal length of cameras that don't report it.- **Memory.** It grows quickly with the size: S needs about 1.5 GB at 854x480 and 5 GB at 1280x720; L about 4 GB and 18 GB. On a Mac with 16 GB, use S or B, or keep to the default size.
Requires Apple silicon and macOS 15 or later.
## Try it
Clone the [GitHub repository](https://github.com/apple-aiml-research/ml-depth-pro-2), put a depth package (and the field-of-view package, for cameras without a known focal length) next to each other, and run the Mac demo on it:
```bash./demo/run.sh depthpro2-s_w4.mlpackage```
To build a package at your own size `-s HxW` and window `-w`, see the [demo's README](https://github.com/apple-aiml-research/ml-depth-pro-2/blob/main/demo/README.md):
```bashuv run --extra coreml python -m demo.export stream -m depthpro2-s -w 4 -s 480x854```
## Use in Swift
```swiftimport CoreML
let compiled = try MLModel.compileModel(at: URL(filePath: "depthpro2-s_w4.mlpackage"))let config = MLModelConfiguration()config.computeUnits = .cpuAndGPUconfig.functionName = "res_854x480" // omit for the default sizelet model = try MLModel(contentsOf: compiled, configuration: config)
let state = model.makeState() // a new state starts a new video
// frame: float16 MLMultiArray (1, 3, 480, 854), RGB in [0, 1]let input = try MLDictionaryFeatureProvider(dictionary: ["frame": MLFeatureValue(multiArray: frame)])let output = try model.prediction(from: input, using: state)let inverseDepth = output.featureValue(for: "inverse_depth")!.multiArrayValue! // (1, 480, 854)```
`inverse_depth` is normalized by the focal length: depth in meters is `f_px / (W * inverse_depth)`, with `f_px` the focal length in pixels of the H×W frame. The demo's [Preprocess.swift](https://github.com/apple-aiml-research/ml-depth-pro-2/blob/main/demo/apple/Sources/demo/Preprocess.swift) shows how to prepare camera frames.
Videos and the torch models are on the [Depth Pro 2 page](https://huggingface.co/apple/DepthPro2).
## License
The weights are released under the [Apple Machine Learning Research Model license](https://github.com/apple-aiml-research/ml-depth-pro-2/blob/main/LICENSE_MODEL), forresearch use only: non-commercial scientific research and academic development.
## Citation
```bibtex@article{DepthPro2:2026:arxiv, title = {Depth Pro 2: Sharp and Temporally Consistent Metric Monocular Depth}, author = {Peiyun Hu and Marko Mihajlovic and Lyndon Duong and Lahav Lipson and Wei Dong and Ama\"{e}l Delaunoy and Stephan R. Richter and Vladlen Koltun}, journal = {arXiv preprint arXiv:2611.26603}, year = {2026}, url = {https://arxiv.org/abs/2611.26603},}```123version https://git-lfs.github.com/spec/v1oid sha256:b322cf6d7773bc3e7b79c56072d09a4ac8ad0ffc38262f34a27b1dace4e064a6size 1516748123version https://git-lfs.github.com/spec/v1oid sha256:6f47f78fcc7054239bd1f9653b82179e622b0adff0c30877b495f62bf56c37bcsize 195845120123456789101112131415161718{ "fileFormatVersion": "1.0.0", "itemInfoEntries": { "5EA9BB30-9D1E-409C-A93F-AD4543889F82": { "author": "com.apple.CoreML", "description": "CoreML Model Specification", "name": "model.mlmodel", "path": "com.apple.CoreML/model.mlmodel" }, "D9E5B156-5673-4B6B-A222-6B5FE96BA5E4": { "author": "com.apple.CoreML", "description": "CoreML Model Weights", "name": "weights", "path": "com.apple.CoreML/weights" } }, "rootModelIdentifier": "5EA9BB30-9D1E-409C-A93F-AD4543889F82"}123version https://git-lfs.github.com/spec/v1oid sha256:24599846e18fb7593dc5034fae811e56f79bb6310eb57ed63a96bae768b9e862size 195323123version https://git-lfs.github.com/spec/v1oid sha256:1d95a062127b46b7d81d393aac28d58b9dec03f5535409267ee32a14ccf984f5size 95201984123456789101112131415161718{ "fileFormatVersion": "1.0.0", "itemInfoEntries": { "2709CFF1-92CF-42CC-B461-8484EC6B44FB": { "author": "com.apple.CoreML", "description": "CoreML Model Weights", "name": "weights", "path": "com.apple.CoreML/weights" }, "FF35A4ED-4FD1-485B-B1F4-12ADD4445D52": { "author": "com.apple.CoreML", "description": "CoreML Model Specification", "name": "model.mlmodel", "path": "com.apple.CoreML/model.mlmodel" } }, "rootModelIdentifier": "FF35A4ED-4FD1-485B-B1F4-12ADD4445D52"}123version https://git-lfs.github.com/spec/v1oid sha256:5c841cde5136756603844f1dff3499bc0cd0735c358eecad87d8986de0e8893dsize 3578548123version https://git-lfs.github.com/spec/v1oid sha256:7041d5a065be71dda759f7867f9b6e9df9237c85a5528ea9c5ca0da314271761size 1747059840123456789101112131415161718{ "fileFormatVersion": "1.0.0", "itemInfoEntries": { "8CB2C97A-B770-4C25-A6B4-B0FF5C6ECD07": { "author": "com.apple.CoreML", "description": "CoreML Model Specification", "name": "model.mlmodel", "path": "com.apple.CoreML/model.mlmodel" }, "CC198288-704B-44F8-ADDF-A53299E4E8EC": { "author": "com.apple.CoreML", "description": "CoreML Model Weights", "name": "weights", "path": "com.apple.CoreML/weights" } }, "rootModelIdentifier": "8CB2C97A-B770-4C25-A6B4-B0FF5C6ECD07"}123version https://git-lfs.github.com/spec/v1oid sha256:cb084089632aac4f2bada9f11a7360983b1c44f8ff6d29308a16ac276d44e2d6size 2660607123version https://git-lfs.github.com/spec/v1oid sha256:04d9c145465a3a712cdfa5a4b2b92a15b1380eb63f3cc2c7e2fecdc5272a8fc6size 929862208123456789101112131415161718{ "fileFormatVersion": "1.0.0", "itemInfoEntries": { "033F0889-6F84-49E6-8552-7B0D9787253F": { "author": "com.apple.CoreML", "description": "CoreML Model Weights", "name": "weights", "path": "com.apple.CoreML/weights" }, "90CFFA94-A149-4E2D-B4BF-F98EE33C01F8": { "author": "com.apple.CoreML", "description": "CoreML Model Specification", "name": "model.mlmodel", "path": "com.apple.CoreML/model.mlmodel" } }, "rootModelIdentifier": "90CFFA94-A149-4E2D-B4BF-F98EE33C01F8"}123version https://git-lfs.github.com/spec/v1oid sha256:ebd01de2bc689c93fd51c6d7f3495eb65f1d31e2de8a6c0435eedc5ceee1ea8fsize 1515717123version https://git-lfs.github.com/spec/v1oid sha256:24b741e5608cbdd99bc2b26d4925c410b2d415637c36b1c0b51050af9c9be1dbsize 51437056123456789101112131415161718{ "fileFormatVersion": "1.0.0", "itemInfoEntries": { "90121726-D2FC-413A-913D-DA6798794FFA": { "author": "com.apple.CoreML", "description": "CoreML Model Weights", "name": "weights", "path": "com.apple.CoreML/weights" }, "98E23084-0B5E-400B-8443-EE184D723F87": { "author": "com.apple.CoreML", "description": "CoreML Model Specification", "name": "model.mlmodel", "path": "com.apple.CoreML/model.mlmodel" } }, "rootModelIdentifier": "98E23084-0B5E-400B-8443-EE184D723F87"}.gitattributesAdded+35
LICENSEAdded+88
README.mdAdded+98
depthpro2-b_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
depthpro2-b_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
depthpro2-b_w4.mlpackage/Manifest.jsonAdded+18
depthpro2-fov_512x896.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
depthpro2-fov_512x896.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
depthpro2-fov_512x896.mlpackage/Manifest.jsonAdded+18
depthpro2-fov_512x896.mlpackage/executorch_debug_handle_mapping.jsonAdded
depthpro2-h_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
depthpro2-h_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
depthpro2-h_w4.mlpackage/Manifest.jsonAdded+18
depthpro2-l_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
depthpro2-l_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
depthpro2-l_w4.mlpackage/Manifest.jsonAdded+18
depthpro2-s_w4.mlpackage/Data/com.apple.CoreML/model.mlmodelAdded+3
depthpro2-s_w4.mlpackage/Data/com.apple.CoreML/weights/weight.binAdded+3
depthpro2-s_w4.mlpackage/Manifest.jsonAdded+18