Video Depth Anything Small (Metric) (MLX)
MLX conversion of depth-anything/Metric-Video-Depth-Anything-Small (ByteDance, CVPR 2025 highlight). Consistent monocular video depth estimation: DINOv2 backbone + temporal DPT head. This is the metric (absolute depth in meters) variant.
Converted with python -m mlx_vlm.models.video_depth_anything.convert --variant small-metric.
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-small-metric-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).