Video Depth Anything Base (MLX)

MLX conversion of depth-anything/Video-Depth-Anything-Base (ByteDance, CVPR 2025 highlight). Consistent monocular video depth estimation: DINOv2 backbone + temporal DPT head.

Converted with python -m mlx_vlm.models.video_depth_anything.convert --variant base.

Usage

from mlx_vlm.utils import load_model, get_model_path
from mlx_vlm.models.video_depth_anything.processing_video_depth_anything import (
    VideoDepthProcessor,
)
from mlx_vlm.models.video_depth_anything.generate import (
    VideoDepthPredictor,
    read_video_frames,
)

path = get_model_path("jarjoura/video-depth-anything-base-mlx")
model = load_model(path)
processor = VideoDepthProcessor.from_pretrained(path)
predictor = VideoDepthPredictor(model, processor)

frames, fps = read_video_frames("input.mp4", max_len=300, target_fps=15)
depths = predictor.infer(frames)  # (T, H, W) float32 depth maps

Validated against the PyTorch reference: ~1e-5 max relative error on CPU, ~1% on GPU (Metal fast-math).

Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
·
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support