--- 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_v2/web-assets/model_demo.png) # Depth-Anything-V2: 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-V2 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_v2) 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_v2/releases/v0.54.0/depth_anything_v2-onnx-float.zip) | QNN_DLC | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything_v2/releases/v0.54.0/depth_anything_v2-qnn_dlc-float.zip) | QNN_DLC | w8a16 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything_v2/releases/v0.54.0/depth_anything_v2-qnn_dlc-w8a16.zip) | TFLITE | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything_v2/releases/v0.54.0/depth_anything_v2-tflite-float.zip) For more device-specific assets and performance metrics, visit **[Depth-Anything-V2 on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/depth_anything_v2)**. ### 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_v2) 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-V2 on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/depth_anything_v2) for usage instructions. ## Model Details **Model Type:** Model_use_case.depth_estimation **Model Stats:** - Model checkpoint: DepthAnything_V2_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-V2 | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 18.537 ms | 3 - 418 MB | NPU | Depth-Anything-V2 | ONNX | float | Snapdragon® 8 Elite Mobile | 22.839 ms | 2 - 433 MB | NPU | Depth-Anything-V2 | ONNX | float | Snapdragon® X2 Elite | 18.701 ms | 48 - 48 MB | NPU | Depth-Anything-V2 | ONNX | float | Snapdragon® X Elite | 45.117 ms | 47 - 47 MB | NPU | Depth-Anything-V2 | ONNX | float | Snapdragon® X Elite | 45.117 ms | 47 - 47 MB | NPU | Depth-Anything-V2 | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 31.951 ms | 1 - 571 MB | NPU | Depth-Anything-V2 | ONNX | float | Qualcomm® QCS8550 (Proxy) | 43.774 ms | 0 - 58 MB | NPU | Depth-Anything-V2 | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 22.839 ms | 2 - 433 MB | NPU | Depth-Anything-V2 | ONNX | float | Qualcomm® QCS9075 | 54.667 ms | 3 - 9 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 19.771 ms | 3 - 381 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 24.837 ms | 3 - 389 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Snapdragon® X2 Elite | 20.25 ms | 3 - 3 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Snapdragon® X Elite | 51.277 ms | 3 - 3 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Snapdragon® X Elite | 51.277 ms | 3 - 3 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 38.857 ms | 3 - 513 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 51.036 ms | 3 - 6 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® SA8775P | 56.629 ms | 0 - 369 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® SA8775P | 56.629 ms | 0 - 369 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® SA8775P | 56.629 ms | 0 - 369 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® SA7255P | 142.323 ms | 1 - 388 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 92.825 ms | 3 - 487 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® SA8295P | 82.742 ms | 3 - 365 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 24.837 ms | 3 - 389 MB | NPU | Depth-Anything-V2 | QNN_DLC | float | Qualcomm® QCS9075 | 62.094 ms | 3 - 9 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 82.19 ms | 2 - 2008 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 94.996 ms | 2 - 2017 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 70.717 ms | 2 - 2 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Snapdragon® X Elite | 137.583 ms | 2 - 2 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Snapdragon® X Elite | 137.583 ms | 2 - 2 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 111.762 ms | 2 - 2296 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 142.655 ms | 2 - 4 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Qualcomm® SA8775P | 142.04 ms | 2 - 2000 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Qualcomm® SA8775P | 142.04 ms | 2 - 2000 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Qualcomm® SA8775P | 142.04 ms | 2 - 2000 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Qualcomm® SA7255P | 259.475 ms | 2 - 1998 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 94.996 ms | 2 - 2017 MB | NPU | Depth-Anything-V2 | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 141.65 ms | 2 - 5 MB | NPU | Depth-Anything-V2 | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 19.63 ms | 1 - 389 MB | NPU | Depth-Anything-V2 | TFLITE | float | Snapdragon® 8 Elite Mobile | 24.623 ms | 1 - 396 MB | NPU | Depth-Anything-V2 | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 38.771 ms | 0 - 511 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 52.273 ms | 1 - 12 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® SA8775P | 56.633 ms | 1 - 379 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® SA8775P | 56.633 ms | 1 - 379 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® SA8775P | 56.633 ms | 1 - 379 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® SA7255P | 142.647 ms | 1 - 395 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 93.061 ms | 1 - 490 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® SA8295P | 82.465 ms | 1 - 370 MB | NPU | Depth-Anything-V2 | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 24.623 ms | 1 - 396 MB | NPU | Depth-Anything-V2 | TFLITE | float | Qualcomm® QCS9075 | 61.348 ms | 1 - 57 MB | NPU ## License * The license for the original implementation of Depth-Anything-V2 can be found [here](https://github.com/huggingface/transformers/blob/main/LICENSE). ## References * [Depth Anything V2](https://arxiv.org/abs/2406.09414) * [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).