New C++ Port of Depth Anything 3 Runs Faster Than PyTorch With No Python or CUDA Required
Summary
A new open-source C++17 port of ByteDance's Depth Anything 3 model runs up to 1.31x faster than PyTorch on CPU, uses half the memory, loads 6.7x faster, and requires no Python, PyTorch, or CUDA — delivering monocular depth estimation and 3D point cloud export from a single image in a compact 99 MB quantized package.
Key Points
- A new open-source project called depth-anything.cpp delivers a from-scratch C++17/ggml port of ByteDance's Depth Anything 3 model, enabling monocular metric depth estimation, camera pose inference, and 3D point cloud export from a single image with no Python, PyTorch, or CUDA required at inference.
- Running as a self-contained GGUF file with support for quantization down to 99 MB (q4_k), the engine outperforms PyTorch on CPU by up to 1.31x at q8_0 while using half the memory and loading approximately 6.7x faster, with bit-exact output verified at correlation 1.0 against the reference model.
- The project supports the full Depth Anything 3 and V2 model families, exposes a flat C API for easy embedding in C, C++, Go, or Rust, powers a LocalAI backend with a REST endpoint, and includes dependency-free exporters for glb, COLMAP, and PLY formats.