Models · Monocular depth

MiDaS v3.1

MiDaS v3.1 from Intel ISL, with a BEiT-L encoder: relative depth from one image. Commercially usable.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
midas-dpt-beit-large-512Middlebury 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-512 3000x4000 (1.8 GiB peak allocated, 1.9 reserved)
  • midas-dpt-beit-large-512 994x1482, first call: portable + torch.compile 33 s (cold Inductor cache), TensorRT fp16 54 s (ONNX + engine).
  • midas-dpt-beit-large-512 original 994x1482: torch.autocast(fp16) around the forward
  • midas-dpt-beit-large-512 load / 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.

variantdatasetoriginal fp32original fp16portablekernelsnote
midas-dpt-beit-large-512NYUv2 test, AbsRel / delta10.0487 / 0.97890.0487 / 0.97890.0487 / 0.97890.0487 / 0.9789
midas-dpt-beit-large-512iBims-1, AbsRel / delta10.0477 / 0.97270.0478 / 0.97270.0477 / 0.97270.0478 / 0.9726
midas-dpt-beit-large-512ETH3D two-view train left, AbsRel / delta10.0904 / 0.89780.0906 / 0.89770.0903 / 0.89790.0906 / 0.8974possibly in the training data
midas-dpt-beit-large-512Middlebury 2014 trainingH left, AbsRel / delta10.0425 / 0.99060.0424 / 0.99060.0425 / 0.99060.0426 / 0.9907possibly 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).

variantkernels error vs original, mean / p99GPU, torchkernels used
midas-dpt-beit-large-5120.00213 / 0.00388RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400