--- library_name: pytorch license: other tags: - android pipeline_tag: depth-estimation --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/web-assets/model_demo.png) # Depth-Anything: Optimized for Qualcomm Devices Depth Anything is designed for estimating depth at each point in an image. This is based on the implementation of Depth-Anything found [here](https://github.com/huggingface/transformers/tree/main/src/transformers/models/depth_anything). This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/depth_anything) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary). Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device. ## Getting Started There are two ways to deploy this model on your device: ### Option 1: Download Pre-Exported Models Below are pre-exported model assets ready for deployment. | Runtime | Precision | Chipset | SDK Versions | Download | |---|---|---|---|---| | ONNX | float | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/releases/v0.50.2/depth_anything-onnx-float.zip) | ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/releases/v0.50.2/depth_anything-onnx-w8a16.zip) | QNN_DLC | float | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/releases/v0.50.2/depth_anything-qnn_dlc-float.zip) For more device-specific assets and performance metrics, visit **[Depth-Anything on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/depth_anything)**. ### Option 2: Export with Custom Configurations Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/depth_anything) Python library to compile and export the model with your own: - Custom weights (e.g., fine-tuned checkpoints) - Custom input shapes - Target device and runtime configurations This option is ideal if you need to customize the model beyond the default configuration provided here. See our repository for [Depth-Anything on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/depth_anything) for usage instructions. ## Model Details **Model Type:** Model_use_case.depth_estimation **Model Stats:** - Model checkpoint: DepthAnything_Small - Input resolution: 518x518 - Number of parameters: 24.7M - Model size (float): 94.3 MB ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | Depth-Anything | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 22.355 ms | 5 - 835 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® X2 Elite | 23.428 ms | 51 - 51 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® X Elite | 56.096 ms | 50 - 50 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 37.792 ms | 0 - 874 MB | NPU | Depth-Anything | ONNX | float | Qualcomm® QCS8550 (Proxy) | 54.243 ms | 0 - 61 MB | NPU | Depth-Anything | ONNX | float | Qualcomm® QCS9075 | 71.689 ms | 3 - 9 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 30.038 ms | 2 - 648 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 23.62 ms | 15 - 783 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® X2 Elite | 26.409 ms | 34 - 34 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® X Elite | 52.349 ms | 32 - 32 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 36.834 ms | 0 - 1014 MB | NPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCS6490 | 3211.706 ms | 150 - 156 MB | CPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 49.627 ms | 12 - 17 MB | NPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCS9075 | 74.383 ms | 12 - 17 MB | NPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCM6690 | 1665.551 ms | 140 - 155 MB | CPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 30.558 ms | 14 - 769 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1611.546 ms | 150 - 167 MB | CPU | Depth-Anything | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 21.223 ms | 3 - 485 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® X2 Elite | 22.232 ms | 3 - 3 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® X Elite | 55.931 ms | 3 - 3 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 38.478 ms | 0 - 609 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 144.042 ms | 1 - 466 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 53.468 ms | 3 - 535 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® SA8775P | 59.426 ms | 1 - 465 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS9075 | 75.648 ms | 3 - 9 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 90.708 ms | 2 - 563 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® SA7255P | 144.042 ms | 1 - 466 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® SA8295P | 80.664 ms | 0 - 456 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 26.804 ms | 0 - 468 MB | NPU ## License * The license for the original implementation of Depth-Anything can be found [here](https://github.com/huggingface/transformers/blob/main/LICENSE). ## References * [Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data](https://arxiv.org/abs/2401.10891) * [Source Model Implementation](https://github.com/huggingface/transformers/tree/main/src/transformers/models/depth_anything) ## Community * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI. * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).