/ Модель

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

Лицензия
Своя лицензия
Базовая модель
DepthPro2-L
Библиотека
mlx
Опубликована
20 ноя 2026

Depth-Pro-2-MLX-4bit

Оценка глубиныИзображение → depth_map3 профессии
0скачиваний за 30 дней0лайковвеса обновлены20 ноя 2026

Описание модели

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

Квантизованная 4-битная MLX-конверсия Apple Depth Pro 2 для оценки метрической глубины по монокулярному изображению.

Depth Pro 2 MLX 4-bit — неофициальная конверсия сообщества модели Apple для оценки метрической глубины по одному изображению. Репозиторий подготовлен для MLX и содержит варианты L и H+; в варианте H+ указано 872 млн параметров, а в L — 334 млн. Модель принимает изображение и оценивает глубину сцены, а также фокусное расстояние с помощью общей отдельной головы FOV.

Это конверсия весов без переобучения: линейные слои энкодера квантизованы до 4 бит с размером группы 64, а некоторые компоненты оставлены в BF16 или FP32. Автор проверил согласованность результатов с BF16 на одном изображении и его обрезке; эти испытания не дают оценки точности на разнообразных данных. Для запуска требуются MLX и порт depth_pro_2_mlx. Лицензия Apple Machine Learning Research Model License Agreement разрешает только некоммерческие научные исследования и академическую разработку; конверсия не является продуктом Apple и не одобрена компанией.

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

  • оценка метрической глубины по фотографии
  • построение карты глубины сцены на Mac с Apple Silicon
  • эксперименты с монокулярным восприятием глубины
  • оценка фокусного расстояния изображения

Ограничения

Сопоставление качества основано на одном изображении и его обрезке, поэтому не подтверждает точность на разнообразных сценах. Модель предназначена только для некоммерческих научных исследований и академической разработки; в README также отмечены сбои FP16 на некоторых входах в ранних полноточных тестах MLX.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

Depth Pro 2 MLX 4-bit (unofficial)

This is an unofficial community Model Derivative: a 4-bit MLX conversion of Apple Depth Pro 2, Apple's metric monocular depth model. It is not an Apple product, and Apple does not endorse it.

Original weights and research release: apple/DepthPro2, apple/DepthPro2-L, apple/DepthPro2-H, and the shared focal-length estimator apple/DepthPro2-focal. Upstream code: apple-aiml-research/ml-depth-pro-2.

Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement. This conversion is a Model Derivative and is for research use only (non-commercial scientific research and academic development). See LICENSE.

The MLX port this conversion was built with (depth_pro_2_mlx 0.1.0, on MLX 0.32.4) was built by @SpaceXSI with a coding agent.

What's in this repo

Only the sizes that met the inclusion bar below are uploaded.

FolderSizeOriginal repo4-bit bundleOfficial Apple download
L/L (334M)apple/DepthPro2-L272.1 MiB1,274.0 MiB
H/H+ (872M)apple/DepthPro2-H562.6 MiB3,326.9 MiB

Each folder contains model.safetensors and config.json. The bundle includes the encoder (4-bit), the DPT decoder (BF16), the inverse-depth head (FP32), and the shared FOV estimator (BF16 trunk, FP32 head) so a size can be loaded from one folder. load_4bit.py is at the repo root.

How it was converted

This is a weight-only conversion. There was no retraining or fine-tuning.

  • MLX affine quantization, 4 bits, group size 64, applied to the encoder's nn.Linear layers.
  • Kept at higher precision: LayerNorms; class and register-token embeddings; all Conv2d / ConvTranspose2d layers (patch embedding, reassemble, DPT decoder; MLX does not quantize convs this way); the inverse-depth head (FP32, as in the MLX port); and the FOV estimator (BF16/FP32), both for stability and because some FOV linear widths are not divisible by 64.
  • Conv weights are stored in the MLX NHWC layout used by the port.

