File size: 7,508 Bytes
97ab756 671db39 97ab756 671db39 97ab756 671db39 97ab756 e0c23f7 671db39 97ab756 671db39 97ab756 671db39 97ab756 671db39 | 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 | ---
task_categories:
- other
---
# 4DCodeBench-ModelEstimation
[Project page](https://4dcodebench.com) | [Paper](https://huggingface.co/papers/2610.03715) | [Code](https://github.com/4DCodeBench/4DCodeBench)
The depth, optical flow and point tracks that [4DCodeBench](https://4dcodebench.com) scores reconstructions against, so the benchmark can be evaluated without installing the models behind them. On the 100 real-world cases they are estimated from the reference video by off-the-shelf models and released here as files. On the 100 synthetic cases they are ground truth, computed from the reference world by the script in `scripts/`. The DINOv3 and TIPSv2 features of all 200 reference videos are included as well.
## Layout
```text
real/<case>/depth.h5 Video Depth Anything disparity
real/<case>/flow.h5 RAFT optical flow
real/<case>/tracks.npz CoTracker3 point tracks
real/<case>/moge.npz MoGe-3 point map of frame 0
{real,synthetic}/<case>/semantic_dinov3.npz DINOv3 frame embeddings
{real,synthetic}/<case>/semantic_tips.npz TIPSv2 frame embeddings
{real,synthetic}/<case>/geophys_dinov3.npz DINOv3 pooled features for GeoPhys
scripts/extract_synthetic.py
```
53 GB: 46.1 GB of flow, 5.6 GB of depth, 0.9 GB of point maps, 0.4 GB of features and 0.2 GB of tracks. `<case>` is the case name of [Dataset-Real-World](https://huggingface.co/datasets/4DCodeBench/Dataset-Real-World) or [Dataset-Synthetic](https://huggingface.co/datasets/4DCodeBench/Dataset-Synthetic).
## Real-world cases
Each file was computed once from the case's `reference.mp4` and is what every score in the paper was read against. `F`, `H` and `W` are the video's frame count, height and width; every real video has at most 300 frames, so all of them are read frame by frame (`stride` is 1).
| file | model | contents |
|---|---|---|
| `depth.h5` | [Video Depth Anything](https://huggingface.co/depth-anything/Video-Depth-Anything-Large), Large, FP32 | `disparity (F, h, w)` float16, relative (affine-invariant), on the model's own output grid (short side 518 px on 98 of the 100 cases), to be resized to `(H, W)`; `shape [F, H, W]`, `fps`, `stride` |
| `flow.h5` | [RAFT](https://pytorch.org/vision/stable/models/raft.html), torchvision `Raft_Large_Weights.C_T_SKHT_V2`, 12 iterations | `flow (F-1, H, W, 2)` float16, `(u, v)` pixels from frame `t` to `t + 1`; `valid (F-1, H, W)` bool, all true; `stride`, `model`, `iterations` |
| `tracks.npz` | [CoTracker3](https://huggingface.co/facebook/cotracker3), offline | `tracks (Q, F, 2)` float32 pixels, `visible (Q, F)` bool, `queries (Q, 3)` `(0, x, y)` on frame 0, `on_mask (Q,)` bool, `shape [F, H, W]`, `step`, `stride`, `model`, `tracking_resolution` |
| `moge.npz` | [MoGe-3](https://huggingface.co/Ruicheng/moge-3-vitl), ViT-L, resolution level 9, 3 refinement steps | `points (H, W, 3)` float32 in camera space up to the model's scale, `mask (H, W)` bool, `intrinsics (3, 3)` normalised to the unit image, `shape [H, W]`, `model` |
The `.h5` files are HDF5 with LZF compression, one frame per chunk. Flow, tracks and points are in full-resolution pixels of the video.
The track queries are the benchmark's grid of at most 2048 points on frame 0: 512 spread over the whole frame, which Track2D uses to remove camera motion, and the rest laid densely inside the case's annotated dynamic mask, marked by `on_mask`. CoTracker3 tracks the video at a long side of 768 px (`tracking_resolution`) and the tracks are scaled back to full resolution.
23 real videos cannot be redistributed and are rebuilt by Dataset-Real-World's `prepare_videos.py`, whose output can slightly differ from the benchmark's copy by H.264 encoder noise. The estimates here are of the benchmark's copy.
Six cases show their main object through a transparent surface: `internet_01_purple_granular_sand`, `internet_19_fabric_laundry_tumbles`, `internet_22_viscous_honey_dripping`, `phys101_01_solid_object_dropped`, `wisa_80k_06_pouring_red_wine` and `wisa_80k_46_wooden_pestle_crushing`. The video shows what lies behind the surface while a reconstruction rasterises the surface itself, so the benchmark does not score Flow, Track2D, Depth error or Uni3D MoGe on them. Their files are released for completeness only, and the models can fail on them; RAFT's flow of `wisa_80k_06_pouring_red_wine`, for one, puts hundreds of pixels of motion on its static background.
## Features
Semantic and GeoPhys compare a reconstruction's render with the reference video in a backbone's feature space. These files hold the reference side, for every real and synthetic case, on the case's sampled timeline (`F'` frames, see below); the render side is still embedded by the same models at scoring time.
| file | model | contents |
|---|---|---|
| `semantic_dinov3.npz` | [DINOv3](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m) ViT-L/16 | `embeddings (F', 1024)` float32, the final class token of each frame; `stride` |
| `semantic_tips.npz` | [TIPSv2](https://huggingface.co/google/tipsv2-l14) L/14 | `embeddings (F', 1024)` float32, the class token of each frame; `stride` |
| `geophys_dinov3.npz` | DINOv3 ViT-L/16 | `trajectory (F', 1024)` float32, the mean of each frame's patch tokens at block 18 of 24; `layer`, `stride` |
## Synthetic cases
A synthetic case has the world it was rendered from, so its depth, flow and tracks are computed exactly rather than estimated; `synthetic/<case>/` holds only its features. `scripts/extract_synthetic.py` writes the depth, flow and tracks in the same layout as the real cases, from the meshes, material trajectories and camera of each world, with the same code the scorer uses to read a submission. No model checkpoint is needed.
With the [code release](https://github.com/4DCodeBench/4DCodeBench) set up and the synthetic worlds downloaded by its `scripts/download_data.py --kind synthetic`, run from the code release's root:
```bash
python /path/to/scripts/extract_synthetic.py # all 100 cases into ./synthetic/<case>/
python /path/to/scripts/extract_synthetic.py B_01 --out gt
```
It needs a CUDA GPU for nvdiffrast; a case of 100–150 frames takes about 15 s and the longest, 600 frames, under a minute.
| file | contents |
|---|---|
| `depth.h5` | `depth (F', H, W)` float32 camera-space z in metres, `inf` where no surface covers the pixel; `shape [F, H, W]`, `fps`, `stride` |
| `flow.h5` | `flow (F'-1, H, W, 2)` float16 pixels from sampled frame `k` to `k + 1`, `valid (F'-1, H, W)` bool, `stride` |
| `tracks.npz` | the keys of the real cases but `tracking_resolution`, with the dense queries on the world's own frame-0 dynamic pixels and `model` `ground_truth` |
The 8 synthetic videos longer than 300 frames are read on a thinned timeline: frames `0, s, 2s, …` with the smallest stride `s` that keeps at most 300 of them, so `F' = ceil(F / s)`. `stride` in each file records `s`.
## Using them with the benchmark
The code release reads these files from `data/<kind>/<case>/estimates/` under the same names. Its `scripts/download_data.py --estimates` puts them there, after which the `prepare` stage can be skipped.
## Licences
The files are outputs of models with their own licences: Video Depth Anything Large and CoTracker3 are CC BY-NC 4.0, RAFT (torchvision) is BSD-3-Clause, MoGe-3 is MIT, DINOv3 is under the DINOv3 License and TIPSv2 is Apache 2.0. The videos they were computed from are under the terms listed in Dataset-Real-World and Dataset-Synthetic.
|