/ Модель

Характеристики

Лицензия
MIT
Опубликована
10 авг 2026

midas-v2-imx

Оценка глубиныИзображение → depth_map3 профессии

Квантованная версия MiDaS v2.1 Small оценивает относительную глубину сцены по одному RGB-изображению и оптимизирована для NXP i.MX.

265скачиваний за 30 дней0лайковвеса обновлены10 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MiDaS v2.1 Small — модель для оценки относительной глубины по одному RGB-изображению, первоначально разработанная Intel ISL и адаптированная NXP для процессоров i.MX. Компактная архитектура на базе EfficientNet-Lite предсказывает карту обратной глубины (disparity); вход и выход имеют форму 256 × 256 и тип float32, а веса и активации квантованы до int8. Модель распространяется в формате TFLite и рассчитана на работу с LiteRT и NPU i.MX 8M Plus, i.MX 93, i.MX 95 и i.MX 952.

MiDaS обучалась на десяти наборах данных для переноса между разными сценами без дообучения. Версия NXP не переобучалась: к исходной модели применили посттренировочную квантование и компиляцию для поддерживаемого оборудования. Она подходит для встраиваемых сценариев, где нужно оценивать структуру сцены по изображению. Лицензия — MIT.

Модель выдаёт относительную, а не абсолютную глубину, поэтому по её результатам нельзя напрямую определить расстояние в метрах. Качество может снижаться на типах сцен, при освещении или характеристиках камеры, недостаточно представленных в обучающих данных.

Сценарии применения

  • построение карты относительной глубины по кадру с камеры
  • оценка структуры сцены на встраиваемом устройстве
  • выделение ближних и дальних областей изображения
  • визуальная навигация робота или мобильного устройства по оценке глубины

Ограничения

Модель предсказывает относительную обратную глубину, а не реальные расстояния в метрах. Качество может зависеть от типа сцены, освещения и характеристик камеры.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MiDaS v2.1 Small

Overview

MiDaS [1] is a family of deep learning models for monocular depth estimation. Given a single RGB image, the network predicts a relative inverse-depth (disparity) map of the scene. Multiple versions have been created over the years, ranging from CNN-based to Transformer-based architectures. This repository uses the v2.1 Small variant, based on EfficientNet-Lite [2], which is the lightest and fastest member of the family and well suited for edge deployment.

This repository contains the quantized int8 model (float32 input/output) compiled for i.MX 8M Plus, i.MX 93, i.MX 95 and i.MX 952, plus the script used to regenerate these assets (recipe.sh) and an inference example (example.py).

Key Features

  • Monocular depth estimation: Predicts a relative inverse-depth (disparity) map from a single RGB image.
  • Zero-shot cross-dataset transfer: Trained on 10 diverse datasets, giving strong generalization across scenes.
  • Lightweight backbone: EfficientNet-Lite provides a good accuracy / latency trade-off on embedded NPUs.

Model Description

This is a quantized and compiled version of the MiDaS v2.1 Small model, optimized for NXP i.MX processors.

Modifications

This model is a derivative work with the following changes from the original:

  • Quantization: Post-training full integer (int8) quantization of weights and activations, with float32 input and output, using tflite2tensorflow and ~100 calibration images sampled from a commercially-usable ImageNetV2 subset, normalized with data / 255.
  • Compilation (i.MX 93): compiled with Vela for the Ethos-U65 NPU, BSP tags lf-6.18.20_2.0.0 and lf-6.18.37_2.1.0.
  • Compilation (i.MX 95 / i.MX 952): converted with the eIQ Neutron SDK versions 3.1.3, 3.2.1 and 3.2.3.

Original model available at: TFHub (implementation at isl-org/MiDaS).

Model Information

InformationValue
Input shapeRGB image (1, 256, 256, 3), float32 normalized to [0, 1]
Input example (Public domain image)
Output shapeDepth map tensor (1, 256, 256, 1), float32 - relative inverse depth
Output example
FLOPS9.214 GOPs
File size (int8)~17 MB (assets/quantized_tflite_model/midas_v2_1_small_quant.tflite)
Source frameworkPyTorch / TensorFlow Lite

Supported Hardware and Software Configurations

All models run with the eIQ LiteRT (TensorFlow Lite) runtime and the corresponding NPU delegate (VX for i.MX 8M Plus, Ethos-U for i.MX 93, Neutron for i.MX 95 / i.MX 952). Weights and activations are int8; input and output tensors remain float32. The same information is captured in release_manifest.json.

AssetRuntimePrecisionHW targetBSP & SDK versionsLink to asset
i.MX 8M Plus QuantizedLiteRTINT8i.MX 8M Plus-Download
i.MX 93 PrecompiledLiteRTINT8i.MX 93BSP lf-6.18.20_2.0.0, VELA_TAG = lf-6.18.20_2.0.0Download
i.MX 93 PrecompiledLiteRTINT8i.MX 93BSP lf-6.18.37_2.1.0, VELA_TAG = lf-6.18.37_2.1.0Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3Download