S and B were converted with the same recipe and checked, but they did not meet the inclusion bar and are not in this repo. For those sizes, use the original Apple weights with the MLX port in BF16.

Accuracy

Measured on a 64GB M5 Pro Mac mini. The inclusion bar was: no NaNs, and inverse-depth Pearson r ≥ 0.999 against the Phase 1 PyTorch MPS BF16 reference (.npz from Apple's official assets/example.jpg at native 1920×1440). MLX BF16 numbers are from the same photo and the same references, for comparison.

Focal length is estimated by the FOV head, which was not quantized. The 0.581 px difference versus the PyTorch reference is the same as MLX BF16.

Official photo (1920×1440) vs Phase 1 reference

SizeUploaded4-bit Pearson rBF16 Pearson r4-bit median rel. errorBF16 median rel. error4-bit NaNsFOV error vs ref (px)
Sno0.994990.999960.04890.0033600.581
Bno0.996530.999980.15520.0021700.581
Lyes0.999590.999990.01230.0020400.581
H+yes0.999861.000000.03110.0023000.581

4-bit vs BF16 parity

1280×720 cover-crop, 4-bit vs same-session MLX BF16

There is no Phase 1 720p reference file. This comparison uses the same cover-crop of example.jpg that the Phase 1/2 speed tests used (first frame, no pan), and compares 4-bit inverse depth to a same-session MLX BF16 run.

Size4-bit vs BF16 Pearson r4-bit vs BF16 median rel. error4-bit NaNs
S0.994210.04460
B0.997140.15690
L0.998970.04160
H+0.999730.04050

Load memory, informational only (Metal peak after loading the 4-bit bundle, not a speed test): L 282.8 MiB, H+ 576.2 MiB.

How to run it

Install the community MLX port (depth_pro_2_mlx 0.1.0) and MLX 0.32.4 or later, then:

from pathlib import Path
from huggingface_hub import snapshot_download
from depth_pro_2_mlx import load_rgb, to_normalized

repo = snapshot_download("pratikgx/Depth-Pro-2-MLX-4bit")
# load_4bit.py lives at the repo root
import sys
sys.path.insert(0, repo)
from load_4bit import load_depth_pro_2_mlx_4bit

model = load_depth_pro_2_mlx_4bit(Path(repo) / "L")   # or Path(repo) / "H" for H+
image, f_px = load_rgb("photo.jpg")
prediction = model.infer(to_normalized(image), f_px=f_px)
depth = prediction["depth"]                  # meters
inverse_depth = prediction["inverse_depth"]
focal = prediction["focallength_px"]

Use BF16 for full-precision work with the MLX port (the loader already builds the unquantized parts in BF16 / FP32). Prefer size L or H+ from this repo when you want the 4-bit weights.

Caveats

  • These 4-bit quality numbers come from a small test set: one official photo at native resolution, plus one 1280×720 cover-crop of that photo. They are not a dataset-wide accuracy claim.
  • In earlier full-precision MLX tests, FP16 produced all-NaN depth maps on some inputs. Use BF16 for full precision, not FP16.
  • This conversion does not change the original research-only license. Do not use the original weights or this derivative in a commercial product or service.
  • Depth Pro 2 is Apple's model. This repository only provides a quantized MLX packing of it.

License and attribution

Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.

This repository redistributes a Model Derivative of Apple Depth Pro 2. The modifications are: conversion to the MLX weight layout, and affine 4-bit weight-only quantization (group size 64) of encoder linear layers, with the layers listed above left in BF16 or FP32. The LICENSE file in this repository is a copy of that agreement.

The name, trademarks, service marks, or logos of Apple may not be used to endorse or promote this derivative.

Write-up on GitHub

How I ran this, what broke, and the scripts: Apple Depth Pro 2 (Core ML, PyTorch, MLX). It's part of Local AI field notes, where I log every model I run on my Mac mini.

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

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

GPU в ailist

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

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

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

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

0 моделей