pointcept-bot commited on
Commit
ef03720
·
verified ·
1 Parent(s): 6ee1328

Add the COCO-Stuff segmentation weights; model card for the release

Browse files
Files changed (2) hide show
  1. README.md +118 -58
  2. 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
- [Project page](https://xywu.me/l-dpt) · Code (coming) · Demo (coming)
 
15
 
16
- Relative depth from a frozen DINOv3 ViT-7B encoder and a latent DPT decoder. The
17
- decoder is trained on 768 px crops only, with no high-resolution training data, and runs
18
- at a photo's native resolution, up to 100 MP.
 
 
 
 
19
 
20
  ## Files
21
 
22
  | File | Model | Training data | Size | sha256 |
23
  |---|---|---|---|---|
24
- | `l-dpt_large_depth_zeroshot.pth` | L-DPT-L zero-shot | 8 synthetic / multi-view sets (below) | 1.08 GB | `b4e7e95301fda7557760f787e7992f4ccca3c03cb70e46eadeb48e227b1b31ca` |
25
- | `l-dpt_large_depth_mixed.pth` | L-DPT-L mixed | the same + NYUv2, KITTI, DIODE train | 1.08 GB | `4852b823c68fea30b3360a249e71daf72a9c6c2c74f747602a117b42f35d36fa` |
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
- ## Architecture
 
 
38
 
39
- - Encoder: DINOv3 ViT-7B/16, frozen, tapped after blocks 10, 20, 30 and 40 (the last).
40
- - Decoder: latent DPT, width 1024, 16 heads, 4 stages of 4 transformer blocks with 2D
41
- RoPE on the patch grid, 3x3 readout, exponential output head; bf16, with the attention
42
- of the last stage in fp32 and a bound of 1000 on the attention logits.
43
- - Output: positive relative depth (larger = farther), defined up to a scale and shift per
44
- image.
45
 
46
  ## Usage
47
 
48
- With the `ldpt` package of the L-DPT code release:
 
 
 
 
 
 
 
49
 
50
  ```python
51
- from huggingface_hub import hf_hub_download
52
  from ldpt.models.l_dpt import api
53
 
54
- decoder = hf_hub_download("pointcept-bot/L-DPT", "l-dpt_large_depth_zeroshot.pth")
55
- dinov3 = "dinov3_vit7b16_pretrain_lvd1689m-a955f4ea.pth" # Meta's file (or the HF folder)
56
- model = api.load(decoder, encoder_weights=dinov3) # cuda if available
57
- depth = api.predict(model, image) # HxWx3 uint8 RGB -> HxW float32
58
- depth = api.predict(model, image, size=None) # at the native resolution
59
  ```
60
 
61
- `api.predict` resizes the short side to 768 by default (`size=` another short side, or
62
- `None` for the native resolution). For tens of megapixels load with the memory options
63
- `api.load(..., selection_impl="stream", chunk_tokens=32768)`: peak GPU memory is then
64
- 15 GiB at 2 MP, 19 GiB at 8 MP, 24 GiB at 32 MP and 43 GiB at 100 MP (bf16; one NVIDIA
65
- GB200 takes about 5 minutes at 100 MP).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  ## Training data
68
 
69
- - Zero-shot (506,790 samples): Hypersim, Virtual KITTI 2, Structured3D, TartanAir,
70
- BlendedMVS (three releases), IRS.
71
- - Mixed (579,637 samples): the above plus the NYUv2, KITTI and DIODE (indoor and
72
- outdoor) training sets. The released weights are a uniform average of two checkpoints
73
- of this recipe.
 
 
 
 
 
 
74
 
75
  ## Results
76
 
77
- Relative depth, AbsRel (%, lower is better) / delta1 (%, higher is better): short side
78
- 768, horizontal-flip TTA, a least-squares scale and shift per image fitted to the ground
79
- truth in depth. Crops: NYUv2 rows 159:438, cols 23:616 of the 480x640 frame; KITTI the
80
- benchmark and Garg crops; DIODE indoor / outdoor the Eigen / Garg crop; ETH3D none.
81
- DIODE is the combined indoor + outdoor validation set.
82
 
83
  | Model | NYUv2 | KITTI | ETH3D | DIODE |
84
  |---|---|---|---|---|
85
- | `l-dpt_large_depth_zeroshot.pth` | 3.55 / 98.30 | 5.98 / 97.85 | 3.75 / 99.01 | 19.34 / 85.65 |
86
- | `l-dpt_large_depth_mixed.pth` | 2.89 / 99.08 | 5.39 / 98.38 | 3.57 / 98.94 | 14.98 / 88.17 |
 
 
 
 
 
 
 
87
 
88
- NYUv2, KITTI and DIODE are zero-shot for the zero-shot model and in-domain for the mixed
89
- one. On photos in the wild, the zero-shot model separates thin foreground (foliage,
90
- branches) from the background more cleanly.
91
 
92
- ## Limitations
 
 
93
 
94
- - Relative depth only: no metric scale, no camera intrinsics; a scale and shift per image
95
- must be fitted for metric use.
96
- - The 7B encoder dominates the cost: 13.5 GiB of GPU memory for the weights alone and a
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 [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/). The DINOv3 encoder they need is Meta's, under the DINOv3 License, and is not included here.
 
 
 
 
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