HaraldFranck commited on
Commit
16f95cb
·
verified ·
1 Parent(s): b2f6269

Upload full training export while export verification continues

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. full-q98/README.md +5 -0
  2. full-q98/attribution.json +0 -0
  3. full-q98/data_format.md +306 -0
  4. full-q98/export_reader.py +71 -0
  5. full-q98/index.json +0 -0
  6. full-q98/seed_replacements.json +7 -0
  7. full-q98/train-000000.tar +3 -0
  8. full-q98/train-000001.tar +3 -0
  9. full-q98/train-000002.tar +3 -0
  10. full-q98/train-000003.tar +3 -0
  11. full-q98/train-000004.tar +3 -0
  12. full-q98/train-000005.tar +3 -0
  13. full-q98/train-000006.tar +3 -0
  14. full-q98/train-000007.tar +3 -0
  15. full-q98/train-000008.tar +3 -0
  16. full-q98/train-000009.tar +3 -0
  17. full-q98/train-000010.tar +3 -0
  18. full-q98/train-000011.tar +3 -0
  19. full-q98/train-000012.tar +3 -0
  20. full-q98/train-000013.tar +3 -0
  21. full-q98/train-000014.tar +3 -0
  22. full-q98/train-000015.tar +3 -0
  23. full-q98/train-000016.tar +3 -0
  24. full-q98/train-000017.tar +3 -0
  25. full-q98/train-000018.tar +3 -0
  26. full-q98/train-000019.tar +3 -0
  27. full-q98/train-000020.tar +3 -0
  28. full-q98/train-000021.tar +3 -0
  29. full-q98/train-000022.tar +3 -0
  30. full-q98/train-000023.tar +3 -0
  31. full-q98/train-000024.tar +3 -0
  32. full-q98/train-000025.tar +3 -0
  33. full-q98/train-000026.tar +3 -0
  34. full-q98/train-000027.tar +3 -0
  35. full-q98/train-000028.tar +3 -0
  36. full-q98/train-000029.tar +3 -0
  37. full-q98/train-000030.tar +3 -0
  38. full-q98/train-000031.tar +3 -0
  39. full-q98/train-000032.tar +3 -0
  40. full-q98/train-000033.tar +3 -0
  41. full-q98/train-000034.tar +3 -0
  42. full-q98/train-000035.tar +3 -0
  43. full-q98/train-000036.tar +3 -0
  44. full-q98/train-000037.tar +3 -0
  45. full-q98/train-000038.tar +3 -0
  46. full-q98/train-000039.tar +3 -0
  47. full-q98/train-000040.tar +3 -0
  48. full-q98/train-000041.tar +3 -0
  49. full-q98/train-000042.tar +3 -0
  50. full-q98/train-000043.tar +3 -0
full-q98/README.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # SAM3Dvid full export — export verification pending
2
+
3
+ 10,000 synthetic clips, 32 frames at 512 x 512, JPEG quality 98, visible masks, camera parameters, object poses and canonical 64-cubed voxels. Generation acceptance checks have passed; full export comparison is still running. Do not treat the export as fully verified yet.
4
+
5
+ See data_format.md and export_reader.py (NumPy and Pillow) for local loading. No held-out evaluation split. Meshes, depth and amodal masks excluded. Source objects use CC0 and CC BY licences, backgrounds CC0; see attribution.json for credits and applicable licence requirements.
full-q98/attribution.json ADDED
The diff for this file is too large to render. See raw diff
 
