--- license: apache-2.0 tags: - mlx - depth-estimation - video - video-depth-anything --- # Video Depth Anything Small (MLX) MLX conversion of [depth-anything/Video-Depth-Anything-Small](https://huggingface.co/depth-anything/Video-Depth-Anything-Small) (ByteDance, CVPR 2025 highlight). Consistent monocular video depth estimation: DINOv2-vits backbone + temporal DPT head. Converted with `python -m mlx_vlm.models.video_depth_anything.convert --variant small`. ## Usage ```python from pathlib import Path 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-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).