3d-belief-dev / data /BUNDLE_README.md
SCAI-JHU's picture
Upload data/BUNDLE_README.md with huggingface_hub
d37ad36 verified
|
Raw
History Blame Contribute Delete
5.07 kB

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/<episode>/        # 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 <root>/train/<ep>/ β€” 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=<bundle>/s3db_dataset (dir containing train/)
  • dataset.vocab_dir=<bundle>/vocab/s3db
  • model.encoder.backbone.sg_type_embeddings_path=<bundle>/vocab/s3db/sg_type_embeddings.pt (SG) or .../sg_type_embeddings_minilm.pt (layout-attn)
  • model.encoder.backbone.class_freq_path=<bundle>/vocab/s3db/class_freq.pt (layout-attn)
  • repa_encoder_weights=<bundle>/checkpoints/dinov3_vitb16_pretrain_lvd1689m.pth
  • model.encoder.backbone.dinov3_weights_path=<same dinov3 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.