---
title: depth-anything-v2-base-ONNX
canonical_url: "https://www.modelscope.cn/models/onnx-community/depth-anything-v2-base-ONNX"
md_url: "https://www.modelscope.cn/models/onnx-community/depth-anything-v2-base-ONNX.md"
repository: onnx-community/depth-anything-v2-base-ONNX
last_updated: 2026-07-18
license: cc-by-nc-4.0
model_type:
  - depth_anything
base_model:
  - depth-anything/Depth-Anything-V2-Base
base_model_relation: finetune
library_name:
  - onnx
  - pytorch
frameworks:
  - pytorch
downloads: 11
stars: 0
---

# depth-anything-v2-base-ONNX

> depth-anything-v2-base-ONNX - onnx-community 在 ModelScope 开源的模型。https://huggingface.co/depth-anything/Depth-Anything-V2-Base with ONNX weights to be compatible with Transformers.js.

onnx-community/depth-anything-v2-base-ONNX 是 ModelScope 魔搭社区上的机器学习模型，采用 cc-by-nc-4.0 许可，基于 depth-anything/Depth-Anything-V2-Base 构建。

- **Repository**: onnx-community/depth-anything-v2-base-ONNX
- **License**: cc-by-nc-4.0
- **Base model**: depth-anything/Depth-Anything-V2-Base
- **Downloads**: 11
- **Stars**: 0
- **Last updated**: 2026-07-18

Source: https://www.modelscope.cn/models/onnx-community/depth-anything-v2-base-ONNX

---

https://huggingface.co/depth-anything/Depth-Anything-V2-Base with ONNX weights to be compatible with Transformers.js.

## Usage (Transformers.js)

If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
```bash
npm i @huggingface/transformers
```

**Example:** Depth estimation w/ `onnx-community/depth-anything-v2-base`.
```js
import { pipeline } from '@huggingface/transformers';

// Create depth estimation pipeline
const depth_estimator = await pipeline('depth-estimation', 'onnx-community/depth-anything-v2-base-ONNX');

// Predict depth of an image
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
const { depth } = await depth_estimator(url);

// Visualize the output
depth.save('depth.png');
```


![depth](https://cdn-uploads.huggingface.co/production/uploads/61b253b7ac5ecaae3d1efe0c/qNRScsuAcdIB3j8FUgh1P.png)

---

Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
