--- 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/tree/v0.49.1/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.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/releases/v0.49.1/depth_anything-onnx-float.zip) | ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/releases/v0.49.1/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.49.1/depth_anything-qnn_dlc-float.zip) | QNN_DLC | w8a16 | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/releases/v0.49.1/depth_anything-qnn_dlc-w8a16.zip) | TFLITE | float | Universal | QAIRT 2.43, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything/releases/v0.49.1/depth_anything-tflite-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/tree/v0.49.1/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/tree/v0.49.1/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 | 34.956 ms | 5 - 663 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® X2 Elite | 34.486 ms | 51 - 51 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® X Elite | 79.348 ms | 50 - 50 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 55.548 ms | 0 - 852 MB | NPU | Depth-Anything | ONNX | float | Qualcomm® QCS8550 (Proxy) | 75.974 ms | 0 - 55 MB | NPU | Depth-Anything | ONNX | float | Qualcomm® QCS9075 | 98.569 ms | 3 - 9 MB | NPU | Depth-Anything | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 41.337 ms | 2 - 657 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 27.119 ms | 3 - 575 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® X2 Elite | 26.248 ms | 30 - 30 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® X Elite | 54.935 ms | 29 - 29 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 40.72 ms | 3 - 1050 MB | NPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCS6490 | 3239.547 ms | 159 - 164 MB | CPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 55.867 ms | 0 - 725 MB | NPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCS9075 | 79.176 ms | 2 - 5 MB | NPU | Depth-Anything | ONNX | w8a16 | Qualcomm® QCM6690 | 1687.184 ms | 160 - 175 MB | CPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 32.243 ms | 3 - 837 MB | NPU | Depth-Anything | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1621.137 ms | 160 - 177 MB | CPU | Depth-Anything | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 36.061 ms | 3 - 505 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® X2 Elite | 34.659 ms | 3 - 3 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® X Elite | 76.291 ms | 3 - 3 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 54.577 ms | 3 - 663 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 176.103 ms | 0 - 491 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 74.855 ms | 3 - 5 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® SA8775P | 80.684 ms | 1 - 496 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS9075 | 96.443 ms | 3 - 9 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 118.134 ms | 0 - 608 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® SA7255P | 176.103 ms | 0 - 491 MB | NPU | Depth-Anything | QNN_DLC | float | Qualcomm® SA8295P | 104.536 ms | 0 - 520 MB | NPU | Depth-Anything | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 40.791 ms | 2 - 496 MB | NPU | Depth-Anything | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 31.464 ms | 1 - 465 MB | NPU | Depth-Anything | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 50.445 ms | 0 - 595 MB | NPU | Depth-Anything | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 176.503 ms | 1 - 445 MB | NPU | Depth-Anything | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 72.401 ms | 1 - 12 MB | NPU | Depth-Anything | TFLITE | float | Qualcomm® SA8775P | 377.281 ms | 1 - 444 MB | NPU | Depth-Anything | TFLITE | float | Qualcomm® QCS9075 | 89.487 ms | 1 - 58 MB | NPU | Depth-Anything | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 105.206 ms | 1 - 582 MB | NPU | Depth-Anything | TFLITE | float | Qualcomm® SA7255P | 176.503 ms | 1 - 445 MB | NPU | Depth-Anything | TFLITE | float | Qualcomm® SA8295P | 101.06 ms | 1 - 435 MB | NPU | Depth-Anything | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.697 ms | 1 - 458 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).