--- license: apache-2.0 pipeline_tag: depth-estimation library_name: executorch base_model: depth-anything/Depth-Anything-V2-Small-hf --- # depth-anything-v2 This repository hosts **Depth Anything V2 Small** (ViT-S/14) exported for [React Native ExecuTorch](https://www.npmjs.com/package/react-native-executorch) as ExecuTorch `.pte` programs for on-device relative depth estimation. Upstream model: [depth-anything/Depth-Anything-V2-Small-hf](https://huggingface.co/depth-anything/Depth-Anything-V2-Small-hf), revision `5426e4f0f36572d16453bbda7a8389317b1bef99`. ## Variants | Path | Backend | Precision | | --- | --- | --- | | `small/xnnpack/depth_anything_v2_small_xnnpack_fp32.pte` | xnnpack | fp32 | | `small/xnnpack/depth_anything_v2_small_xnnpack_int8.pte` | xnnpack | int8 | | `small/coreml/depth_anything_v2_small_coreml_fp16.pte` | coreml | fp16 | | `small/vulkan/depth_anything_v2_small_vulkan_fp16.pte` | vulkan | fp16 | ## XNNPACK int8 The INT8 export uses dynamic INT8 activations and per-channel INT8 weights for linear layers; convolutions remain floating point. Public inputs and outputs remain float32. Numerical agreement with the float reference on four held-out upstream example illustrations (`demo17`–`demo20`): | Image | Range-normalized RMSE | Correlation | | --- | --- | --- | | demo17 | 1.24% | 0.999633 | | demo18 | 1.34% | 0.999104 | | demo19 | 0.47% | 0.999970 | | demo20 | 1.28% | 0.999690 | Range-normalized RMSE is RMSE divided by the reference depth range. These are numerical export checks, not depth-accuracy benchmarks. A synthetic random-input check reached 3.32% range-normalized RMSE (correlation 0.990703). ## Repository structure ``` config.json 39 B small/coreml/config.json 879 B small/coreml/depth_anything_v2_small_coreml_fp16.pte 50.2 MB small/vulkan/config.json 879 B small/vulkan/depth_anything_v2_small_vulkan_fp16.pte 49.6 MB small/xnnpack/config.json 1.5 kB small/xnnpack/depth_anything_v2_small_xnnpack_fp32.pte 99.0 MB small/xnnpack/depth_anything_v2_small_xnnpack_int8.pte 35.5 MB ``` ## Compatibility These files are published for the **ExecuTorch v1.4.1** runtime. ExecuTorch gives no forward compatibility guarantee, so an older runtime may fail to load them. For React Native ExecuTorch model loading, see the [documentation](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/downloading-models). To load these files in your own runtime, read the [compatibility note](https://github.com/pytorch/executorch/blob/main/runtime/COMPATIBILITY.md).