All models

MiDaS_small (MiDaS)

MiDaS v2.1 Small: a 21M-parameter convolutional network predicting relative inverse depth from one image.

Depth estimation · 444 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (30 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
21.3M
Operations
444
Framework
PyTorch
Recurrent
No
Published
TPAMI (arXiv 2019)
Cited by
47 (as of 17 October 2026)
Authors
René Ranftl, Katrin Lasinger, David Hafner and others
Name in source
midas:MiDaS_small
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m5858
Graph hash
c972120653656078d838c3c26a7058ce87f412912031718653e10a7a255dddfe
Skeleton hash
970d7b517defd2f07fdb3d32e2c95fd5e3391f91a96c913135f5dc710bff6029
Architecture hash
2559e66f7a30960c36a649f3f4fb9d4facfcc04a09a056222af6537aa1a8af33
Diagram SHA-256
8f0e2f3a3e5149d167f9cd4f4e67c401777c1512c180930ee8aa681376d91b85
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

MiDaS v2.1 Small is the light-weight member of the MiDaS family of single-image depth networks, a new light-weight model that achieves real-time performance on mobile platforms. The repository it ships from contains code to compute depth from a single image. The checkpoint traced here is midas_v21_small_256, listed alongside midas_v21_384 as the legacy convolutional models of MiDaS 2.1.

The recipe comes from a paper whose key idea is a set of tools that enable mixing multiple datasets during training, even if their annotations are incompatible. Three ingredients carry it: a robust training objective that is invariant to changes in depth range and scale, principled multi-objective learning to combine data from different sources, and pretraining encoders on auxiliary tasks. Prediction happens in disparity space, inverse depth up to scale and shift, with a family of scale- and shift-invariant dense losses. One of the robust losses trims the 20% largest residuals in every image, irrespective of their magnitude. The reasoning is that outliers in the ground truth should never influence training. The training mix used five diverse datasets, including a new, massive data source: 3D films. Combining all five datasets with Pareto-optimal mixing yielded the paper's best-performing model. In general, the authors find that ImageNet performance of an encoder is a strong predictor for its performance in monocular depth estimation.

Generalization is measured by zero-shot cross-dataset transfer, evaluating on datasets that were not seen during training. The experiments confirm that mixing data from complementary sources greatly improves monocular depth estimation. The authors argue that the strong performance of the model is not only due to increased network capacity, but fundamentally due to the proposed training scheme. MiDaS v2.1 also brought a new model that was trained on 10 datasets and is on average about 10% more accurate than MiDaS v2.0. By default the inference resizes the height of input images to the size of a model, given by the numbers in the model names, so 256 for this one. The official accuracy table reports the number of parameters in millions and the frames per second for inference at the training resolution on an RTX 3090 GPU. Its v2.1 Small 256 row reads 21 and 90 in those two columns. For inference on Intel CPUs, OpenVINO may be used for the small legacy model.

Key idea. MiDaS develops tools that enable mixing multiple depth datasets during training, even if their annotations are incompatible. The v2.1 Small checkpoint brings that to a new light-weight model that achieves real-time performance on mobile platforms.

  • MiDaS
  • MiDaS v2.1 Small
  • MiDaS_small
  • MidasNet_small
  • midas_v21_small_256
  • monocular depth estimation
  • single-image depth
  • relative depth
  • inverse depth
  • zero-shot cross-dataset transfer
  • EfficientNet-Lite3
  • Intel ISL
  • Towards Robust Monocular Depth Estimation

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{ranftl2020robustmonoculardepthestimation,
      title={Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer}, 
      author={René Ranftl and Katrin Lasinger and David Hafner and Konrad Schindler and Vladlen Koltun},
      year={2020},
      eprint={1907.01341},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1907.01341}, 
}