rpx_benchmark.adapters.depth.skeletons

Skeleton adapter classes for every Image Depth (monocular depth) model.

Each class is a one-line subclass of DepthAdapterSkeleton that pins it to a particular MODEL_KEY; the scaffold infers task, depth_output_kind, name, and install_hint from the central ~rpx_benchmark.adapters.depth_scaffold.DEPTH_MODEL_CARDS table.

To implement a real adapter:

  1. Create adapters/depth/<model>.py (e.g. da3.py).
  2. Define a class that subclasses DepthAdapterSkeleton (or ~rpx_benchmark.adapters.base.BenchmarkableModel if you want the input/output adapter composition pattern), sets MODEL_KEY to the same key as the skeleton here, and overrides setup() and predict().
  3. Remove the matching skeleton class from this file (or import the real implementation into __init__.py so it's the one users pick up by default).

The skeleton classes are intentionally one-liners — every other attribute (task, output kind, install hint, paper reference) lives in DEPTH_MODEL_CARDS so there's one canonical source of truth for the roster.

  1"""Skeleton adapter classes for every Image Depth (monocular depth) model.
  2
  3Each class is a one-line subclass of :class:`DepthAdapterSkeleton`
  4that pins it to a particular ``MODEL_KEY``; the scaffold infers
  5``task``, ``depth_output_kind``, ``name``, and ``install_hint`` from
  6the central :data:`~rpx_benchmark.adapters.depth_scaffold.DEPTH_MODEL_CARDS`
  7table.
  8
  9To implement a real adapter:
 10
 111. Create ``adapters/depth/<model>.py`` (e.g. ``da3.py``).
 122. Define a class that subclasses :class:`DepthAdapterSkeleton`
 13   (or :class:`~rpx_benchmark.adapters.base.BenchmarkableModel` if you
 14   want the input/output adapter composition pattern), sets
 15   ``MODEL_KEY`` to the same key as the skeleton here, and overrides
 16   ``setup()`` and ``predict()``.
 173. Remove the matching skeleton class from this file (or import the
 18   real implementation into ``__init__.py`` so it's the one users
 19   pick up by default).
 20
 21The skeleton classes are intentionally one-liners — every other
 22attribute (task, output kind, install hint, paper reference) lives in
 23``DEPTH_MODEL_CARDS`` so there's one canonical source of truth for
 24the roster.
 25"""
 26
 27from __future__ import annotations
 28
 29from ..depth_scaffold import DepthAdapterSkeleton
 30
 31
 32class DA3MetricLAdapter(DepthAdapterSkeleton):
 33    """DA3 Metric-L (Depth Anything 3, metric Large)."""
 34
 35    MODEL_KEY = "da3-metric-l"
 36
 37
 38class DAV2LargeAdapter(DepthAdapterSkeleton):
 39    """Depth Anything V2 — Large metric variant."""
 40
 41    MODEL_KEY = "da-v2-large"
 42
 43
 44class DepthProAdapter(DepthAdapterSkeleton):
 45    """Apple Depth Pro."""
 46
 47    MODEL_KEY = "depth-pro"
 48
 49
 50class UniDepthV2Adapter(DepthAdapterSkeleton):
 51    """UniDepth V2 (Piccinelli et al. 2024)."""
 52
 53    MODEL_KEY = "unidepth-v2"
 54
 55
 56class Metric3DV2Adapter(DepthAdapterSkeleton):
 57    """Metric3D V2."""
 58
 59    MODEL_KEY = "metric3d-v2"
 60
 61
 62class MoGe2ViTLAdapter(DepthAdapterSkeleton):
 63    """MoGe-2 ViT-L (Microsoft, metric)."""
 64
 65    MODEL_KEY = "moge-2-vit-l"
 66
 67
 68class HyDenAdapter(DepthAdapterSkeleton):
 69    """HyDen metric checkpoint."""
 70
 71    MODEL_KEY = "hyden"
 72
 73
 74class Lotus2Adapter(DepthAdapterSkeleton):
 75    """Lotus-2 (He et al. 2024, relative diffusion-based)."""
 76
 77    MODEL_KEY = "lotus-2"
 78
 79
 80class FE2EAdapter(DepthAdapterSkeleton):
 81    """FE2E (relative)."""
 82
 83    MODEL_KEY = "fe2e"
 84
 85
 86class ZipDepthAdapter(DepthAdapterSkeleton):
 87    """ZipDepth compact affine-invariant inverse-depth model."""
 88
 89    MODEL_KEY = "zipdepth"
 90
 91
 92__all__ = [
 93    "DA3MetricLAdapter",
 94    "DAV2LargeAdapter",
 95    "DepthProAdapter",
 96    "UniDepthV2Adapter",
 97    "Metric3DV2Adapter",
 98    "MoGe2ViTLAdapter",
 99    "HyDenAdapter",
100    "Lotus2Adapter",
101    "FE2EAdapter",
102    "ZipDepthAdapter",
103]
class DA3MetricLAdapter(rpx_benchmark.adapters.depth_scaffold.DepthAdapterSkeleton):
33class DA3MetricLAdapter(DepthAdapterSkeleton):
34    """DA3 Metric-L (Depth Anything 3, metric Large)."""
35
36    MODEL_KEY = "da3-metric-l"

DA3 Metric-L (Depth Anything 3, metric Large).

MODEL_KEY = 'da3-metric-l'
name: ClassVar[str] = 'DA3 Metric-L'
install_hint: ClassVar[str] = 'pip install depth-anything-3 (or HF transformers + the depth-anything-v3 weights)'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'metric'
class DAV2LargeAdapter(rpx_benchmark.adapters.depth_scaffold.DepthAdapterSkeleton):
39class DAV2LargeAdapter(DepthAdapterSkeleton):
40    """Depth Anything V2 — Large metric variant."""
41
42    MODEL_KEY = "da-v2-large"

Depth Anything V2 — Large metric variant.

MODEL_KEY = 'da-v2-large'
name: ClassVar[str] = 'DA-V2 Large'
install_hint: ClassVar[str] = 'pip install depth-anything-v2 transformers; metric variant from HF'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'metric'
45class DepthProAdapter(DepthAdapterSkeleton):
46    """Apple Depth Pro."""
47
48    MODEL_KEY = "depth-pro"

Apple Depth Pro.

MODEL_KEY = 'depth-pro'
name: ClassVar[str] = 'Depth Pro'
install_hint: ClassVar[str] = 'pip install depth-pro (Apple); or `pip install git+https://github.com/apple/ml-depth-pro`'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'metric'
class UniDepthV2Adapter(rpx_benchmark.adapters.depth_scaffold.DepthAdapterSkeleton):
51class UniDepthV2Adapter(DepthAdapterSkeleton):
52    """UniDepth V2 (Piccinelli et al. 2024)."""
53
54    MODEL_KEY = "unidepth-v2"

UniDepth V2 (Piccinelli et al. 2024).

MODEL_KEY = 'unidepth-v2'
name: ClassVar[str] = 'UniDepth V2'
install_hint: ClassVar[str] = 'pip install unidepth (or `pip install git+https://github.com/lpiccinelli-eth/UniDepth`)'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'metric'
class Metric3DV2Adapter(rpx_benchmark.adapters.depth_scaffold.DepthAdapterSkeleton):
57class Metric3DV2Adapter(DepthAdapterSkeleton):
58    """Metric3D V2."""
59
60    MODEL_KEY = "metric3d-v2"

Metric3D V2.

MODEL_KEY = 'metric3d-v2'
name: ClassVar[str] = 'Metric3D V2'
install_hint: ClassVar[str] = 'pip install metric3d (or `pip install git+https://github.com/YvanYin/Metric3D`)'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'metric'
class MoGe2ViTLAdapter(rpx_benchmark.adapters.depth_scaffold.DepthAdapterSkeleton):
63class MoGe2ViTLAdapter(DepthAdapterSkeleton):
64    """MoGe-2 ViT-L (Microsoft, metric)."""
65
66    MODEL_KEY = "moge-2-vit-l"

MoGe-2 ViT-L (Microsoft, metric).

MODEL_KEY = 'moge-2-vit-l'
name: ClassVar[str] = 'MoGe-2 ViT-L'
install_hint: ClassVar[str] = 'pip install moge (Microsoft); HF: Ruicheng/moge-2-vitl-normal'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'metric'
69class HyDenAdapter(DepthAdapterSkeleton):
70    """HyDen metric checkpoint."""
71
72    MODEL_KEY = "hyden"

HyDen metric checkpoint.

MODEL_KEY = 'hyden'
name: ClassVar[str] = 'HyDen'
install_hint: ClassVar[str] = 'clone facebookresearch/metadepth; HF: facebook/hyden-mogev2-metric-point'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'metric'
75class Lotus2Adapter(DepthAdapterSkeleton):
76    """Lotus-2 (He et al. 2024, relative diffusion-based)."""
77
78    MODEL_KEY = "lotus-2"

Lotus-2 (He et al. 2024, relative diffusion-based).

MODEL_KEY = 'lotus-2'
name: ClassVar[str] = 'Lotus-2'
install_hint: ClassVar[str] = 'pip install diffusers transformers; HF: jingheya/lotus-depth-d-v2'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'relative'
81class FE2EAdapter(DepthAdapterSkeleton):
82    """FE2E (relative)."""
83
84    MODEL_KEY = "fe2e"

FE2E (relative).

MODEL_KEY = 'fe2e'
name: ClassVar[str] = 'FE2E'
install_hint: ClassVar[str] = 'official AMAP-ML/FE2E source plus its linked exander/FE2E checkpoint; use the pinned docker/depth-fe2e environment'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'relative'
87class ZipDepthAdapter(DepthAdapterSkeleton):
88    """ZipDepth compact affine-invariant inverse-depth model."""
89
90    MODEL_KEY = "zipdepth"

ZipDepth compact affine-invariant inverse-depth model.

MODEL_KEY = 'zipdepth'
name: ClassVar[str] = 'ZipDepth'
install_hint: ClassVar[str] = 'official fabiotosi92/ZipDepth source and zipdepth_base.pth; use the pinned docker/depth-zipdepth environment'
task: rpx_benchmark.api.TaskType = <TaskType.MONOCULAR_DEPTH: 'monocular_depth'>
depth_output_kind: Literal['metric', 'relative'] = 'relative'