MiDaS v3.1
MiDaS v3.1 from Intel ISL, with a BEiT-L encoder: relative depth from one image. Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
midas-dpt-beit-large-512 | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 386 333 78.8 63.9 58.8 52.2 | 3616 / 3778 2759 / 2898 992 / 1418 1003 / 1436 1088 / 1116 800 (engine) |
Details
- Original code: https://github.com/isl-org/MiDaS at
4545977 - Code licence: MIT (permissive); files:
LICENSE - Weights licence: MIT (assumed from code)
- Licence evidence: https://github.com/isl-org/MiDaS/blob/454597711a62eabcbf7d1e89f3fb9f569051ac9b/LICENSE (weights are release assets of the same repository)
- Training data: 12 datasets (ReDWeb, DIML, Movies, MegaDepth, WSVD, TartanAir, HRWSI, ApolloScape, BlendedMVS, IRS, KITTI, NYU Depth V2) per the MiDaS v3.1 paper (arXiv 2307.14460)
- Options:
input_size= 512 (>= 32) - Kernel libraries:
cudnn_hacc - Variants:
midas-dpt-beit-large-512 - Outputs: inverse_depth; kind:
affine_invariant_inverse - Input size: any H x W >= 8, resized or padded inside the model
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
midas-dpt-beit-large-5123000x4000 (1.8 GiB peak allocated, 1.9 reserved) midas-dpt-beit-large-512994x1482, first call: portable + torch.compile 33 s (cold Inductor cache), TensorRT fp16 54 s (ONNX + engine).midas-dpt-beit-large-512original 994x1482: torch.autocast(fp16) around the forwardmidas-dpt-beit-large-512load / first call: original 5.16 s / 1.135 s, portable 2.49 s / 0.093 s, kernels 0.28† s / 0.067 s- † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
- Protocol, median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls
Measured
AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
midas-dpt-beit-large-512 | NYUv2 test, AbsRel / delta1 | 0.0487 / 0.9789 | 0.0487 / 0.9789 | 0.0487 / 0.9789 | 0.0487 / 0.9789 | |
midas-dpt-beit-large-512 | iBims-1, AbsRel / delta1 | 0.0477 / 0.9727 | 0.0478 / 0.9727 | 0.0477 / 0.9727 | 0.0478 / 0.9726 | |
midas-dpt-beit-large-512 | ETH3D two-view train left, AbsRel / delta1 | 0.0904 / 0.8978 | 0.0906 / 0.8977 | 0.0903 / 0.8979 | 0.0906 / 0.8974 | possibly in the training data |
midas-dpt-beit-large-512 | Middlebury 2014 trainingH left, AbsRel / delta1 | 0.0425 / 0.9906 | 0.0424 / 0.9906 | 0.0425 / 0.9906 | 0.0426 / 0.9907 | possibly in the training data |
Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.
Parity
CPU, float32: max |diff| <= 0.02 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.5 % and p99 <= 2 % of the reference's median |value| (absolute error of the output inverse_depth).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
midas-dpt-beit-large-512 | 0.00213 / 0.00388 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400 |