leggedrobotics/defm

source code and trained models for DeFM (Depth Foundation Model)

What it solves

Robots often rely on depth data, but models trained on color images don't transfer well to depth-only inputs or to different sensors. DeFM gives robots a pretrained backbone that understands depth images directly, with metric (real-world scale) awareness, so it works across sim and real, and different sensors, without task-specific fine-tuning.

How it works

DeFM is a DINO-style self-distillation encoder trained on 60M depth images. A three-channel normalization preserves metric depth across scales. The largest ViT-L/14 (304M params) is distilled into smaller efficient CNNs (down to 3M params) for fast policy learning. Loading is easy via torch.hub or pip install, and depth maps are preprocessed into the required format.

Who it's for

Robotics researchers and engineers who need a robust depth-image feature extractor for perception in navigation, manipulation, locomotion, and sim-to-real transfer. Also useful for anyone working on depth-based classification or segmentation (benchmarks include ScanNet, SUN RGB-D, TartanGround, ImageNet-1k-Depth).

Highlights

  • Trained on 60M depth images via self-distillation.
  • Metric-aware normalization preserves real-world scale.
  • Semantically rich features from depth alone.
  • Model family from 304M ViT to 3M CNN for deployment on edge devices.
  • Proven on robotics tasks without task-specific fine-tuning.
  • Easy integration via pip install and PyTorch Hub.

Related

  • Project
  • Project
  • Project
  • Project