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