Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions families/zoedepth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# ZoeDepth NYU/KITTI

This owner builds `Intel/zoedepth-nyu-kitti` revision
`f364d4c7936e91f465abba182208dd68142bf0ca` for FP32 monocular metric depth.
It implements the BEiT backbone, relative-position-table interpolation, DPT
readout/fusion, transformer domain classifier, both unnormalized bin-attractor
heads and conditional log-binomial depth distribution using TensorRT math.
The classifier chooses the NYU or KITTI head independently for each image.
The native family implements the existing `IMonocularDepth` interface and the
`trtmc depth` CLI. It does not synthesize camera intrinsics or 3D points.

The initial profile has batch one and processed RGB dimensions 384×512.
Preprocessing retains the checkpoint's reflect padding, aspect-preserving
nearest-multiple-of-32 geometry, bilinear resize with aligned corners, and
normalization. Images whose published preprocessing produces another shape
are rejected. Typical 384×512 and 480×640 images fit the profile. Public input
pixels are HWC floats in [0,1]. Output is a metric depth map at the original
image resolution, with the upstream bicubic resize and padding removal.
Inference has no Python or PyTorch dependency.

```bash
PYTHONPATH=core/builder:. python -m tensorrt_model_connect build /path/to/zoedepth-nyu-kitti -o model.bundle \
--family zoedepth --task monocular_depth --precision fp32
trtmc depth model.bundle --runtime-root /path/to/runtime --image image.png
```

Validation uses the unmodified Transformers 5.3.0 FP32 eager reference.
Small rectangular models compare BEiT taps, fusion, classifier logits and
both routing choices at 5e-5 absolute/relative tolerance. Native pre/post
processing is checked independently against the published image processor.
Real checkpoint tests compare every output pixel for multiple images,
different source resolutions, repeated calls, rejection recovery and CLI
execution at the manifest's fixed tolerances.

From the repository root, start with the
[source build environment](../../website/docs/getting-started/source-build.md).
Install the family build and test dependencies and fetch the pinned snapshot
before running the offline test.

```bash
python -m pip install -r families/zoedepth/requirements.txt -r families/zoedepth/tests/requirements.txt
hf download Intel/zoedepth-nyu-kitti --revision f364d4c7936e91f465abba182208dd68142bf0ca
cmake -S . -B build -DTRTMC_BUILD_TESTS=ON
cmake --build build --target trtmc trtmc_backend_trt trtmc_model_zoedepth zoedepth_preprocess zoedepth_e2e
export TRTMC_RUNTIME_ROOT="$PWD/build"
PYTHONPATH=core/builder:apps/benchmark:. HF_HUB_OFFLINE=1 python -m pytest \
families/zoedepth/tests --e2e-model zoedepth -q
```

An explicit `TRTMC_ZOEDEPTH_MODEL_DIR` supports local comparisons. Its
checkpoint revision is recorded as unverified.
3 changes: 3 additions & 0 deletions families/zoedepth/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""ZoeDepth metric monocular depth estimation."""
Loading
Loading