The assets/imx8mplus/midas_v2_1_small_quant.tflite file is the same int8 model as assets/quantized_tflite_model/midas_v2_1_small_quant.tflite (identical sha256). The hardware-independent int8 model and its float32 reference are also kept for host (x86) inference and as inputs to the compilers, under assets/quantized_tflite_model/.

Limitations and Biases

This model inherits all limitations from the original MiDaS v2.1 Small model. Additional limitations:

  • Task scope: Produces a relative (not metric/absolute) inverse-depth map; it does not estimate real-world distances.
  • Dataset bias: The model is trained on a mix of outdoor/indoor scene datasets (see Training below); depth quality may vary for scene types, lighting conditions or camera characteristics that are under-represented in those datasets.

Training

The original MiDaS v2.1 Small model was trained by Intel ISL on 10 diverse datasets, including ReDWeb, DIML, Movies, MegaDepth, WSVD, ApolloScape, IRS, HRWSI, TartanAir and BlendedMVS, for zero-shot cross-dataset generalization. The training procedure is described in the original repository and associated papers [1, 3]. NXP did not retrain this model; only post-training quantization and compilation were performed.

Download and Run

The recipe installs the eIQ Neutron SDK from the NXP eIQ PyPI Distribution Portal. Configure pip once to use it:

python -m pip config --user set global.index https://eiq.nxp.com/repository
python -m pip config --user set global.index-url https://eiq.nxp.com/repository
python -m pip config --user set global.trusted-host eiq.nxp.com
python -m pip config --user set global.extra-index-url https://pypi.org/simple
python -m pip config --user set global.find-links https://eiq.nxp.com/repository/

To reproduce the quantized and compiled model files from scratch, run:

bash recipe.sh

This will produce:

  • assets/quantized_tflite_model/midas_v2_1_small_quant.tflite - int8 model for i.MX 8M Plus (CPU/NPU)
  • assets/imx93/<VELA_TAG>/midas_v2_1_small_quant_vela.tflite - Vela-compiled for i.MX 93 Ethos-U65, for each BSP tag in lf-6.18.20_2.0.0, lf-6.18.37_2.1.0
  • assets/imx95/<SDK_VERSION>/midas_v2_1_small_quant_converted.tflite - Neutron-compiled for i.MX 95, for each eIQ Neutron SDK version in 3.1.3, 3.2.1, 3.2.3
  • assets/imx952/<SDK_VERSION>/midas_v2_1_small_quant_converted.tflite - Neutron-compiled for i.MX 952, for each eIQ Neutron SDK version in 3.1.3, 3.2.1, 3.2.3

The script regenerates every BSP/SDK version listed above in a single run, each built in its own isolated virtual environment to avoid dependency conflicts between versions. Model files for earlier eIQ Neutron SDK versions and Vela BSP tags are kept in the repository for users on earlier BSP.

An example of how to run inference is provided in example.py (run on a PC):

# Run on PC:
pip install opencv-python numpy tensorflow matplotlib
python example.py --model assets/quantized_tflite_model/midas_v2_1_small_quant.tflite --input example_input.jpg

Please refer to the i.MX Machine Learning User Guide for details on running models on each target platform.

Full on-device examples leveraging GStreamer/NNStreamer and this model can be found in nxp-nnstreamer-examples on GitHub.

License

This model, including the quantized and compiled assets and the scripts in this repository, is released under the MIT License (see LICENSE). The original MiDaS v2.1 Small model from Intel ISL is also released under the MIT License (see MODEL_LICENSE).

Citation

If you use this model, please cite both this work and the original model:

  • R. Ranftl, K. Lasinger, D. Hafner, K. Schindler and V. Koltun, "Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-Shot Cross-Dataset Transfer," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 44, no. 3, pp. 1623-1637, 2020.
  • EfficientNet-Lite blog post
  • R. Ranftl, A. Bochkovskiy and V. Koltun, "Vision Transformers for Dense Prediction," Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021.
@article{ranftl2020towards,
  title={Towards robust monocular depth estimation: Mixing datasets for zero-shot cross-dataset transfer},
  author={Ranftl, Ren{\'e} and Lasinger, Katrin and Hafner, David and Schindler, Konrad and Koltun, Vladlen},
  journal={IEEE transactions on pattern analysis and machine intelligence},
  volume={44},
  number={3},
  pages={1623--1637},
  year={2020},
  publisher={IEEE}
}

@inproceedings{ranftl2021vision,
  title={Vision transformers for dense prediction},
  author={Ranftl, Ren{\'e} and Bochkovskiy, Alexey and Koltun, Vladlen},
  booktitle={2021 IEEE/CVF International Conference on Computer Vision (ICCV)},
  pages={12159--12168},
  year={2021},
  organization={IEEE}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Библиотека «litert» рантаймом не поддерживается.

Ревизия весов
ed12c84

0 моделей