yagmurakarken commited on
Commit
4102c6c
·
verified ·
1 Parent(s): 02c96b2

Dataset card: structure, usage, configs + evidence

Browse files
Files changed (1) hide show
  1. README.md +308 -0
README.md ADDED
@@ -0,0 +1,308 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: provenance-and-license-to-follow
4
+ task_categories:
5
+ - depth-estimation
6
+ - image-to-image
7
+ tags:
8
+ - depth
9
+ - monocular-depth
10
+ - rgbd
11
+ - game-engine
12
+ - dense-ground-truth
13
+ - pretraining
14
+ size_categories:
15
+ - 10K<n<100K
16
+ pretty_name: OriginLab Game-Depth (RGB + Dense Z-Buffer)
17
+ configs:
18
+ - config_name: default
19
+ data_files:
20
+ - split: train
21
+ path: data/train-*.parquet
22
+ - split: test
23
+ path: data/test-*.parquet
24
+ - split: extra
25
+ path: data/extra-*.parquet
26
+ ---
27
+
28
+ # OriginLab Game-Depth: RGB + Dense Z-Buffer Depth
29
+
30
+ Dense depth from game engines, as a scalable substitute for scarce real depth ground truth.
31
+
32
+ ## Abstract
33
+
34
+ Dense depth ground truth is the bottleneck in monocular depth estimation. Real sensors are sparse, noisy,
35
+ or indoor-only, and purpose-built synthetic datasets are expensive and narrow. Game engines already render
36
+ a dense, exact z-buffer for every frame, for free. We ask whether that signal can stand in for real data.
37
+ Training a depth model from scratch on ~17.8k game frames, roughly a quarter of the synthetic corpus behind
38
+ the Lotus baseline, we find it transfers to real outdoor scenes better than that baseline (KITTI AbsRel
39
+ 0.191 vs 0.224), while indoor scenes remain its frontier. The reason is geometric rather than cosmetic: the
40
+ game corpus teaches an outdoor ground-plane structure that real driving data shares, even though its pixels
41
+ look nothing alike. We therefore position game z-buffers as a scalable pre-training substrate, a cheap
42
+ geometric prior for initializing models before fine-tuning on limited real data, rather than a replacement
43
+ for real data.
44
+
45
+ *This is a preview evidence card; raw RGB is withheld pending provenance review. A few analyses are still in
46
+ progress (the causal ablation in Section 4 and the scaling and multi-seed studies in Section 7); they will
47
+ be added here as they complete.*
48
+
49
+ ## Dataset structure
50
+
51
+ Each example is one RGB frame paired with dense depth from the engine z-buffer:
52
+
53
+ - `image` : RGB frame (1080x1920), PNG.
54
+ - `depth_nearness` : relative log-nearness stored as a 16-bit PNG. Decode with
55
+ `nearness = numpy.array(x) / 65535.0` (in [0,1], near = 1). This is relative, not metric.
56
+ - `valid` : validity mask (0 or 255).
57
+ - `game`, `session`, `frame`, `split` : metadata.
58
+
59
+ Splits (48,615 frames total):
60
+
61
+ - `train` (17,799) : the session-capped, stride-sampled curated training split used in the results below.
62
+ - `test` (999) : session-disjoint held-out test set.
63
+ - `extra` (29,815) : the remaining frames (these share sessions with `train`); released so you can build
64
+ your own curation instead of ours.
65
+
66
+ ### Usage
67
+
68
+ ```python
69
+ from datasets import load_dataset
70
+ import numpy as np
71
+
72
+ ds = load_dataset("originlab/game-depth", split="train", streaming=True)
73
+ ex = next(iter(ds))
74
+ rgb = ex["image"] # PIL RGB
75
+ nearness = np.array(ex["depth_nearness"]).astype("float32") / 65535.0 # [0,1], near = 1 (relative)
76
+ valid = np.array(ex["valid"]) > 0
77
+ ```
78
+
79
+ ## 1. Depth data is the bottleneck
80
+
81
+ Every monocular-depth model is limited by the depth labels it can learn from. LiDAR is sparse and costly;
82
+ structured-light sensors are indoor-only and noisy; pseudo-labels inherit a teacher's blind spots.
83
+ Synthetic datasets such as Hypersim and Virtual KITTI give dense, exact depth, which is why the strongest
84
+ open diffusion-depth models train on them, but they are hand-authored, fixed in size, and narrow in domain
85
+ (photoreal interiors, or a driving simulator).
86
+
87
+ Game engines sidestep the labeling problem entirely: the z-buffer that produces every rendered frame is
88
+ dense per-pixel depth, available at capture time at no additional cost. Unlike a curated synthetic dataset,
89
+ game capture is open-ended across any title, session, or environment, so the supply of dense depth grows
90
+ with recording rather than with annotation budget. The question this card answers is whether depth learned
91
+ from that source actually transfers to the real world.
92
+
93
+ ## 2. A depth dataset from game engines
94
+
95
+ The dataset is 48,615 RGB frames (1080x1920) from 10 games across 98 sessions, each paired with dense
96
+ per-pixel depth from the engine z-buffer (stored as log-nearness, `near = 1 - luma/65535`; relative, not
97
+ metric). Splits are session-disjoint, so no scene leaks between train and test. Frames are stride-sampled to
98
+ cut the temporal redundancy of contiguous gameplay (raw 3-fps extraction is about 21% near-duplicates; the
99
+ sampled training split about 8%), and the training split is session-capped so no single session dominates.
100
+ The composition is deliberately outdoor-heavy and 0% indoor, a fact that turns out to explain most of the
101
+ results below. A per-game breakdown is in Section 8.
102
+
103
+ The comparison that frames the rest of the card is with the data behind the Lotus baseline:
104
+
105
+ | | Lotus training data | This dataset (ours) |
106
+ |---|---|---|
107
+ | Sources | Hypersim + Virtual KITTI (2 curated datasets) | 10 commercial games, 98 sessions |
108
+ | Train size | about 74k (54k + 20k) | 48,615 total; 17,799 used here |
109
+ | Origin | purpose-built renders / driving sim | off-the-shelf gameplay capture |
110
+ | Scenes | indoor + road | outdoor: forest, off-road, driving, FPS, party |
111
+ | Depth GT | metric | relative log-nearness |
112
+ | Scaling | fixed datasets | grows with capture, not labeling |
113
+
114
+ Our model is trained from scratch on roughly 4x fewer frames, entirely from games. That the resulting model
115
+ is competitive at all is the first hint that the signal is dense and clean enough to matter.
116
+
117
+ ## 3. Game depth transfers to real outdoor scenes
118
+
119
+ The central test is zero-shot transfer to a real benchmark the model never saw. On KITTI (1000-image
120
+ annotated validation set), evaluated in a single fixed harness, the game-trained model has the lowest error
121
+ of the diffusion-family models:
122
+
123
+ | Model (zero-shot) | AbsRel (lower better) | delta1 (higher better) |
124
+ |---|---|---|
125
+ | Ours (game, from scratch) | 0.191 | 0.720 |
126
+ | Lotus (released) | 0.224 | 0.585 |
127
+ | Marigold | 0.244 | 0.570 |
128
+ | Depth-Anything-V2 (real-data reference) | 0.075 | 0.947 |
129
+
130
+ The gap is statistically clear, not noise: 95% bootstrap confidence intervals are [0.189, 0.194] for ours
131
+ and [0.221, 0.226] for Lotus, which do not overlap.
132
+
133
+ A model that has only ever seen rendered game frames predicts real outdoor depth more accurately than one
134
+ trained on purpose-built synthetic data, and it does so on real photographs, which tells us synthetic-RGB
135
+ fidelity is not the limiting factor. The advantage is not superficial: it is strongest exactly where outdoor
136
+ scene understanding lives, on the receding ground plane and at long range, and it holds when noisy boundary
137
+ pixels are removed, so it reflects structure the model understands rather than sensor noise it happens to
138
+ fit. Depth-Anything-V2, a discriminative model trained on massive labeled real data, sits far ahead of all
139
+ diffusion models; it is a reference ceiling, not a same-recipe competitor.
140
+
141
+ ![KITTI zero-shot, all models](figures/kitti_samples.png)
142
+
143
+ Zero-shot KITTI predictions across models (inverse-depth visualization; near bright, far dark; selected
144
+ examples). The game-trained model recovers road geometry and vehicles cleanly, ahead of the other diffusion
145
+ models on these frames. Depth-Anything-V2 (the real-data reference) remains strongest overall (Table above).
146
+
147
+ ## 4. The mechanism: geometry, not appearance
148
+
149
+ Why would game frames transfer to real driving scenes? The intuitive guess, that the game RGB simply looks
150
+ like KITTI, is wrong, and measuring it is what makes the real explanation clear.
151
+
152
+ Embedding every image with DINOv2 and comparing distributions, the game data is in fact closest in
153
+ appearance to indoor NYU, not outdoor KITTI:
154
+
155
+ | Pair | DINOv2 Frechet distance |
156
+ |---|---|
157
+ | game vs NYU | 0.98 |
158
+ | game vs KITTI | 1.32 |
159
+
160
+ If appearance drove transfer, the model would do best on NYU, the opposite of what happens. What the game
161
+ data actually shares with KITTI is 3-D structure. Measuring the ground-plane signature of each dataset, how
162
+ strongly distance increases from the bottom of the image to the top, the game corpus looks outdoor: its
163
+ per-image ground-plane strength (median rho) clusters near KITTI (-0.79 vs -0.82) and far from indoor NYU
164
+ (-0.56).
165
+
166
+ ![Per-image ground-plane strength](figures/geometry_profile.png)
167
+
168
+ A depth model learns geometry, not texture, so the game corpus hands it an outdoor ground-plane prior that
169
+ happens to be exactly right for real driving scenes and exactly wrong for cluttered interiors. This single
170
+ mechanism explains the whole pattern of results: the outdoor win, the indoor gap, and the value of the data
171
+ as a prior. To move this from a strong correlation to a causal claim, we are running the direct test:
172
+ holding the game RGB fixed while progressively destroying the depth geometry, retraining, and watching
173
+ transfer fall (results in progress).
174
+
175
+ ## 5. Indoor is the frontier
176
+
177
+ The same prior that wins outdoors is a liability indoors. With no indoor frames in training, NYU is out of
178
+ distribution, and the model loses zero-shot (AbsRel 0.149 vs Lotus 0.133). Fine-tuning on real NYU closes
179
+ the gap. Under a matched learning-rate sweep (best checkpoint for each initialization), the game-pretrained
180
+ model reaches AbsRel 0.116, statistically tied with the fine-tuned Lotus baseline (0.115), despite having no
181
+ indoor data and roughly 4x less pre-training. We take the honest reading: indoor performance needs indoor
182
+ data, and here game-pretraining matches, rather than beats, a curated-synthetic baseline. That parity is
183
+ still a useful data-efficiency result, and it maps where the approach helps today (outdoor geometry) and
184
+ where the next dataset version has to grow (indoor and more varied scenes).
185
+
186
+ | Model | NYU AbsRel, zero-shot | NYU AbsRel, + NYU fine-tune |
187
+ |---|---|---|
188
+ | Ours (game, from scratch) | 0.149 | 0.116 |
189
+ | Lotus (released) | 0.133 | 0.115 |
190
+ | Marigold | 0.197 | not fine-tuned |
191
+ | Depth-Anything-V2 (real-data reference) | 0.055 | not fine-tuned |
192
+
193
+ (654-image Eigen test, cap 10 m, lower is better. Fine-tuned numbers use the matched learning-rate sweep,
194
+ best checkpoint per initialization; ours and Lotus are statistically tied.)
195
+
196
+ ![NYU: game pre-training then fine-tuning](figures/nyu_progression.png)
197
+
198
+ Game pre-training alone is weak indoors (third column, zero-shot: the outdoor prior is out of distribution
199
+ for cluttered rooms), but it is a strong starting point. Fine-tuning on real NYU recovers the room layout
200
+ and furniture (fourth column). Selected examples with the largest zero-shot-to-fine-tuned improvement.
201
+
202
+ An earlier comparison at a single higher learning rate had suggested a larger game-pretraining advantage;
203
+ that turned out to be an under-tuned Lotus baseline, which the matched sweep corrects. We report the
204
+ matched, fair numbers.
205
+
206
+ ![NYU predictions, both models fine-tuned](figures/nyu_samples.png)
207
+
208
+ NYU predictions with both models fine-tuned on real NYU under the identical recipe (selected examples).
209
+ The game-pretrained model produces indoor depth as close to the ground truth as the fine-tuned Lotus
210
+ baseline, consistent with the tied metrics above.
211
+
212
+ ## 6. What this is: a scalable pre-training substrate
213
+
214
+ Read together, the results describe a specific and useful role for game-engine depth. It is not a
215
+ replacement for real data; Depth-Anything-V2, trained on real labels, is far more accurate on the
216
+ real-world benchmarks. It is a cheap, scalable geometric prior: dense and exact, free at capture time, and, as the KITTI result shows,
217
+ carrying structure that transfers to the real world. The natural use is to pre-train on game depth and then
218
+ fine-tune on whatever small real dataset a task allows, getting the benefit of a strong prior without the
219
+ cost of collecting real dense depth.
220
+
221
+ Two in-domain observations reinforce this. First, the pre-training learns genuine structure: on held-out
222
+ game frames our model predicts depth well ahead of Lotus. Second, and more telling, the real-data model
223
+ that dominates the benchmarks is the weakest on our frames, which means the data carries structure that
224
+ existing models have not already absorbed.
225
+
226
+ | Model on our game test set | SSI-MAE (lower better) | AbsRel |
227
+ |---|---|---|
228
+ | Ours (game) | 0.029 | 0.050 |
229
+ | Lotus | 0.035 | 0.064 |
230
+ | Marigold | 0.041 | 0.074 |
231
+ | Depth-Anything-V2 (real-data SOTA elsewhere) | 0.055 | 0.098 |
232
+
233
+ ## 7. Where this goes (v0.3.0)
234
+
235
+ - Scale: more frames and denser sampling, to test whether the outdoor margin widens (a data-scaling curve
236
+ is in progress to show whether we are still data-limited).
237
+ - Coverage: indoor and more varied scenes, to convert the indoor frontier into a strength.
238
+ - Confidence: multi-seed variance and confidence intervals on every number, and the causal depth-geometry
239
+ ablation of Section 4.
240
+
241
+ ## 8. Dataset composition
242
+
243
+ The training split (17,799 frames) spans 10 games; no single game dominates. The held-out game test set
244
+ (999 frames) is session-disjoint and drawn from 5 of the games.
245
+
246
+ | Game | Train frames | Train % | Test frames |
247
+ |---|---|---|---|
248
+ | Game1 | 1,600 | 9.0 | 0 |
249
+ | Game2 | 2,000 | 11.2 | 200 |
250
+ | Game3 | 1,600 | 9.0 | 0 |
251
+ | Game4 | 2,000 | 11.2 | 200 |
252
+ | Game5 | 800 | 4.5 | 200 |
253
+ | Game6 | 1,400 | 7.9 | 200 |
254
+ | Game8 | 2,000 | 11.2 | 200 |
255
+ | Game9 | 2,800 | 15.7 | 0 |
256
+ | Game10 | 1,800 | 10.1 | 0 |
257
+ | Game11 | 1,800 | 10.1 | 0 |
258
+ | Total | 17,799 | 100 | 999 |
259
+
260
+ Full corpus before session-capping and the train split is 48,615 frames. Machine-readable counts in
261
+ [`results/game_distribution.json`](results/game_distribution.json).
262
+
263
+ ## Methodology and scope
264
+
265
+ Full detail in [`METHODOLOGY.md`](METHODOLOGY.md); machine-readable metrics (including per-frame) in
266
+ [`results/`](results/). In brief: all models run through one harness with per-model output conventions
267
+ handled explicitly, and predictions aligned to ground truth by least-squares scale-shift. The harness is
268
+ validated by Depth-Anything-V2 reproducing its published NYU number (about 0.055). KITTI is processed at
269
+ native resolution, because its roughly 3.4:1 frames are otherwise squashed and blurred. The controlled
270
+ comparison is ours vs Lotus (identical recipe, only the data differs); Marigold and Depth-Anything-V2 are
271
+ external checkpoints included as reference points, with inference settings disclosed. Depth only; normals
272
+ are out of scope. Point estimates are single-seed pending the variance study in Section 7.
273
+
274
+ Training footprint: the trained component is the SD2-base UNet (about 0.87B trainable parameters; VAE and
275
+ text encoder frozen), run for 6000 steps at effective batch 32, so roughly 192k images are seen, about 11
276
+ passes over the 17,799-frame split. Compute cost is a separate axis from data amount: under a step-matched
277
+ budget it stays fixed as the data is scaled down, so the data-utilization question (whether accuracy keeps
278
+ rising with more data) is answered by the data-scaling curve in Section 7, not by compute; the only coupling
279
+ is that smaller fractions imply more passes over the data (a memorization caveat for those points).
280
+
281
+ ## Provenance and license
282
+
283
+ Provenance and license terms are being finalized and will be published here before any data release. Until
284
+ then this is a private evidence card and raw RGB is withheld.
285
+
286
+ ## References
287
+
288
+ 1. N. Silberman, D. Hoiem, P. Kohli, R. Fergus. "Indoor Segmentation and Support Inference from RGBD
289
+ Images." ECCV, 2012. (NYU Depth V2)
290
+ 2. A. Geiger, P. Lenz, R. Urtasun. "Are We Ready for Autonomous Driving? The KITTI Vision Benchmark Suite."
291
+ CVPR, 2012. A. Geiger, P. Lenz, C. Stiller, R. Urtasun. "Vision Meets Robotics: The KITTI Dataset."
292
+ IJRR, 2013.
293
+ 3. M. Roberts, J. Ramapuram, A. Ranjan, et al. "Hypersim: A Photorealistic Synthetic Dataset for Holistic
294
+ Indoor Scene Understanding." ICCV, 2021.
295
+ 4. A. Gaidon, Q. Wang, Y. Cabon, E. Vig. "Virtual Worlds as Proxy for Multi-Object Tracking Analysis."
296
+ CVPR, 2016. Y. Cabon, N. Murray, M. Humenberger. "Virtual KITTI 2." arXiv:2001.10773, 2020.
297
+ 5. J. He, H. Li, W. Yin, et al. "Lotus: Diffusion-based Visual Foundation Model for High-quality Dense
298
+ Prediction." arXiv:2409.18124, 2024.
299
+ 6. B. Ke, A. Obukhov, S. Huang, N. Metzger, R. C. Daudt, K. Schindler. "Repurposing Diffusion-Based Image
300
+ Generators for Monocular Depth Estimation (Marigold)." CVPR, 2024.
301
+ 7. L. Yang, B. Kang, Z. Huang, Z. Zhao, X. Xu, J. Feng, H. Zhao. "Depth Anything V2." NeurIPS, 2024.
302
+ arXiv:2406.09414.
303
+ 8. M. Oquab, T. Darcet, T. Moutakanni, et al. "DINOv2: Learning Robust Visual Features without
304
+ Supervision." TMLR, 2023.
305
+
306
+ ## Citation
307
+
308
+ OriginLab Game-Depth (RGB + Dense Z-Buffer), 2026. Preview version.