OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Depth Anything Onnx

Depth Anything Onnx is a Python repository that adapts Depth Anything and Depth Anything V2 for ONNX export and monocular depth inference. Its command-line tool exports Depth Anything V2 models and runs inference using ONNX Runtime.

Independent OpenViST project profile, based on linked sources.

Depth Anything Onnx — Local model export and inference workflows
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when developing a Python image pipeline that needs monocular depth estimation and you want an ONNX export and ONNX Runtime inference workflow.

Who it is for

  • Developers adding monocular depth estimation to image-processing applications
  • Practitioners building Python inference pipelines around ONNX Runtime
  • Users comparing model export options or working from pre-exported ONNX models

Documented uses

  • Estimate depth from a single input image using an exported model.
  • Export a Depth Anything V2 encoder to ONNX or a PyTorch 2 program.
  • Use an existing ONNX model as a starting point for an image depth-estimation pipeline.
Before you choose

Requirements & limits

  • The repository documents both model export and inference, and links pre-exported ONNX models for users who want to start from an existing model.
  • Its standard export examples include opset selection and dynamic-shape options.
  • The TorchDynamo export path is marked beta and currently supports only static shapes and opset 18.
  • Published CUDA latency examples use an RTX 4080 12GB and report model-only timing, excluding preprocessing and other data-transfer or postprocessing costs.
  • The repository lists an Apache-2.0 license.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run inference with an exported ONNX model

Pass an image and an existing ONNX model to the repository's inference command.

Before you start

  • Python environment with the repository requirements installed
  • An exported ONNX model file, either downloaded from the repository's releases or created separately
  • An image file

Steps

  1. Install the repository requirements.

  2. Obtain an exported ONNX model from the repository releases.

  3. Run the command below, replacing the model and image paths with your files.

    Documented command
    python dynamo.py infer weights/vitb.onnx -i assets/sacre_coeur1.jpg

Expected outcome

The CLI runs Depth Anything V2 inference through ONNX Runtime on the supplied image.

Guide limitations

  • The example identifies ONNX Runtime and OpenCV as inference dependencies and does not require PyTorch for this inference path.
  • The example command uses repository-specific file paths; adapt them to the locations of your model and image.
Source-based practical guide

Export Depth Anything V2 to ONNX

Use the documented standard CLI command to export the ViT-B encoder as an ONNX model.

Before you start

  • Python environment with the repository requirements installed

Steps

  1. Install the repository requirements.

  2. Run the command below.

    Documented command
    python dynamo.py export --encoder vitb --output weights/vitb.onnx --opset 17

Expected outcome

The command requests a ViT-B ONNX export at the specified output path using opset 17.

Guide limitations

  • The repository also documents a TorchDynamo exporter as beta; its current constraints are static shapes and opset version 18.
  • The documented export command does not specify hardware requirements.
COMPARE OPTIONS

Compare options for Model inference and serving

These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.

ProjectDocumented purposePlatformAccess and requirements
Depth Anything OnnxEstimate depth from a single input image using an exported model.Linux, Windows, macOS
EsanetGenerate semantic labels from paired color and depth images.LinuxThe public repository states that its source code is licensed under Apache 2.0.
Ling V2Generate text from chat prompts using Ling-mini-2.0 and Transformers.The repository is public and identifies the project as open source under the MIT license. Model downloads are linked through Hugging Face and ModelScope.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 November 2026
Original website title
fabio-sim/Depth-Anything-ONNX · Official homepage title · retained in its source language