File size: 8,776 Bytes
38be483 6ee1328 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 ef03720 38be483 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | ---
license: cc-by-nc-4.0
pipeline_tag: depth-estimation
library_name: pytorch
datasets:
- pointcept-bot/DepthHybrid
tags:
- depth-estimation
- relative-depth
- semantic-segmentation
- dinov3
- high-resolution
---
# L-DPT: Scaling Dense Prediction with Latent Decoding
**Train at 768. Run at 100 megapixels.**<br>
European Conference on Computer Vision (**ECCV**) 2026
[ [Project](https://xywu.me/l-dpt) ] [ [Code](https://github.com/Pointcept/L-DPT) ] [ [Demo](https://huggingface.co/spaces/pointcept-bot/L-DPT) ] [ [Training data](https://huggingface.co/datasets/pointcept-bot/DepthHybrid) ]
L-DPT predicts relative depth at the native resolution of a photo, up to 100 megapixels.
It pairs a frozen DINOv3 ViT-7B/16 encoder with a 271M-parameter latent DPT decoder that
was trained on 768 x 768 crops only, with no high-resolution training data.
This page holds the weights files of its two depth models and of its COCO-Stuff
segmentation model, for use with the L-DPT code.
## Files
| File | Model | Training data | Size | sha256 |
|---|---|---|---|---|
| `l-dpt_large_depth_zeroshot.pth` | L-DPT Large (zero-shot) | 8 synthetic and multi-view sets; no image of the benchmarks below | 1.08 GB | `b4e7e95301fda7557760f787e7992f4ccca3c03cb70e46eadeb48e227b1b31ca` |
| `l-dpt_large_depth_mixed.pth` | L-DPT Large (mixed) | the same + the NYUv2, KITTI and DIODE training splits | 1.08 GB | `4852b823c68fea30b3360a249e71daf72a9c6c2c74f747602a117b42f35d36fa` |
| `l-dpt_large_semseg_cocostuff.pth` | L-DPT Large (COCO-Stuff) | COCO-Stuff 164k train (171 classes) | 3.09 GB | `034397a1ef38e0aa190ebea1ff1c133d4f7bb7250d781d9019a240a65f2b1bb7` |
Use **zero-shot** for photos: it is the model of the demo and of every figure in the
code repository's README. Use **mixed** for the lowest benchmark error: it also trains on the NYUv2,
KITTI and DIODE training splits.
Each file holds the decoder only (fp32 weights) and its model configuration; the name is
`l-dpt_<decoder size>_<task>_<training data>.pth`. **The DINOv3 encoder is not
included**: it is Meta's, under the DINOv3 License. Request the ViT-7B/16 weights from
Meta ([release page](https://github.com/facebookresearch/dinov3) or the gated
[Hugging Face repo](https://huggingface.co/facebook/dinov3-vit7b16-pretrain-lvd1689m),
27 GB), then point `LDPT_DINOV3` at the file or folder.
## Usage
With the [L-DPT code](https://github.com/Pointcept/L-DPT), on an NVIDIA GPU (the weights
take 13.5 GiB of its memory; [Time and memory](#time-and-memory) gives the peak per photo):
```bash
git clone https://github.com/Pointcept/L-DPT.git && cd L-DPT
pip install -e ".[demo]" # Linux, Python 3.10+; installs PyTorch 2.8+ from PyPI if needed
export LDPT_DINOV3=/path/to/dinov3_vit7b16_pretrain_lvd1689m-a955f4ea.pth # or the Hugging Face folder
```
```python
import cv2
from ldpt.models.l_dpt import api
model = api.load("l-dpt_large_depth_zeroshot") # downloads the 1.08 GB weights file once
image = cv2.cvtColor(cv2.imread("photo.jpg"), cv2.COLOR_BGR2RGB)
depth = api.predict(model, image) # HxW float32, larger = farther; runs at short side 768
depth = api.predict(model, image, size=None) # at the photo's native resolution
```
A file downloaded from this page loads by its path,
`api.load("l-dpt_large_depth_zeroshot.pth")`, or through `LDPT_CKPT_LARGE_DEPTH_ZEROSHOT`
/ `LDPT_CKPT_LARGE_DEPTH_MIXED` / `LDPT_CKPT_LARGE_SEMSEG_COCOSTUFF`.
The [online demo](https://huggingface.co/spaces/pointcept-bot/L-DPT) also runs on your own
GPU: `pip install -e ".[demo,app]"`, then `python demo/hf_space/app.py` (with
`LDPT_DINOV3` set). Every option of the API and the scripts: `docs/inference.md` of the
code.
## Time and memory
| Photo, native resolution | Peak GPU memory | NVIDIA GB200 | RTX PRO 6000 Blackwell | Online demo (ZeroGPU) |
|---|---|---|---|---|
| 2 MP | 15 GiB | 0.23 s | 0.64 s | 1.5 s |
| 8 MP | 18 GiB | 1.4 s | 4.3 s | 8.0 s |
| 32 MP | 24 GiB | 15 s | 48 s | 79 s |
| 60 MP | 30 GiB | 48 s | 155 s | 267 s |
| 100 MP | 41 GiB | 133 s | 426 s | 380 s |
Zero-shot model, one model loaded and warm, no mirrored pass (`flip=True` runs the
network twice), PyTorch 2.8. The GB200 and the RTX PRO 6000 run the attention order the
code picks for them; the ZeroGPU column was measured with cuDNN attention first, while
the demo now runs PyTorch's order there (`docs/inference.md` of the code). The 100 MP
row is a 102 MP photo on the GB200 and the RTX PRO 6000 and a 100 MP photo on ZeroGPU,
which runs it on a full GPU and the smaller photos on half of one. Peak GPU memory is
PyTorch's peak allocation; the scripts and the demo of the code set
`PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`, with which PyTorch reserves 46 GiB
at 100 MP on a GB200 (50 GiB without).
## Architecture
- **Encoder:** DINOv3 ViT-7B/16, frozen, tapped after blocks 10, 20, 30 and 40 of 40.
- **Decoder:** a latent DPT on the encoder's patch grid: 1024 channels, 16 heads, 4 stages
of 4 transformer blocks with 2D RoPE (271M parameters, run in bf16); a 3x3 convolution
and a pixel shuffle read out to pixels. The attention of the last stage runs in fp32,
and every decoder attention logit is bounded by 1000.
- **Output:** an exponential depth head: positive relative depth, larger = farther,
defined up to a scale and a shift per image (fit both to get metric depth).
- **Segmentation model:** the same encoder with a 772M-parameter latent decoder (2048
channels, 16 heads, 4 stages of 2 blocks, attention at 1024 channels with QK-norm, a
BatchNorm on each tapped encoder layer), 64-channel pixel features and a 1x1
classifier over the 171 COCO-Stuff classes.
## Training data
- **L-DPT Large (zero-shot)**, 506,790 samples: Hypersim, Virtual KITTI 2, Structured3D,
TartanAir, BlendedMVS, BlendedMVS+, BlendedMVS++ and IRS.
- **L-DPT Large (mixed)**, 579,637 samples: the same plus the NYUv2, KITTI and DIODE
(indoor and outdoor) training splits. Its weights are the uniform average of two
checkpoints of its training.
- **L-DPT Large (COCO-Stuff)**, 118,287 images: the COCO-Stuff 164k training split (171
classes). Its weights are the uniform average of four checkpoints of its training.
The processed depth sets and their split files are in
[DepthHybrid](https://huggingface.co/datasets/pointcept-bot/DepthHybrid); the training
configs and how to run them are in `docs/training.md` of the code.
## Results
AbsRel (%, lower is better) / δ1 (%, higher is better), with Marigold's masks: NYUv2
with the standard Eigen crop, KITTI with the Eigen crop of the benchmark frame, ETH3D
and all 771 DIODE validation images uncropped; a RANSAC scale and shift fitted in depth
per image (seed 0). One set of weights per model for all four sets; the short side
resized to 768; the prediction averaged with that of the mirrored image.
| Model | NYUv2 | KITTI | ETH3D | DIODE |
|---|---|---|---|---|
| L-DPT Large (zero-shot) | 3.42 / 98.28 | 6.43 / 96.97 | 3.64 / 99.17 | 21.47 / 85.74 |
| L-DPT Large (mixed) | 2.87 / 99.09 | 5.96 / 97.61 | 3.47 / 99.10 | 14.43 / 87.64 |
The zero-shot model sees no image of these sets in training (its synthetic data include
Virtual KITTI 2); the mixed model trains on the NYUv2, KITTI and DIODE training splits.
There is no separate validation split: every training epoch was scored on these four
sets, and the released weights (zero-shot: epoch 7; mixed: the average of epoch 4 and
the end of its anneal) were chosen with those scores. Protocol, masks and the command
that reproduces this table: `docs/evaluation.md` of the code.
Semantic segmentation: mIoU (%, higher is better) over the 171 classes of COCO-Stuff
164k val (5,000 images), the short side resized to 768, the whole image; single scale /
averaged with the mirrored image.
| Model | COCO-Stuff |
|---|---|
| L-DPT Large (COCO-Stuff) | 53.87 / 53.99 |
The weights (stage-1 epoch 9 and the average with its anneals) were chosen with the
scores on this val set too. The command that reproduces it: `docs/training.md` of the
code (Segmentation).
## License
The L-DPT code and model weights are released under
[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) (attribution,
non-commercial use). The DINOv3 encoder they need is Meta's, under the DINOv3 License,
and is not included here. The training sets keep the terms of their sources
([DepthHybrid](https://huggingface.co/datasets/pointcept-bot/DepthHybrid) lists them).
## Citation
```bibtex
@inproceedings{wu2026latent,
title = {Scaling Dense Prediction with Latent Decoding},
author = {Wu, Xiaoyang and Lao, Yixing and Wang, Chengyao and Yang, Senqiao and Zhang, Yujia and Zhao, Hengshuang},
booktitle = {European Conference on Computer Vision (ECCV)},
year = {2026}
}
```
|