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:
- Create
adapters/depth/<model>.py(e.g.da3.py). - Define a class that subclasses
DepthAdapterSkeleton(or~rpx_benchmark.adapters.base.BenchmarkableModelif you want the input/output adapter composition pattern), setsMODEL_KEYto the same key as the skeleton here, and overridessetup()andpredict(). - Remove the matching skeleton class from this file (or import the
real implementation into
__init__.pyso 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]
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).
Inherited Members
39class DAV2LargeAdapter(DepthAdapterSkeleton): 40 """Depth Anything V2 — Large metric variant.""" 41 42 MODEL_KEY = "da-v2-large"
Depth Anything V2 — Large metric variant.
Inherited Members
45class DepthProAdapter(DepthAdapterSkeleton): 46 """Apple Depth Pro.""" 47 48 MODEL_KEY = "depth-pro"
Apple Depth Pro.
Inherited Members
51class UniDepthV2Adapter(DepthAdapterSkeleton): 52 """UniDepth V2 (Piccinelli et al. 2024).""" 53 54 MODEL_KEY = "unidepth-v2"
UniDepth V2 (Piccinelli et al. 2024).
Inherited Members
57class Metric3DV2Adapter(DepthAdapterSkeleton): 58 """Metric3D V2.""" 59 60 MODEL_KEY = "metric3d-v2"
Metric3D V2.
Inherited Members
63class MoGe2ViTLAdapter(DepthAdapterSkeleton): 64 """MoGe-2 ViT-L (Microsoft, metric).""" 65 66 MODEL_KEY = "moge-2-vit-l"
MoGe-2 ViT-L (Microsoft, metric).
Inherited Members
69class HyDenAdapter(DepthAdapterSkeleton): 70 """HyDen metric checkpoint.""" 71 72 MODEL_KEY = "hyden"
HyDen metric checkpoint.
Inherited Members
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).
Inherited Members
FE2E (relative).
Inherited Members
87class ZipDepthAdapter(DepthAdapterSkeleton): 88 """ZipDepth compact affine-invariant inverse-depth model.""" 89 90 MODEL_KEY = "zipdepth"
ZipDepth compact affine-invariant inverse-depth model.