# S3DB Scene-Graph / Layout-Attn Data Bundle Everything needed to **train and evaluate scene-graph (SG) and layout-attention conditioning** in the merged 3D-Belief repo (`merge-sg-conditioning` branch). Trained model checkpoints are **not** included (20–21 GB each) — see the bottom. ## Contents ``` s3db_sg_layout_bundle/ ├── s3db_dataset/train// # 2997 ProcTHOR-style episodes (minimal files) │ ├── rgb_trajectory.mp4 # RGB frames (read via cv2 — the loader uses THIS, not all_rgb.npz) │ ├── all_depths.npz # metric depth, key "depths" [N,H,W] │ ├── all_poses.npz # GT camera-to-world poses, key "poses" [N,4,4] │ ├── all_scene_graphs.json # per-frame scene graph: object instances + walls (THE conditioning signal) │ ├── door_window_bboxes.json # (optional) precomputed door/window bboxes; refines wall conditioning │ └── trajectory_metadata.json # episode metadata ├── vocab/ │ ├── s3db/ # S3DB object vocabulary + frozen text embeddings │ │ ├── type_to_id.json / id_to_type.json # 750-type vocab (+ *_751.json variants) │ │ ├── sg_type_embeddings.pt # CLIP ViT-B/16 text embeddings (512-d) — SG / FiLM conditioning │ │ ├── sg_type_embeddings_minilm.pt # MiniLM-L6-v2 text embeddings (384-d) — layout-attn text head │ │ └── class_freq.pt # per-class frequency — layout-attn class weighting │ └── procthor/ # ProcTHOR vocab variant (id maps + CLIP embeddings) ├── checkpoints/ │ └── dinov3_vitb16_pretrain_lvd1689m.pth # DINOv3 ViT-B — REPA target + layout-attn visual stream ├── README.md # this file └── SCENE_GRAPH_CONDITIONING.md # full merge notes (configs, scripts, training/eval commands) ``` ## What each component is for | Component | Purpose in the pipeline | |---|---| | `s3db_dataset` | Training/eval data. `ProcTHORDataset` reads `/train//` — RGB from the mp4, depth/poses from npz, and the scene graph from `all_scene_graphs.json` (parsed into node types/positions/sizes/edges + wall segments). | | `vocab/s3db/sg_type_embeddings.pt` (CLIP) | Frozen per-type embeddings for the **SG** backbone (`u_vit3d_pose_sg`, FiLM + GCN, closed/open-vocab recon). | | `vocab/s3db/sg_type_embeddings_minilm.pt` (MiniLM) | Frozen per-type embeddings for the **layout-attn** backbone's text prototype head (`u_vit3d_pose_layout`). | | `vocab/s3db/class_freq.pt` | Class-frequency weighting for the layout-attn auxiliary CE loss. | | `checkpoints/dinov3_*.pth` | DINOv3 ViT-B. Used as the REPA alignment target (both backbones) **and** as the per-pixel visual layout stream for layout-attn (`use_visual_layout=true`). | ## How to use (in the merged repo) Point the configs at this bundle: - `dataset.root_dir=/s3db_dataset` (dir containing `train/`) - `dataset.vocab_dir=/vocab/s3db` - `model.encoder.backbone.sg_type_embeddings_path=/vocab/s3db/sg_type_embeddings.pt` (SG) or `.../sg_type_embeddings_minilm.pt` (layout-attn) - `model.encoder.backbone.class_freq_path=/vocab/s3db/class_freq.pt` (layout-attn) - `repa_encoder_weights=/checkpoints/dinov3_vitb16_pretrain_lvd1689m.pth` - `model.encoder.backbone.dinov3_weights_path=` (layout-attn visual) Launch scripts (already in the repo under `scripts/training/`): - SG conditioning: `scripts/training/structured/train_s3db_film_clip_sg.sh` - Layout-attn: `scripts/training/structured/train_s3db_layoutattn.sh` - Base init: `scripts/training/structured/train_s3db_base.sh` - Eval/inference: `scripts/training/eval_s3db_sg_ablation.sh`, `eval_s3db_layoutattn_ablation.sh` (Edit `DATASET_ROOT` / `VOCAB_DIR` / dinov3 path / `CUDA_VISIBLE_DEVICES` in each script header.) ## NOT included (transfer separately if needed) - **Trained model checkpoints** (~20–21 GB each), at `…/structured_3d_belief/3d-belief/outputs/training/`: - `s3db_film_clip_sg_closed/model-34.pt` (SG, closed-vocab; needs `n_object_types=751`) - `s3db_layoutattn*/model-*.pt` (layout-attn) - `s3db_base/model-22.pt` (base init for fine-tuning the conditioned variants) Needed only for **eval/rollout/fine-tune**; not for training from scratch. - **VGGT checkpoint** — only if training/eval with `use_vggt_alignment=true`. - Per-episode files intentionally dropped (not read by the loader in this scope): `all_rgb.npz` (RGB comes from the mp4), `all_segmentation.npz`, `all_semantic_meta.json`, `all_class_pp_128.npz`, `structural_gt.json` (SG-LLM only), `predicted_poses.npz` (predicted-pose only), `*.bak`, `gt_obbs.json`, `scene_graph_full*.json`, `semantic_trajectory.mp4`, `top_down_view_*.png`.