--- license: cc-by-nc-4.0 tags: - mlx - depth-estimation - video-depth-anything --- # Video Depth Anything Base (MLX) MLX port of [Video Depth Anything](https://github.com/DepthAnything/Video-Depth-Anything) (ByteDance, CVPR 2025 highlight): consistent monocular depth estimation for arbitrarily long videos. Converted from the official checkpoint [`depth-anything/Video-Depth-Anything-Base`](https://huggingface.co/depth-anything/Video-Depth-Anything-Base). Architecture: DINOv2 backbone + DPT head with AnimateDiff-style temporal motion modules. Outputs per-frame depth maps, not text. ## Usage ```python from mlx_vlm import load from mlx_vlm.models.video_depth_anything.generate import ( VideoDepthPredictor, read_video_frames, ) model, processor = load("mlx-community/Video-Depth-Anything-Base-MLX") 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 ``` ## Notes - Inputs are channel-last `(B, T, H, W, 3)`; H and W must be multiples of 14. - Metric model: no. Metric models output absolute depth (meters) and skip scale/shift window alignment. - Weights are fp32. On GPU, output matches the PyTorch reference to ~1% relative (Metal fast-math); on CPU to ~1e-5. ## License CC-BY-NC-4.0 (same as the source checkpoint). Non-commercial use only.