full-q98/data_format.md ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Synthetic video dataset: data format (v0.1)
2
+
3
+ This describes the data we generate for extending SAM 3D (image -> 3D objects) to short videos. It is meant to be everything a consumer needs. If anything is unclear, ask Julian.
4
+
5
+ ## 1. What a sample is
6
+
7
+ One sample is a **clip**: 32 RGB frames at 512x512 of a static scene with N in {1,2,3,4} rigid objects floating in space (no ground, random orientations), seen by a camera that orbits the scene. The rendered objects are alpha-composited onto a real photo (SA-1B). Every clip comes with exact ground truth:
8
+
9
+ - per object: its shape (a 64^3 voxel grid and a textured mesh, in a canonical object frame) and its pose in the world;
10
+ - per frame: camera pose and intrinsics, visible instance masks, amodal masks, depth.
11
+
12
+ The scene never changes during a clip; only the camera moves. So each object's pose **in camera coordinates** changes from frame to frame, and that per-frame camera-frame pose (rotation, translation, scale) is the layout target SAM 3D predicts.
13
+
14
+ | Split | Objects | Backgrounds | Clips | Where generated |
15
+ |---|---|---|---|---|
16
+ | `eval` | Google Scanned Objects (GSO) | SA-1B eval pool | 500 | locally, shipped as a tarball |
17
+ | `train` | Objaverse-XL (TRELLIS-500K subset, filtered) | SA-1B train pool | 10,000 | on a cluster, later |
18
+
19
+ Both splits use the identical format. Objects and backgrounds never cross splits: object sets come from different sources, and SA-1B images are assigned to a pool by a fixed hash of their image ID.
20
+
21
+ ## 2. Directory layout
22
+
23
+ ```
24
+ dataset/
25
+ manifest.jsonl one line per clip: {clip_id, split, N, arc_span_deg, seed, path}
26
+ config.yaml generator config used
27
+ assets/{train|eval}/{asset_id}/
28
+ mesh.glb normalized textured mesh (see 3.3)
29
+ voxels.npy bool (64,64,64) surface occupancy (see 3.3)
30
+ meta.json source, source_name (original GSO/Objaverse name), license,
31
+ normalization (scale, offset, raw bbox), num_voxels, filter_scores
32
+ clips/{split}/{clip_id}/
33
+ rgb/000.png ... 031.png uint8 RGB, composited final frames <- model input
34
+ rgba_fg/000.png ... uint8 RGBA, objects only, straight (non-premultiplied) alpha
35
+ mask_visible/000.png ... uint8 instance map: 0 = background, k = object 1..N
36
+ mask_amodal/obj{k}/000.png uint8 {0,255}: full silhouette of object k
37
+ depth/000.npz ... key "depth": float32 (512,512) z-depth, NaN = background
38
+ cameras.json
39
+ objects.json
40
+ meta.json
41
+ ```
42
+
43
+ All paths stored inside JSON files are relative to `dataset/`. Clips reference shared assets and don't copy them.
44
+
45
+ ## 3. Conventions (read this carefully)
46
+
47
+ ### 3.1 Frames and naming
48
+
49
+ - `R_ab`, `t_ab`, `T_ab` map coordinates **from frame b into frame a**: `x_a = R_ab x_b + t_ab`. `w` = world, `c` = camera, `o` = object.
50
+ - **World:** right-handed, Z up. Units are arbitrary "scene units" (no metric scale; see 3.4).
51
+ - **Camera:** OpenCV (x right, y down, z forward, looking along +z).
52
+
53
+ ### 3.2 Camera (`cameras.json`)
54
+
55
+ ```json
56
+ {"convention": "opencv", "width": 512, "height": 512,
57
+ "K": [[548.993, 0, 255.5], [0, 548.993, 255.5], [0, 0, 1]],
58
+ "frames": [{"t": 0, "T_cw": [[4x4]]}, ..., {"t": 31, "T_cw": [[4x4]]}]}
59
+ ```
60
+
61
+ - `T_cw` is **world -> camera** (extrinsics), 4x4 with last row `[0,0,0,1]`.
62
+ - `K` is identical for all frames and clips: horizontal FOV 50 degrees, `f = 256 / tan(25 deg)`, square pixels, no distortion.
63
+ - **Pixel centers are at integer coordinates** (OpenCV convention). The principal point `255.5` is the exact image center, and pixel `(u, v)` covers `[u-0.5, u+0.5]`. A point `x_c` projects to `u = fx * x/z + cx`, `v = fy * y/z + cy`.
64
+
65
+ ### 3.3 Objects: canonical frame, shape, pose
66
+
67
+ **Canonical object frame.** Each asset is normalized exactly as TRELLIS does it:
68
+ - Z up, as Blender sees the asset after import.
69
+ - The longest bounding-box side is scaled to 1 and the box is centered.
70
+ - Vertices therefore lie in `[-0.5, 0.5]^3`. For GSO they touch both faces along the longest axis. For Objaverse assets made of several rotated parts, TRELLIS's box can be slightly larger than the true vertex extent.
71
+
72
+ **`voxels.npy`**
73
+ - `bool[64,64,64]` holding **surface** occupancy (TRELLIS-style, not solid), in the canonical frame.
74
+ - Index `[i,j,k]` is along `(x,y,z)`; the voxel center is `(index + 0.5) / 64 - 0.5`.
75
+
76
+ **`mesh.glb`**
77
+ - A standard glTF file, which is Y-up by glTF convention. To get canonical coordinates outside Blender, multiply the vertices:
78
+ ```
79
+ CANONICAL_FROM_GLTF = [[1,0,0],[0,0,-1],[0,1,0]] # (x, y, z)_gltf -> (x, -z, y)
80
+ ```
81
+ Blender's glTF importer applies this automatically; trimesh, Open3D and PyTorch3D do not.
82
+ - One mesh object with an identity transform, already triangulated. Materials and textures are kept as in the source (GSO: one texture).
83
+
84
+ **Pose in the world (`objects.json`)**, one entry per object, `k` = 1..N, matching the mask ids:
85
+
86
+ ```json
87
+ [{"k": 1, "asset_id": "...", "source": "gso|objaverse",
88
+ "mesh": "assets/eval/<id>/mesh.glb", "voxels": "assets/eval/<id>/voxels.npy",
89
+ "R_wo": [[3x3]], "t_wo": [x, y, z], "s_wo": [s, s, s]}]
90
+ ```
91
+
92
+ - `x_w = R_wo (s_wo * x_o) + t_wo`, with `*` elementwise.
93
+ - `s_wo` is always isotropic (all three entries equal) but stored as a 3-vector to match SAM 3D's `s in R^3`.
94
+ - `t_wo` is where the canonical origin (the bbox center) ends up, not the center of mass.
95
+ - All rotations are stored as 3x3 matrices.
96
+
97
+ **Per-frame camera-frame target** (what to train on):
98
+
99
+ ```
100
+ R_co = R_cw @ R_wo
101
+ t_co = R_cw @ t_wo + t_cw
102
+ s_co = s_wo
103
+ x_c = R_co @ (s_co * x_o) + t_co
104
+ ```
105
+
106
+ **This is our convention, not SAM 3D's.** SAM 3D's layout uses PyTorch3D camera axes (x left, y up), row vectors and a wxyz quaternion: `x_cam = (s * x_o) @ R(q) + t`. Its canonical frame and scale are the same as ours. Convert with `sam3dvid.sam3d.ours_to_sam3d(R_co, t_co, s_co) -> (q, t, s)` and `sam3d_to_ours`, which were verified against SAM 3D's own outputs in test T6 (`DATASET.md` Section 7).
107
+
108
+ ### 3.4 Scale
109
+
110
+ There is no metric scale. The canonical object fits a unit cube, `s ~ U(0.4, 1.0)`, and the camera distance is chosen relative to the scene size. `t_co` and `s_co` are in this generator's scene units, not meters.
111
+
112
+ ## 4. Per-frame images and masks
113
+
114
+ | File | Content | Notes |
115
+ |---|---|---|
116
+ | `rgb/t.png` | final frame, sRGB uint8 | lit by the scene light, Blender "Standard" view transform |
117
+ | `rgba_fg/t.png` | objects only | anti-aliased alpha; `rgb = fg*a + bg*(1-a)` |
118
+ | `mask_visible/t.png` | which object owns each pixel | not anti-aliased; values 0..N |
119
+ | `mask_amodal/obj{k}/t.png` | object k's silhouette as if no other object existed | clipped to the image; visible pixels of k are always a subset |
120
+ | `depth/t.npz` | z-depth along the optical axis (the OpenCV `z` of the surface point), **not** distance along the ray | finite exactly where `mask_visible > 0`, NaN elsewhere; the background has no depth |
121
+
122
+ Because the alpha in `rgba_fg` is anti-aliased, it can extend about 1 px beyond `mask_visible`. Those edge pixels have no depth (NaN).
123
+
124
+ ## 5. `meta.json` (per clip)
125
+
126
+ | Key | Meaning |
127
+ |---|---|
128
+ | `clip_id`, `split`, `seed`, `attempt` | identity; the clip is fully reproducible from `seed` |
129
+ | `num_objects` | N |
130
+ | `arc_span_deg`, `arc_direction` | total orbit angle (10-70 deg) and its sign |
131
+ | `start_azimuth_deg`, `start_elevation_deg`, `elevation_drift_deg` | trajectory parameters |
132
+ | `orbit_radius`, `scene_center` | camera distance to and look-at point (world) |
133
+ | `hfov_deg` | 50 |
134
+ | `light` | `sun_direction` (unit vector *towards* the sun, world frame), `sun_strength`, `ambient_strength` |
135
+ | `background` | `image_id` (SA-1B), `width`, `height`, `virtual_hfov_deg` (130), `K_bg`. Frame t's background is the photo warped by the homography `K @ R_cw(t) @ R_cw,ref^T @ inv(K_bg)` |
136
+ | `reference_T_cw` | virtual camera at the arc midpoint that the background is aligned to |
137
+ | `visibility` | `visible_px`, `amodal_px`, `visible_frac`, each a `[32][N]` array |
138
+ | `render`, `timing`, `git_commit`, `generator_version`, `arc_retries`, `rejections` | provenance; ignore for training |
139
+
140
+ ## 6. Guarantees
141
+
142
+ Enforced by the generator (failing clips are resampled) and re-checked by the test suite on every released eval clip:
143
+
144
+ - **Visibility:** every object in every frame has at least 524 visible pixels (0.2% of the image) and at least 10% of its amodal area visible. Objects can be partly occluded but never vanish.
145
+ - **Background:** it covers every pixel of every frame.
146
+
147
+ Enforced by construction:
148
+
149
+ - **No interpenetration:** objects' bounding spheres (radius `s * sqrt(3) / 2`) are disjoint.
150
+
151
+ Checked by the test suite:
152
+
153
+ - **Geometry**, on every eval clip, object and frame: the GT-posed mesh is ray-cast independently of Blender (one ray per pixel center).
154
+ - The amodal mask matches the ray-cast silhouette to at most 0.05 mismatched pixels per boundary pixel (typically ≤ 0.007).
155
+ - Rendered depth matches the ray-cast depth to a median error of at most 5e-4 · s (typically 1e-5 · s).
156
+ - A half-pixel principal-point offset, a 5 degree rotation or a 0.1 · s shift all fail this check, so masks and depth agree with `K`, `T_cw` and the poses to sub-pixel accuracy.
157
+ - **Determinism**, on one clip regenerated from its seed:
158
+ - poses, masks and JSON are identical (except `meta.json` `timing` and `git_commit`);
159
+ - depth matches to 1e-5 relative;
160
+ - RGB matches up to renderer noise.
161
+
162
+ ## 7. How the data is distributed
163
+
164
+ | Quantity | Distribution |
165
+ |---|---|
166
+ | N | 1, 2, 3, 4 with p = 0.30, 0.30, 0.25, 0.15 |
167
+ | object rotation `R_wo` | uniform on SO(3) |
168
+ | scale `s` | U(0.4, 1.0) |
169
+ | object positions | uniform in a ball of radius N^(1/3), resampled until no overlap |
170
+ | camera | looks at the centroid of the object centers, Z up, no roll; distance `r / tan(25 deg) * U(1.0, 1.4)`, where r is the radius of the objects' actual geometry around that centroid |
171
+ | object size in image | median 2.5% of the frame (N=1 larger, N=4 smaller); about 3% of objects are slightly cut off by the frame edge in some frames |
172
+ | start azimuth / elevation | U(0, 360) / U(10, 45) deg (with drift, camera elevation spans 0-55 deg) |
173
+ | arc span / elevation drift | U(10, 70) deg with random sign / U(-10, 10) deg |
174
+ | camera timing | eased: `u(t) = (1 - cos(pi t / 31)) / 2`, so motion is slow at both ends |
175
+ | light | one sun (uniform on the upper hemisphere) plus low ambient, fixed in world for the clip |
176
+ | background | an SA-1B photo treated as a plane at infinity, i.e. warped by the camera's rotation only (no parallax) |
177
+
178
+ These are the distributions *before* rejection. N, the assets, the background and the light are drawn once per seed and never resampled, so their distributions are exact. Rotations, scales, positions and the camera are redrawn when a clip fails the visibility or background checks, so released clips lean slightly towards less-occluded configurations and arcs that keep the background covered.
179
+
180
+ The model side is expected to subsample 16 of the 32 frames.
181
+
182
+ ## 8. Minimal loader (numpy only)
183
+
184
+ ```python
185
+ import json, numpy as np
186
+ from PIL import Image
187
+
188
+ root, clip = "dataset", "dataset/clips/eval/00000000"
189
+ cams = json.load(open(f"{clip}/cameras.json"))
190
+ objs = json.load(open(f"{clip}/objects.json"))
191
+ K = np.array(cams["K"])
192
+
193
+ t, k = 0, 1
194
+ T_cw = np.array(cams["frames"][t]["T_cw"])
195
+ o = objs[k - 1]
196
+ R_wo, t_wo, s_wo = np.array(o["R_wo"]), np.array(o["t_wo"]), np.array(o["s_wo"])
197
+ R_co = T_cw[:3, :3] @ R_wo
198
+ t_co = T_cw[:3, :3] @ t_wo + T_cw[:3, 3]
199
+
200
+ rgb = np.asarray(Image.open(f"{clip}/rgb/{t:03d}.png"))
201
+ visible_k = np.asarray(Image.open(f"{clip}/mask_visible/{t:03d}.png")) == k
202
+ amodal_k = np.asarray(Image.open(f"{clip}/mask_amodal/obj{k}/{t:03d}.png")) > 0
203
+ depth = np.load(f"{clip}/depth/{t:03d}.npz")["depth"]
204
+
205
+ # Sanity check: project the voxel centers; typically >90% land on the amodal mask (voxel
206
+ # centers sit up to half a voxel off the surface, which matters for small objects).
207
+ vox = np.load(f"{root}/{o['voxels']}")
208
+ x_o = (np.argwhere(vox) + 0.5) / 64 - 0.5
209
+ x_c = (x_o * s_wo) @ R_co.T + t_co
210
+ uv = np.round(x_c[:, :2] / x_c[:, 2:] @ K[:2, :2].T + K[:2, 2]).astype(int)
211
+ inside = (uv >= 0).all(1) & (uv < 512).all(1)
212
+ print("voxel centers on amodal mask:", amodal_k[uv[inside, 1], uv[inside, 0]].mean())
213
+ ```
214
+
215
+ ## 9. Training export
216
+
217
+ The model team does not train on the full format. A packed export holds RGB, visible masks, per-frame object poses and voxels only (no depth, amodal masks or `rgba_fg`). It is built from the clip folders with:
218
+
219
+ ```
220
+ uv run python -m sam3dvid.export --dataset dataset --split train --out <dir> --clips-per-shard 100 [--workers N]
221
+ ```
222
+
223
+ Export is deterministic (same input, byte-identical shards) and resumable: a shard that already exists is skipped, and files are written to a temp name and renamed. One `--out` directory holds one split.
224
+
225
+ ```
226
+ <out>/
227
+ train-000000.tar ... WebDataset shards, --clips-per-shard clips each, sorted by clip id
228
+ voxels_train.npz asset_id -> packed voxels, only the assets the split uses
229
+ index.json shards with clip ids and byte sizes, format version, conventions
230
+ ```
231
+
232
+ ### 9.1 Shards
233
+
234
+ One sample per clip, keyed by clip id. A sample is 65 tar members:
235
+
236
+ | Member | Content |
237
+ |---|---|
238
+ | `<clip_id>.rgb.000.jpg ... 031.jpg` | RGB frame, JPEG quality 95, 4:4:4 chroma (PSNR above 40 dB against the PNG) |
239
+ | `<clip_id>.visible.000.png ... 031.png` | uint8 instance map, lossless, identical to `mask_visible`: 0 = background, k = object k |
240
+ | `<clip_id>.json` | everything below |
241
+
242
+ ### 9.2 Sample JSON
243
+
244
+ | Key | Meaning |
245
+ |---|---|
246
+ | `clip_id`, `split`, `seed`, `num_objects`, `generator_version`, `git_commit` | from `meta.json`; `blender_version` only when the clip's meta has it |
247
+ | `K` | 3x3 intrinsics, same as `cameras.json` |
248
+ | `T_cw` | `[32][4][4]` world -> camera, same as `cameras.json` |
249
+ | `objects` | one entry per object, index `k - 1`, matching the mask ids (below) |
250
+ | `visibility` | `visible_px`, `amodal_px`, `visible_frac`, each `[32][N]`, from `meta.json` |
251
+
252
+ Each entry of `objects`:
253
+
254
+ | Key | Shape | Meaning |
255
+ |---|---|---|
256
+ | `k`, `asset_id` | | mask id (1-based) and the key into the voxels file |
257
+ | `R_wo`, `t_wo`, `s_wo` | 3x3, 3, 3 | world pose, as in `objects.json` |
258
+ | `R_co`, `t_co`, `s_co` | `[32][3][3]`, `[32][3]`, `[32][3]` | per-frame camera-frame pose, computed with `pose_in_camera` (section 3.3) |
259
+
260
+ Poses are in **our** convention, as everywhere in this document; the SAM 3D converter is applied at load time, not at export.
261
+
262
+ ### 9.3 Voxels
263
+
264
+ `voxels_<split>.npz` maps `asset_id` to `np.packbits` of the flattened (C order) bool `(64,64,64)` grid, i.e. a `uint8[32768]`. Voxels belong to assets, not clips, so they are stored once.
265
+
266
+ ### 9.4 Reading
267
+
268
+ `src/sam3dvid/export_reader.py` needs only numpy and PIL:
269
+
270
+ ```python
271
+ from sam3dvid.export_reader import iter_samples, load_voxels
272
+
273
+ for clip_id, rgb, visible, info in iter_samples("export/train/train-000000.tar"):
274
+ # rgb (32,512,512,3) uint8, visible (32,512,512) uint8, info = the JSON above
275
+ obj = info["objects"][0]
276
+ R_co, t_co, s_co = np.array(obj["R_co"]), np.array(obj["t_co"]), np.array(obj["s_co"])
277
+ voxels = load_voxels("export/train/voxels_train.npz", obj["asset_id"]) # bool (64,64,64)
278
+ ```
279
+
280
+ Shards are plain tars, so `webdataset` reads them too (keys are the clip ids).
281
+
282
+ ## 10. Known limitations and things that may change
283
+
284
+ - **Version 0.1.** The file format is stable; the sampling distributions in section 7 are final for M1 unless the test runs reveal a problem.
285
+ - **No de-lit texture target.** Texture ground truth is out of scope; `rgb` is lit.
286
+ - **No metric scale.** Scene units are arbitrary, whereas SAM 3D's MoGe pointmaps are metric (one of our units comes out at about 0.29 in MoGe's reconstruction, median over T6, varying per scene). Without a pointmap input, use scale-invariant translation and scale targets.
287
+ - **Train split not generated yet** (M2). Its format will be identical; the assets are filtered Objaverse objects (`DATASET.md` Section 1).
288
+
289
+
290
+ ## CC0 background update (2026-10-28)
291
+
292
+ New M2 runs use `data/bg_pools_polyhaven` via `configs/m2.yaml`. Prepare it on a CPU
293
+ node with `uv run python scripts/prepare_polyhaven.py --limit 200 --views 4`.
294
+ Powered by Poly Haven (https://polyhaven.com); assets: CC0 (https://polyhaven.com/license).
295
+ The script converts tone-mapped equirectangular panoramas into 2048x1024 perspective
296
+ JPEGs at 130 degree HFOV, keeping the existing compositor and lighting unchanged.
297
+ It freezes the source selection/settings, verifies downloads, records source URLs and
298
+ checksums, and splits by panorama before creating views. Do not rebuild these pools
299
+ with the legacy image-ID-based `build_bg_pools.py`. Freeze pools before rendering.
300
+ Background provenance is included in new clip metadata and exported sample JSON.
301
+
302
+ Earlier SA-1B descriptions and M1/T6 results are historical. Preserve those clips, but
303
+ exclude them from the HF release. Regenerate eval into a fresh dataset root using
304
+ `configs/m1_polyhaven.yaml`, link its assets, and rerun coverage/visual validation.
305
+ The source swap does not clear Objaverse/GSO license obligations; audit them before
306
+ upload, including private HF hosting. Background preparation does not upload anything.
full-q98/export_reader.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Reader for the training export (numpy, PIL and the stdlib only).
2
+
3
+ from sam3dvid.export_reader import iter_samples, load_voxels
4
+
5
+ for clip_id, rgb, visible, info in iter_samples("export/train/train-000000.tar"):
6
+ # rgb (32,512,512,3) uint8, visible (32,512,512) uint8 (0 = background, k = object k)
7
+ for obj in info["objects"]:
8
+ R_co = np.array(obj["R_co"]) # (32,3,3), camera-frame pose per frame, our convention
9
+ t_co, s_co = np.array(obj["t_co"]), np.array(obj["s_co"]) # (32,3), (32,3)
10
+ voxels = load_voxels("export/train/voxels_train.npz", obj["asset_id"]) # (64,64,64) bool
11
+
12
+ Samples come out in tar order. Pass `load_voxels` an open `np.load` result to avoid reopening
13
+ the file per object.
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ import io
19
+ import json
20
+ import tarfile
21
+ from collections.abc import Iterator
22
+ from pathlib import Path
23
+
24
+ import numpy as np
25
+ from PIL import Image
26
+
27
+ VOXEL_RES = 64
28
+
29
+
30
+ def _decode(group: dict[str, bytes]) -> tuple[str, np.ndarray, np.ndarray, dict]:
31
+ rgb, visible = {}, {}
32
+ for ext, data in group.items():
33
+ kind, _, rest = ext.partition(".")
34
+ if kind == "rgb":
35
+ rgb[int(rest.split(".")[0])] = np.asarray(Image.open(io.BytesIO(data)).convert("RGB"))
36
+ elif kind == "visible":
37
+ visible[int(rest.split(".")[0])] = np.asarray(Image.open(io.BytesIO(data)))
38
+ info = json.loads(group["json"])
39
+ return (
40
+ info["clip_id"],
41
+ np.stack([rgb[t] for t in sorted(rgb)]),
42
+ np.stack([visible[t] for t in sorted(visible)]),
43
+ info,
44
+ )
45
+
46
+
47
+ def iter_samples(shard: str | Path) -> Iterator[tuple[str, np.ndarray, np.ndarray, dict]]:
48
+ """Yield (clip_id, rgb, visible, info) for every clip in a shard."""
49
+ key, group = None, {}
50
+ with tarfile.open(shard, "r|") as tar:
51
+ for member in tar:
52
+ if not member.isfile():
53
+ continue
54
+ name = member.name.rsplit("/", 1)[-1]
55
+ member_key, _, ext = name.partition(".")
56
+ if member_key != key and group:
57
+ yield _decode(group)
58
+ group = {}
59
+ key = member_key
60
+ group[ext] = tar.extractfile(member).read()
61
+ if group:
62
+ yield _decode(group)
63
+
64
+
65
+ def load_voxels(voxels_npz, asset_id: str) -> np.ndarray:
66
+ """Unpack one asset's bool (64,64,64) grid from `voxels_<split>.npz` (a path or np.load result)."""
67
+ if isinstance(voxels_npz, (str, Path)):
68
+ with np.load(voxels_npz) as f:
69
+ return load_voxels(f, asset_id)
70
+ bits = np.unpackbits(voxels_npz[asset_id], count=VOXEL_RES**3)
71
+ return bits.reshape(VOXEL_RES, VOXEL_RES, VOXEL_RES).astype(bool)
full-q98/index.json ADDED
The diff for this file is too large to render. See raw diff
 
full-q98/seed_replacements.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "replacements": {
3
+ "1001210": 1010000,
4
+ "1004454": 1010001
5
+ },
6
+ "reason": "Original seeds exhausted scene retries; replacement seeds use original config and unchanged acceptance checks."
7
+ }
full-q98/train-000000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c2711dfa54ddb6239464fd594b3792fe88f6b359838a52ad81fd1b79c229a8b
3
+ size 594954240
full-q98/train-000001.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a304bc9d3abce7b90aab32a6bae462c9e20211366c74da6eed1020d92237cd6a
3
+ size 620584960
full-q98/train-000002.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:637ab852ba990f58d0fcd9bf3d1795c85a8d4bbf6f0ecaa15253ac22e04efca3
3
+ size 591646720
full-q98/train-000003.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ff11a56513c88ad325036956ea313499b9cf51a2bfcba8cecca84da15122600
3
+ size 614031360
full-q98/train-000004.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c14960d7b71b6894220cec0ae25379c1cbfc9a2fa42c95e72581b798730d63e8
3
+ size 604508160
full-q98/train-000005.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ada1552f213aac7fbd9e284239ff2d4209ad0d4e4f9715e4c27b1587c45550d9
3
+ size 554803200
full-q98/train-000006.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bd999fb4ef78dae9fa97b86a52c0f3b120448d439066fe21393b915550d6eda
3
+ size 543662080
full-q98/train-000007.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbd76c4d3dac086f9044a1d3e546f546d022230d9f6edd7e374cdf11d27aab73
3
+ size 581509120
full-q98/train-000008.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:590eeeb038fab7766e386d83b56adc79dbd6558f7eace0a61d5eb4a8677aee19
3
+ size 576583680
full-q98/train-000009.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b402cb30bd1f00ba8c5746aaa977c9307f0adbee73182beba0d1174c20f53ad
3
+ size 580700160
full-q98/train-000010.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ebeafc70c52a7c12c0db2a9a49e795623d4fc780acc4dc48755c906206f8449
3
+ size 568616960
full-q98/train-000011.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fea94db67f96b067b807552d4db76a798a833eea730c8e51fbbf386979abcdc6
3
+ size 569856000
full-q98/train-000012.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a6611f4b7a506d5cbe630492fd3fa09f0113ecea7ba8fe58be89b7e65250b0b
3
+ size 557875200
full-q98/train-000013.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45d1d2299badeffe9559ba90d26621a181639197947c626782be5115682d5376
3
+ size 573501440
full-q98/train-000014.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9f66af1a3b51987b86ff7b241f53db9cbb6e600f3d74550663460ced376a054
3
+ size 581652480
full-q98/train-000015.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c72888a8020fbe772368bc2afa1f90afc75d8b85545036a1597e164780045033
3
+ size 596500480
full-q98/train-000016.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf3136fc76d184c11acadc8765d8cce7f8baedfd9e269a74527366edad40fde2
3
+ size 588093440
full-q98/train-000017.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8881b4be605fd3840dbc435032e160b949aba7862b776972789b083b4584bdb
3
+ size 630814720
full-q98/train-000018.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cac6bedf091091a374ce838f82e2a9aaa5c08d1e566c02658f7fd2ae5ed55f3
3
+ size 572528640
full-q98/train-000019.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c850b331b999ed091d929370d1b92bf55d9d1095c614b6ff2dc8722c8e144f22
3
+ size 577269760
full-q98/train-000020.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7477ef32060f9826c0d02fa58d0ec237742b127c19aa12e683bda0479cd5f98
3
+ size 617502720
full-q98/train-000021.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de28f4a70dec8ef0e8cbac5e7b3497e8bd8fff472f249d63743f759f5b5ab515
3
+ size 570798080
full-q98/train-000022.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32c7b30de2f467dc233898e3b5f97c4aa0e3a46cd79bbed5231508aac38e60ab
3
+ size 617748480
full-q98/train-000023.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba9ff41c2f81e55ad2ac293b8da64e3596d843fae7dc6c373346550e48c71149
3
+ size 585041920
full-q98/train-000024.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b42062aca3de03e934defd4d4e0a1e3060be587b49630717aeb47f791986bfdf
3
+ size 584990720
full-q98/train-000025.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d16599bacc2a59fc7c691ad9ff4e73cc3175d1b2b508155ed64167f7c4246e13
3
+ size 614666240
full-q98/train-000026.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a25c2af9d635bd05d1fde6df11c1646f05c3c04164e6c9ce3f57f83b23cc359
3
+ size 556533760
full-q98/train-000027.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c192f55654322c9e6244e6a07fb90e554b34e1297bcaf31c294911c5a934b56
3
+ size 561418240
full-q98/train-000028.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:974ab6806738f502cb0f7b48c9f97089231a1b684013b49348530d25632a93fd
3
+ size 564981760
full-q98/train-000029.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5495ecd9f40cdfd6ede1087dff4edb28deb1f1974222abbde6690448bd95650f
3
+ size 594964480
full-q98/train-000030.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea3d3cb65383bd2faaed07e7c625aa9a5dd93b2748fef948dbaa25b42f26207e
3
+ size 613457920
full-q98/train-000031.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb80e7a44e97d59789c197d20db3f391e61e41ee017a352cef9f43f62b8b7f56
3
+ size 596787200
full-q98/train-000032.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57a5fcd0c16d0cd492305f1720cbeb1c8b47197af340c62da7dc8c34e4db51d2
3
+ size 627107840
full-q98/train-000033.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a474d4173077f72193f3bc78c5b3511f71bf35087de270cfeb749ed4fb53877f
3
+ size 605655040
full-q98/train-000034.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a3cea7587d7fca9afbb8b0fd4e60b62b44aa973e50bb16d3ac38ea7e692a662
3
+ size 584488960
full-q98/train-000035.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90f741477764a400fdf30ff5fb20d1a06ca4e1f94330b98030e0112a2ba7c580
3
+ size 621916160
full-q98/train-000036.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f1c402af485c753ea1e5a62df7cfed5bef0a17d7f4a278bbe42950e060765c0
3
+ size 585482240
full-q98/train-000037.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:799fc652c6a91b05e9df4c2dc7c9510800f44a6f78f0a97434dd2a6cb8404a61
3
+ size 534016000
full-q98/train-000038.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90be18a6f31336f3486cffe9af23406401ae403cc24a20e07211331eae3cfa5f
3
+ size 587806720
full-q98/train-000039.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56fc05dd3469bfd5837c7ade1e6c12da07aeab0605bc50c5838f009e1d1b25c2
3
+ size 610314240
full-q98/train-000040.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f5b4dd6c7660a59da8211d6f4c9295bfaa997d72cbd43f567fbf639f3c57f79
3
+ size 549632000
full-q98/train-000041.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50336bdcdc3342faa2e473fbca384ab273de75b607603f65db4b1c81073bc443
3
+ size 530257920
full-q98/train-000042.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a56827519acc1f0620e778191a126884e16d5f0e0019b35c6b338b0bc73b9618
3
+ size 590888960
full-q98/train-000043.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ac84843bd6f5168d772973d5ef3b596b5ddd50ba675ccbb8fd7713691a46111
3
+ size 586526720