StereoViT ONNX graphs
export of depth estimation models for ONNX Runtime and Rust
2 min readupdated
A set of ready-to-use ONNX graphs (exported models) for StereoViT by researchers from ETH Zurich, created specifically for the stereovit-rs Rust port. The model takes a pair of stereo images as input (left and right in normalized RGB) and outputs a disparity map (pixel shift for estimating distance to objects). Medium (m) and large (l) size versions are available for fixed resolutions (for example, 952x1680 and 960x1280) in fp32, fp16, and optimized attention (MHA) formats for CUDA and TensorRT. Useful for computer vision developers working with high-performance inference in Rust or Python via ONNX Runtime.
Key features
- Exported from PyTorch via torch.onnx (opset 20) with accuracy verification before saving
- Options with support for CUDA provider, TensorRT (fp16 kernels), and CPU
- Optimized attention versions featuring fused com.microsoft.MultiHeadAttention for CUDA
- Includes json metadata, Middlebury Motorcycle test examples, and a manifest.json file with SHA-256
What you can do
- Integrate models into Rust applications for depth estimation from stereo pairs using stereovit-rs
- Run inference via ONNX Runtime on CUDA or TensorRT with fp16 acceleration
- Use weights for computer vision tasks and generating disparity maps
- Compare performance across various backends (RTX 4080 and others)
Example
An example of usage and file downloading is described in the project repository via manifest.json and the just fetch-models command for checking SHA-256 checksums.
Read more
DetailsBenchmarks (RTX 4080, 952x1680 resolution): stereovit-m/trt-fp16 runs in 75 ms (1.65x speedup over torch-bf16, deviation of 0.1811 px), stereovit-l/trt-fp16 in 202 ms (1.53x, 0.0511 px).
Requirements: ONNX Runtime with CUDA or TensorRT support for optimized graphs.
Limitations: CC BY-NC 4.0 license (decoder parts CC BY-NC-SA 4.0), non-commercial use only with attribution to the StereoViT authors.










Comments